|
Macaulay2 Engine
|
DMat<ACoeffRing> — dense-matrix template plus the umbrella that wires in every per-ring specialisation. More...
#include "engine-includes.hpp"#include "mat-util.hpp"#include <algorithm>#include <utility>#include <vector>#include "dmat-zz-flint.hpp"#include "dmat-qq-flint.hpp"#include "dmat-zzp-flint.hpp"#include "dmat-gf-flint-big.hpp"#include "dmat-gf-flint.hpp"Go to the source code of this file.
Classes | |
| class | DMat< ACoeffRing > |
DMat<ACoeffRing> — dense-matrix template plus the umbrella that wires in every per-ring specialisation.
DMat<R> is the engine's dense matrix type, parameterised on the coefficient ring's aring class. The generic instantiation stores entries in a raw ElementType* (mArray, allocated via newarray) of length mNumRows * mNumColumns and walked in row-major order per the in-source comment on entry(row, column); arithmetic dispatches to R's aring methods. The header doubles as an umbrella: it #includes the per-ring specialisations (dmat-zz-flint.hpp, dmat-qq-flint.hpp, dmat-zzp-flint.hpp, dmat-gf-flint-big.hpp, dmat-gf-flint.hpp), so consumers that pull in just dmat.hpp automatically resolve to the native-backed fmpz_mat_t / nmod_mat_t / similar at compile time. The performance-critical LU path has its own per-ring variants under dmat-lu*.hpp (dmat-lu.hpp, dmat-lu-inplace.hpp, dmat-lu-qq.hpp, dmat-lu-zzp-ffpack.hpp, dmat-lu-zzp-flint.hpp).
Templated operations on DMat<R> live in sibling headers: mat-arith.hpp for ring arithmetic, mat-elem-ops.hpp for row / column / swap / scale, mat-linalg.hpp for rank, LU, solve, determinant, inverse, nullspace, and mat-util.hpp for iteration helpers. MutableMatrix (mutablemat.hpp) is the abstract front-end that picks the right DMat<R> instantiation when constructed dense.
Definition in file dmat.hpp.