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

◆ step()

int PfaffianComputation::step ( )
private

Definition at line 27 of file pfaff.cpp.

30{
31 if (done) return COMP_DONE;
32
33 ring_elem r = calc_pfaff();
34 if (!R->is_zero(r))
35 pfaffs.append(R->make_vec(0, r));
36 else
37 R->remove(r);
38
39 if (Subsets::increment(M->n_cols(), p, row_set)) return COMP_COMPUTING;
40
41 // Otherwise, we are at the end.
42 done = true;
43 return COMP_DONE;
44}
const Ring * R
Definition pfaff.hpp:51
ring_elem calc_pfaff(void)
Definition pfaff.cpp:57
MatrixConstructor pfaffs
Definition pfaff.hpp:53
size_t * row_set
Definition pfaff.hpp:58
const Matrix * M
Definition pfaff.hpp:52
static bool increment(size_t n, Subset &s)
Definition comb.cpp:124
@ COMP_DONE
Definition computation.h:60
@ COMP_COMPUTING
Definition computation.h:71

References calc_pfaff(), COMP_COMPUTING, COMP_DONE, done, Subsets::increment(), M, p, pfaffs, R, and row_set.

Referenced by calc().