|
Macaulay2 Engine
|
MutableComplex — in-place chain complex of MutableMatrix differentials. More...
#include "localring.hpp"#include "style.hpp"#include "hash.hpp"#include "mat.hpp"#include "debug.hpp"#include <iostream>Go to the source code of this file.
Classes | |
| class | MutableComplex |
| Sequence of MutableMatrix differentials representing an in-progress chain complex, used for engine-side minimisation / pruning. More... | |
| class | MutableComplex::iterator |
| Cursor pointing at one entry of one differential matrix in the complex: a (matrix index, (row, col)) triple. More... | |
MutableComplex — in-place chain complex of MutableMatrix differentials.
Declares MutableComplex, a MutableEngineObject subclass carrying a sequence of MutableMatrix* differentials chained together with a parallel mBetti vector of dimensions and cached mRing / mLocalRing / mPolynomialRing pointers. The constructor accepts a VECTOR(MutableMatrix*) and infers the ring contexts from the first matrix (get_ring / cast_to_LocalRing / cast_to_PolynomialRing). The prune_* family is the working API: prune_unit(iter, flags) removes one unit entry and propagates the corresponding row / column update to the neighbouring differential to preserve the composition-zero invariant; prune_matrix(n, flags) reduces one matrix's worth of units; prune_complex(nsteps, flags) runs the same pass across the whole complex; and prune_betti / prune_morphisms extract the new dimensions / the reduction morphisms after pruning. The nested iterator class walks (matrix_index, (row, col)) positions and next_unit / find_unit / list_units locate unit-pivot entries to prune.
Typical workflows construct a MutableComplex from an existing resolution (comp-res.hpp) and reduce it to a minimal form by sequential unit pruning. The TODO at the top of the header flags the open question of templating over sparse vs. dense MutableMatrix.
Definition in file mutablecomplex.hpp.