Macaulay2 Engine
Loading...
Searching...
No Matches
dmat-zz-flint.hpp File Reference

DMat<M2::ARingZZ> — dense integer matrices stored in a FLINT fmpz_mat_t. More...

#include <assert.h>
#include <utility>
#include "aring-zz-flint.hpp"
#include <M2/gc-include.h>
#include <flint/fmpz_mat.h>

Go to the source code of this file.

Classes

class  DMat< M2::ARingZZ >
 Specialisation of DMat for ARingZZ matrices, backed by FLINT's fmpz_mat_t. More...

Detailed Description

DMat<M2::ARingZZ> — dense integer matrices stored in a FLINT fmpz_mat_t.

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

Specialises the dense-matrix template for the FLINT integer aring. Storage is a single fmpz_mat_t mArray of FLINT fmpz cells (with the small-value inlining inherited from ARingZZ). The class exposes the standard DMat surface (ring(), numRows, numColumns, entry(r, c) via fmpz_mat_entry, resize, swap via fmpz_mat_swap) plus a raw fmpz_mat() accessor and unsafeArray() direct-pointer hook for consumers that want to hand the underlying fmpz buffer back to FLINT.

Arithmetic (fmpz_mat_add, fmpz_mat_mul, fmpz_mat_rank, fmpz_mat_det, fmpz_mat_solve, fmpz_mat_inv, fmpz_mat_nullspace, ...) is not declared here — mat-linalg.hpp and the LU specialisations call them directly through fmpz_mat() once they have copied a matrix into this representation. The constructor calls fmpz_mat_init with the right dimensions and the destructor calls fmpz_mat_clear; the in-source comment marks the class "should *not* go to the front end" because FLINT's limbs are not on the GC heap. M2/gc-include.h precedes the FLINT include so allocations route through bdwgc.

See also
dmat.hpp
aring-zz-flint.hpp
mat-linalg.hpp

Definition in file dmat-zz-flint.hpp.