72 for (
size_t i = 0; i < nrows; i++)
result->set_entry(i, i, R->
from_long(1));
80 Matrix::iterator i(m);
81 for (
unsigned int c = 0; c < m->
n_cols(); c++)
96 for (
size_t c = 0; c < ncols; c++)
99 for (r = 0; r < nrows; r++)
107 if (
p[r].size() > maxcount) maxcount =
p[r].size();
109 for (r = 0; r < nrows; r++)
110 for (
size_t k = maxcount + 1 -
p[r].size(); k > 0; k--)
p[r] <<
' ';
112 for (r = 0; r < nrows; r++)
115 char *
s =
p[r].str();
123 engine_RawRingElementArray values)
125 if (rows->len != cols->len || rows->len != values->len)
return false;
126 for (
size_t i = 0; i < rows->len; i++)
129 rows->array[i], cols->array[i], values->array[i]->get_value()))
159 std::vector<size_t> P(nelems, -1);
160 std::vector<size_t> Qt(nelems, -1);
163 LUdivine(mat->
ring().field(),
165 (transpose ? FFLAS::FflasTrans : FFLAS::FflasNoTrans),
Legacy Z_mod — a Ring-derived Z/p with log / exp tables.
M2::ARingCCC — arbitrary-precision complex numbers (pair of MPFR floats).
M2::ARingRR — machine-precision real numbers (IEEE 754 double).
M2::ARingRRR — arbitrary-precision real numbers backed by MPFR.
ConcreteRing<RingType> — the templated bridge between aring and the legacy Ring API.
M2::ARingGFM2 — native engine Galois field, no FLINT dependency.
Tiny dispatcher header that picks the default ARingQQ from among the QQ aring implementations.
M2::ARingTower — iterated finite-field extension tower for very large GF(p^k).
M2::ARingZZ — FLINT-backed arbitrary-precision integers with small-value inlining.
M2::ARingZZGMP — aring integer ring backed straight by GMP mpz_t.
M2::ARingZZpFFPACK — Z/p via FFLAS-FFPACK's Givaro::Modular<double> field.
M2::ARingZZpFlint — Z/p via FLINT's nmod_t precomputed-reciprocal reduction.
M2::ARingZZp — portable Z/p for small primes via log / exp tables.
Generic CoefficientRing adapter that wraps an arbitrary const Ring* and forwards every operation to i...
const ACoeffRing & ring() const
size_t numColumns() const
const Ring * get_ring() const
virtual size_t n_rows() const =0
virtual size_t n_cols() const =0
virtual bool get_entry(size_t r, size_t c, ring_elem &result) const =0
static MutableMatrix * zero_matrix(const Ring *R, size_t nrows, size_t ncols, bool dense)
static MutableMatrix * from_matrix(const Matrix *N, bool is_dense)
void text_out(buffer &o) const
virtual MutableMatrix * transpose() const =0
bool set_values(M2_arrayint rows, M2_arrayint cols, engine_RawRingElementArray values)
virtual const Ring * get_ring() const =0
virtual bool set_entry(size_t r, size_t c, const ring_elem a)=0
static MutableMatrix * identity(const Ring *R, size_t nrows, bool dense)
Abstract base class for mutable matrices over an arbitrary engine Ring, the in-place counterpart of t...
virtual MutableMatrix * makeMutableMatrix(size_t nrows, size_t ncols, bool dense) const
virtual ring_elem from_long(long n) const =0
virtual void elem_text_out(buffer &o, const ring_elem f, bool p_one=true, bool p_plus=false, bool p_parens=false) const =0
virtual bool is_zero(const ring_elem f) const =0
const CoefficientRingR * getCoefficientRingR() const
virtual MutableMatrix * makeMutableMatrix(size_t nrows, size_t ncols, bool dense) const
M2::ARingZZGMP * get_ARing() const
M2::ARingZZp * get_ARing() const
virtual MutableMatrix * makeMutableMatrix(size_t nrows, size_t ncols, bool dense) const
Two SimpleARing-style coefficient adapters: CoefficientRingZZp and CoefficientRingR.
DMat<ACoeffRing> — dense-matrix template plus the umbrella that wires in every per-ring specialisatio...
Engine bridge into LAPACK for RR / CC dense linear algebra.
VALGRIND_MAKE_MEM_DEFINED & result(result)
engine_RawArrayIntPair engine_RawArrayIntPairOrNull
MutableMatrix — abstract base of every mutable matrix the engine hands across the boundary.
MatrixConstructor — the mutable builder that produces an immutable Matrix.
Matrix — the engine's immutable homomorphism F -> G between free modules.
Umbrella header that ties together MutableMat declarations, implementations, and the SLP variant.
SMat<ACoeffRing> — column-oriented sparse matrix template, dual of DMat<R>.
M2_arrayint stdvector_to_M2_arrayint(const std::vector< T > &v)
Conversion helpers between M2 boundary types and standard C++ containers.