|
Macaulay2 Engine
|
FreeModule — finite-rank free module R^n, the type-level anchor for every Matrix. More...
Go to the source code of this file.
Classes | |
| class | FreeModule |
| Engine-side free module R^n over a Ring. More... | |
FreeModule — finite-rank free module R^n, the type-level anchor for every Matrix.
Declares FreeModule, an EngineObject that holds its base Ring *R, the per-generator degree vectors in gc_vector<monomial> components (the rank is just components.size()), and an optional SchreyerOrder *schreyer (NULL when no Schreyer structure is installed). Every Matrix stores pointers to a source and target FreeModule, so this class is what gives matrix shapes their static guarantees — degree compatibility and base-ring agreement are checked through these pointers. Once a FreeModule is interned its EngineObject hash freezes it, but during construction it is built up imperatively: the fresh-return transformations sub_space, direct_sum, tensor, exterior and the static make_schreyer allocate a new FreeModule, while append, append_schreyer, change_degree, and the in-place direct_sum_to mutate the receiver and are used to fill it in before it escapes.
When a Schreyer order is installed, the comparison compare(e_i * m, e_j * m') first compares m_{i} * m against m_{j} * m' using the stored leading monomials of the inducing generators and then tiebreaks by index, which is what lets a syzygy module remember the order structure of the resolution step it came from. The standalone #undef FreeModule near the top of the header defuses a stray MinGW system-header macro of the same name.
Definition in file freemod.hpp.