Macaulay2 Engine
Loading...
Searching...
No Matches

◆ rawGetPart()

const RingElement * rawGetPart ( const M2_arrayint wts,
const RingElement * f,
M2_bool lobound_given,
M2_bool hibound_given,
long lobound,
long hibound )

Definition at line 807 of file ringelement.cpp.

818{
819 try
820 {
822 if (P == nullptr)
823 {
824 ERROR("expected a polynomial");
825 return nullptr;
826 }
828 f->get_value(),
829 lobound_given,
830 hibound_given,
831 lobound,
832 hibound);
833 return RingElement::make_raw(P, g);
834 } catch (const exc::engine_error& e)
835 {
836 ERROR(e.what());
837 return nullptr;
838 }
839}
virtual ring_elem get_part(const std::vector< int > &wts, const ring_elem f, bool lobound_given, bool hibound_given, long lobound, long hibound) const =0
Abstract base for the engine's polynomial-ring hierarchy.
Definition polyring.hpp:96
virtual const PolynomialRing * cast_to_PolynomialRing() const
Definition ring.hpp:243
ring_elem get_value() const
Definition relem.hpp:79
static RingElement * make_raw(const Ring *R, ring_elem f)
Definition relem.cpp:20
const Ring * get_ring() const
Definition relem.hpp:81
const int ERROR
Definition m2-mem.cpp:55
std::vector< T > M2_arrayint_to_stdvector(M2_arrayint arr)
Definition util.hpp:96

References Ring::cast_to_PolynomialRing(), ERROR, PolynomialRing::get_part(), RingElement::get_ring(), RingElement::get_value(), M2_arrayint_to_stdvector(), and RingElement::make_raw().