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

◆ promote()

bool RingElement::promote ( const Ring * S,
const RingElement *& result ) const

Definition at line 305 of file relem.cpp.

306{
307 if (S == R)
308 {
309 result = this;
310 return true;
311 }
312 ring_elem g;
313 if (S->promote(R, val, g))
314 {
315 result = new RingElement(S, g);
316 return true;
317 }
318 return false;
319}
virtual bool promote(const Ring *R, const ring_elem f, ring_elem &result) const =0
RingElement(const Ring *R, ring_elem f)
Definition relem.hpp:166
ring_elem val
Definition relem.hpp:69
const Ring * R
Definition relem.hpp:68
VALGRIND_MAKE_MEM_DEFINED & result(result)

References Ring::promote(), R, result(), RingElement(), and val.

Referenced by IM2_RingElement_promote(), and set_GF_minimal_poly().