24{
25 try
26 {
27
29 const size_t c = C->
n_cols();
30 const size_t r = C->
n_rows();
31
32 auto ineqs = libnormaliz::Matrix<Integer>(r, c);
33 for (size_t i = 0; i < r; i++)
34 for (size_t j = 0; j < c; j++)
35
36 ineqs[i][j] = (-1) *
static_cast<Integer>(C->
elem(i, j).get_mpz());
37
38 auto cone = libnormaliz::Cone<Integer>(libnormaliz::Type::inequalities, ineqs);
39 auto rays = cone.getExtremeRays();
40 size_t n = rays.size();
41
43 for (size_t i = 0; i < n; i++)
44 for (size_t j = 0; j < c; j++)
45 {
46 mpz_ptr z =
newitem(__mpz_struct);
47 mpz_init_set(z, rays[i][j].get_mpz_t());
50 }
51
52 return mat.to_matrix();
54 {
56 return nullptr;
57 }
58}
const Ring * get_ring() const
ring_elem elem(int i, int j) const
Mutable builder used to assemble an immutable Matrix one column (or one term) at a time.
virtual FreeModule * make_FreeModule() const
void mpz_reallocate_limbs(mpz_ptr _z)