Definition at line 62 of file pfaff.cpp.
66{
67 if (p2 == 2)
return M->elem(
static_cast<int>(r[0]),
static_cast<int>(r[1]));
68 ring_elem
result =
R->from_long(0);
69
71 for (int i = p2 - 2; i >= 0; i--)
72 {
75 ring_elem g =
76 M->elem(
static_cast<int>(r[p2 - 2]),
static_cast<int>(r[p2 - 1]));
78 {
80 continue;
81 }
83 ring_elem gh =
R->mult(g, h);
86 if (negate)
88 else
90 }
91
92
93
94 size_t temp = r[p2 - 2];
95 for (size_t i = p2 - 2; i > 0; i--) r[i] = r[i - 1];
96 r[0] = temp;
97
99}
ring_elem calc_pfaff(void)
VALGRIND_MAKE_MEM_DEFINED & result(result)
mpreal & negate(mpreal &x)
void swap(mpfr::mpreal &x, mpfr::mpreal &y)
References calc_pfaff(), M, R, result(), and std::swap().
Referenced by Matrix::pfaffian().