3 struct tcounter
: public np_base
{
16 tcounter(unsigned dim
, unsigned long max_index
) : np_base(dim
), todd(dim
) {
22 num
= Matrix_Alloc(max_index
, 1);
23 den
= Matrix_Alloc(dim
, 1);
24 lambda
= Vector_Alloc(dim
);
27 void setup_todd(unsigned dim
);
29 void adapt_todd(dpoly
& t
, const Value c
);
30 void add_powers(dpoly
& n
, const Value c
);
38 Vector_Free(todd_denom
);
43 virtual void init(Polyhedron
*P
) {
45 randomvector(P
, l
, dim
);
46 zz2values(l
, lambda
->p
);
49 virtual void handle(const mat_ZZ
& rays
, Value
*vertex
, const QQ
& c
,
50 unsigned long det
, int *closed
, barvinok_options
*options
);
51 virtual void get_count(Value
*result
) {
52 assert(value_one_p(&count
[0]._mp_den
));
53 value_assign(*result
, &count
[0]._mp_num
);