Macaulay2 Engine
Loading...
Searching...
No Matches
mutablecomplex.hpp File Reference

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...

Detailed Description

MutableComplex — in-place chain complex of MutableMatrix differentials.

Note
AI-generated documentation. Verify against the source before relying on it.

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.

See also
mat.hpp
comp-res.hpp
localring.hpp

Definition in file mutablecomplex.hpp.