]> www.ginac.de Git - cln.git/blobdiff - include/cln/univpoly_modint.h
Replace CL_REQUIRE/CL_PROVIDE(cl_I_ring) with portable code.
[cln.git] / include / cln / univpoly_modint.h
index 28f800a31e58340bcfc4f4d1e7dbad81482eab9d..5df4630c5548e94b265e1deea536d6985b49f88b 100644 (file)
@@ -43,7 +43,7 @@ public:
        const cl_MI operator() (const cl_MI& y) const;
 public:        // Ability to place an object at a given address.
        void* operator new (size_t size) { return malloc_hook(size); }
-       void* operator new (size_t size, cl_UP_MI* ptr) { (void)size; return ptr; }
+       void* operator new (size_t size, void* ptr) { (void)size; return ptr; }
        void operator delete (void* ptr) { free_hook(ptr); }
 };
 
@@ -51,11 +51,11 @@ class cl_heap_univpoly_modint_ring : public cl_heap_univpoly_ring {
        SUBCLASS_cl_heap_univpoly_ring()
        const cl_modint_ring& basering () const { return The(cl_modint_ring)(_basering); }
        // High-level operations.
-       void fprint (cl_ostream stream, const cl_UP_MI& x)
+       void fprint (std::ostream& stream, const cl_UP_MI& x)
        {
                cl_heap_univpoly_ring::fprint(stream,x);
        }
-       cl_boolean equal (const cl_UP_MI& x, const cl_UP_MI& y)
+       bool equal (const cl_UP_MI& x, const cl_UP_MI& y)
        {
                return cl_heap_univpoly_ring::equal(x,y);
        }
@@ -63,7 +63,7 @@ class cl_heap_univpoly_modint_ring : public cl_heap_univpoly_ring {
        {
                return The2(cl_UP_MI)(cl_heap_univpoly_ring::zero());
        }
-       cl_boolean zerop (const cl_UP_MI& x)
+       bool zerop (const cl_UP_MI& x)
        {
                return cl_heap_univpoly_ring::zerop(x);
        }
@@ -107,6 +107,10 @@ class cl_heap_univpoly_modint_ring : public cl_heap_univpoly_ring {
        {
                return cl_heap_univpoly_ring::degree(x);
        }
+       sintL ldegree (const cl_UP_MI& x)
+       {
+               return cl_heap_univpoly_ring::ldegree(x);
+       }
        const cl_UP_MI monomial (const cl_MI& x, uintL e)
        {
                return The2(cl_UP_MI)(cl_heap_univpoly_ring::monomial(x,e));