3 struct counter
: public np_base
{
14 counter(unsigned dim
) : np_base(dim
) {
20 virtual void init(Polyhedron
*P
) {
21 randomvector(P
, lambda
, dim
);
24 virtual void reset() {
25 mpq_set_si(count
, 0, 0);
33 virtual void handle(const mat_ZZ
& rays
, Value
*vertex
, const QQ
& c
,
34 unsigned long det
, int *closed
, barvinok_options
*options
);
35 virtual void get_count(Value
*result
) {
36 assert(value_one_p(&count
[0]._mp_den
));
37 value_assign(*result
, &count
[0]._mp_num
);