3#ifndef _dmat_qq_flint_hpp_
4#define _dmat_qq_flint_hpp_
45#include <M2/gc-include.h>
47#pragma GCC diagnostic push
48#pragma GCC diagnostic ignored "-Wconversion"
49#include <flint/fmpq_mat.h>
50#pragma GCC diagnostic pop
52template <
typename ACoeffRing>
87 fmpq_mat_init(
mArray, nrows, ncols);
113 return *fmpq_mat_entry(
mArray, row, column);
119 return *fmpq_mat_entry(
mArray, row, column);
122 void resize(
size_t new_nrows,
size_t new_ncols)
124 DMat newMatrix(
ring(), new_nrows, new_ncols);
M2::ARingQQFlint — rationals backed by FLINT's fmpq with small-value inlining.
const ElementType * unsafeArray() const
const ACoeffRing & ring() const
void resize(size_t new_nrows, size_t new_ncols)
ElementType & entry(size_t row, size_t column)
DMat(const ACoeffRing &R, size_t nrows, size_t ncols)
const ElementType & entry(size_t row, size_t column) const
M2::ARingQQFlint ACoeffRing
ACoeffRing::ElementType ElementType
void swap(DMat< ACoeffRing > &M)
DMat(const DMat< ACoeffRing > &M)
ElementType *& unsafeArray()
size_t numColumns() const
const fmpq_mat_t & fmpq_mat() const
const ACoeffRing & ring() const
size_t numColumns() const
wrapper for the flint fmpq_t integer representation
void swap(mpfr::mpreal &x, mpfr::mpreal &y)