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

DMat<M2::ARingQQFlint> — dense rational matrices stored in a FLINT fmpq_mat_t. More...

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

Go to the source code of this file.

Classes

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

Detailed Description

DMat<M2::ARingQQFlint> — dense rational matrices stored in a FLINT fmpq_mat_t.

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

Specialises the dense-matrix template for the FLINT rational aring. Storage is a single fmpq_mat_t mArray whose entries are fmpq cells (the small-value-inlined pair of fmpzs shared with ARingZZ), so the typical "small numerator over small denominator" rationals stay inline and only widen to a heap-allocated representation when the values blow up. The class exposes the standard DMat shape (ring(), numRows, numColumns, entry(r, c), resize, swap) plus a raw fmpq_mat() accessor and the unsafeArray() direct-pointer hook for consumers that need to hand the underlying fmpq buffer back to FLINT.

Arithmetic on DMat<ARingQQFlint> is not defined in this header — consumers (most prominently dmat-lu-qq.hppDMatLinAlg<ARingQQ> once it copies through FlintQQMat) reach into fmpq_mat() and call the FLINT fmpq_mat_* / fmpz_mat_* routines directly. The in-source comment marks the class "should *not* go to the front end" — it is part of the dmat.hpp umbrella include only. As always for FLINT-backed files, M2/gc-include.h precedes the FLINT include so allocations route through bdwgc.

See also
dmat.hpp
dmat-qq-interface-flint.hpp
aring-qq-flint.hpp

Definition in file dmat-qq-flint.hpp.