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

◆ add()

template<class RingType>
virtual ring_elem M2::ConcreteRing< RingType >::add ( const ring_elem f,
const ring_elem g ) const
inlinevirtual

Implements Ring.

Definition at line 332 of file aring-glue.hpp.

333 {
334 if (displayArithmeticCalls) fprintf(stderr, "calling add\n");
335 const ElementType &a = R->from_ring_elem_const(f);
336 const ElementType &b = R->from_ring_elem_const(g);
337 Element c(*R);
339 R->add(c, a, b);
340 R->to_ring_elem(result, c);
341 return result;
342 }
RingType::ElementType ElementType
std::unique_ptr< RingType > R
RingType::Element Element

Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().