1 #ifndef GINAC_RING_TRAITS_HPP
2 #define GINAC_RING_TRAITS_HPP
3 #include <cln/integer.h>
4 #include <cln/modinteger.h>
8 static inline cln::cl_I div(const cln::cl_I& x, const cln::cl_I& y)
10 return cln::exquo(x, y);
13 static inline cln::cl_I get_ring_elt(const cln::cl_I& sample, const int val)
15 return cln::cl_I(val);
18 static inline cln::cl_MI get_ring_elt(const cln::cl_MI& sample, const int val)
20 return sample.ring()->canonhom(val);
24 static inline T the_one(const T& sample)
26 return get_ring_elt(sample, 1);
31 #endif // GINAC_RING_TRAITS_HPP