|
Macaulay2 Engine
|
Generic CoefficientRing adapter that wraps an arbitrary const Ring* and forwards every operation to it. More...
#include <coeffrings.hpp>
Classes | |
| class | Element |
| Managed scalar value: an M2::ElementImpl<ring_elem> that initialises itself through the parent CoefficientRingR. More... | |
| class | ElementArray |
| Fixed-size, owned array of ElementTypes for the linear-algebra templates that want a flat buffer they can operator[] into. More... | |
Public Types | |
| typedef Ring | ring_type |
| typedef ring_elem | elem |
| typedef elem | ElementType |
Public Member Functions | |
| typedef | VECTOR (elem) ElementContainerType |
| CoefficientRingR (const Ring *R0) | |
| void | init_set (elem &result, elem a) const |
| void | init (elem &result) const |
| void | clear (elem &result) const |
| void | set_zero (elem &result) const |
| void | set (elem &result, elem a) const |
| void | set_from_long (elem &result, long a) const |
| void | set_from_mpz (elem &result, mpz_t a) const |
| bool | is_zero (elem result) const |
| bool | is_equal (elem a, elem b) const |
| bool | is_unit (elem f) const |
| void | invert (elem &result, elem a) const |
| void | subtract_multiple (elem &result, elem a, elem b) const |
| void | add (elem &result, elem a, elem b) const |
| void | negate (elem &result, elem a) const |
| void | subtract (elem &result, elem a, elem b) const |
| void | mult (elem &result, elem a, elem b) const |
| void | divide (elem &result, elem a, elem b) const |
| void | to_ring_elem (ring_elem &result, const elem &a) const |
| void | from_ring_elem (elem &result, const ring_elem &a) const |
| elem | from_ring_elem_const (const ring_elem &a) const |
| void | swap (elem &a, elem &b) const |
| void | elem_text_out (buffer &o, ElementType a, bool p_one=true, bool p_plus=false, bool p_parens=false) const |
| void | text_out (buffer &o) const |
Private Attributes | |
| const Ring * | R |
Generic CoefficientRing adapter that wraps an arbitrary const Ring* and forwards every operation to it.
The catch-all implementation used wherever code expects the CoefficientRing operation surface but talks to a ring without a faster specialisation. All add / mult / subtract / invert calls delegate to the corresponding Ring virtual methods on R, and Element / ElementArray (defined nested here) supply the value-semantics wrappers the templated linear algebra code expects.
Definition at line 257 of file coeffrings.hpp.