Macaulay2 Engine
Loading...
Searching...
No Matches
pfaff.hpp
Go to the documentation of this file.
1// Copyright 1996 Michael E. Stillman.
2
3#ifndef _pfaff_hh_
4#define _pfaff_hh_
5
37
38#include "matrix.hpp"
39#include "matrix-con.hpp"
40
42
48
50{
51 const Ring *R;
52 const Matrix *M;
54 // One row matrix collecting non-zero pfaffians
55
56 int p;
57 bool done;
58 size_t *row_set;
59
60 ring_elem calc_pfaff(size_t *r, int p);
61 // Compute the pfaffian of the minor with rows
62 // and columns r[0]..r[p-1]
63
64 int step();
65 // Compute one more pfaffian of size p.
66
67 public:
68 PfaffianComputation(const Matrix *M, int p);
70
71 int calc(int nsteps = -1);
72 // Compute nsteps pfaffians. Only non-negative ones are appended
73 // -1 means compute all of them.
74
75 Matrix *pfaffians() { return pfaffs.to_matrix(); }
76 const Ring *get_ring() const { return R; }
78};
79
80#endif
81
82// Local Variables:
83// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
84// indent-tabs-mode: nil
85// End:
Mutable builder used to assemble an immutable Matrix one column (or one term) at a time.
const Ring * R
Definition pfaff.hpp:51
ring_elem calc_pfaff(void)
Definition pfaff.cpp:57
Matrix * pfaffians()
Definition pfaff.hpp:75
MatrixConstructor pfaffs
Definition pfaff.hpp:53
size_t * row_set
Definition pfaff.hpp:58
PfaffianComputation(const Matrix *M, int p)
Definition pfaff.cpp:7
const Matrix * M
Definition pfaff.hpp:52
int calc(int nsteps=-1)
Definition pfaff.cpp:46
const Ring * get_ring() const
Definition pfaff.hpp:76
xxx xxx xxx
Definition ring.hpp:102
#define Matrix
Definition factory.cpp:14
MatrixConstructor — the mutable builder that produces an immutable Matrix.
Matrix — the engine's immutable homomorphism F -> G between free modules.