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

◆ copy()

template<class RingType>
virtual ring_elem M2::ConcreteRing< RingType >::copy ( const ring_elem f) const
inlinevirtual

Implements Ring.

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

304 {
305 if (displayArithmeticCalls) fprintf(stderr, "calling copy\n");
306 const ElementType &a = R->from_ring_elem_const(f);
307 Element b(*R);
309 R->set(b, a);
310 R->to_ring_elem(result, b);
311 return result;
312 }
RingType::ElementType ElementType
std::unique_ptr< RingType > R
RingType::Element Element

Referenced by promote().