2 #include "conversion.h"
3 #include "skewed_genfun.h"
7 void skewed_gen_fun::print(std::ostream
& os
, unsigned int nparam
,
8 char **param_name
) const
13 matrix2zz(T
, m
, T
->NbRows
, T
->NbColumns
);
18 matrix2zz(eq
, m
, eq
->NbRows
, eq
->NbColumns
);
23 matrix2zz(div
, m
, div
->NbRows
, div
->NbColumns
);
26 gf
->print(os
, nparam
, param_name
);
29 void skewed_gen_fun::coefficient(Value
* params
, Value
* c
,
30 barvinok_options
*options
) const
33 for (int i
= 0; i
< eq
->NbRows
; ++i
) {
34 Inner_Product(eq
->p
[i
]+1, params
, eq
->NbColumns
-2, eq
->p
[i
]);
35 if (value_notzero_p(eq
->p
[i
][0])) {
44 for (int i
= 0; i
< div
->NbRows
; ++i
) {
45 Inner_Product(div
->p
[i
], params
, div
->NbColumns
-1, &tmp
);
46 if (!mpz_divisible_p(tmp
, div
->p
[i
][div
->NbColumns
-1])) {
56 coeff
= gf
->coefficient(params
, options
);
58 Vector
*p2
= Vector_Alloc(T
->NbRows
);
59 Matrix_Vector_Product(T
, params
, p2
->p
);
60 if (value_notone_p(p2
->p
[T
->NbRows
-1]))
61 Vector_AntiScale(p2
->p
, p2
->p
, p2
->p
[T
->NbRows
-1], T
->NbRows
);
62 coeff
= gf
->coefficient(p2
->p
, options
);