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

◆ value()

void FreeAlgebraHeap::value ( Poly & result)

Definition at line 66 of file FreeAlgebra.cpp.

67{
68 Poly tmp1;
69 F.init(tmp1);
70 for (int i = 0; i <= top_of_heap; i++)
71 {
72 if (heap[i].numTerms() == 0) continue;
73 F.add(tmp1, result, heap[i]);
74 std::swap(result, tmp1);
75 F.setZero(tmp1);
76 F.setZero(heap[i]);
77 }
78 top_of_heap = -1;
79 F.clear(tmp1);
80}
Polynomial< CoefficientRingType > Poly
Poly heap[GEOHEAP_SIZE]
const FreeAlgebra & F
VALGRIND_MAKE_MEM_DEFINED & result(result)
void swap(mpfr::mpreal &x, mpfr::mpreal &y)
Definition mpreal.h:3244

References F, heap, result(), std::swap(), and top_of_heap.

Referenced by FreeAlgebra::mult().