FFLAS-FFPACK
Data Structures | Functions
FFPACK Namespace Reference

Finite Field PACK Set of elimination based routines for dense linear algebra. More...

Data Structures

class  Failure
 A precondtion failed. More...
 

Functions

void LAPACKPerm2MathPerm (size_t *MathP, const size_t *LapackP, const size_t N)
 Conversion of a permutation from LAPACK format to Math format.
 
void MathPerm2LAPACKPerm (size_t *LapackP, const size_t *MathP, const size_t N)
 Conversion of a permutation from Maths format to LAPACK format.
 
template<class Field >
void applyP (const Field &F, const FFLAS::FFLAS_SIDE Side, const FFLAS::FFLAS_TRANSPOSE Trans, const size_t M, const size_t ibeg, const size_t iend, typename Field::Element_ptr A, const size_t lda, const size_t *P)
 Computes P1 x Diag (I_R, P2) where P1 is a LAPACK and P2 a LAPACK permutation and store the result in P1 as a LAPACK permutation. More...
 
template<class Field >
void MonotonicApplyP (const Field &F, const FFLAS::FFLAS_SIDE Side, const FFLAS::FFLAS_TRANSPOSE Trans, const size_t M, const size_t ibeg, const size_t iend, typename Field::Element_ptr A, const size_t lda, const size_t *P, const size_t R)
 Apply a R-monotonically increasing permutation P, to the matrix A. More...
 
template<class Field >
void fgetrs (const Field &F, const FFLAS::FFLAS_SIDE Side, const size_t M, const size_t N, const size_t R, typename Field::Element_ptr A, const size_t lda, const size_t *P, const size_t *Q, typename Field::Element_ptr B, const size_t ldb, int *info)
 Solve the system $A X = B$ or $X A = B$. More...
 
template<class Field >
Field::Element_ptr fgetrs (const Field &F, const FFLAS::FFLAS_SIDE Side, const size_t M, const size_t N, const size_t NRHS, const size_t R, typename Field::Element_ptr A, const size_t lda, const size_t *P, const size_t *Q, typename Field::Element_ptr X, const size_t ldx, typename Field::ConstElement_ptr B, const size_t ldb, int *info)
 Solve the system A X = B or X A = B. More...
 
template<class Field >
size_t fgesv (const Field &F, const FFLAS::FFLAS_SIDE Side, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, typename Field::Element_ptr B, const size_t ldb, int *info)
 Square system solver. More...
 
template<class Field >
size_t fgesv (const Field &F, const FFLAS::FFLAS_SIDE Side, const size_t M, const size_t N, const size_t NRHS, typename Field::Element_ptr A, const size_t lda, typename Field::Element_ptr X, const size_t ldx, typename Field::ConstElement_ptr B, const size_t ldb, int *info)
 Rectangular system solver. More...
 
template<class Field >
void ftrtri (const Field &F, const FFLAS::FFLAS_UPLO Uplo, const FFLAS::FFLAS_DIAG Diag, const size_t N, typename Field::Element_ptr A, const size_t lda, const size_t threshold=__FFLASFFPACK_FTRTRI_THRESHOLD)
 Compute the inverse of a triangular matrix. More...
 
template<class Field >
void ftrtrm (const Field &F, const FFLAS::FFLAS_SIDE side, const FFLAS::FFLAS_DIAG diag, const size_t N, typename Field::Element_ptr A, const size_t lda)
 Compute the product of two triangular matrices of opposite shape. More...
 
template<class Field >
void ftrstr (const Field &F, const FFLAS::FFLAS_SIDE side, const FFLAS::FFLAS_UPLO Uplo, const FFLAS::FFLAS_DIAG diagA, const FFLAS::FFLAS_DIAG diagB, const size_t N, typename Field::ConstElement_ptr A, const size_t lda, typename Field::Element_ptr B, const size_t ldb, const size_t threshold=64)
 Solve a triangular system with a triangular right hand side of the same shape. More...
 
template<class Field >
void ftrssyr2k (const Field &F, const FFLAS::FFLAS_UPLO Uplo, const FFLAS::FFLAS_DIAG diagA, const size_t N, typename Field::ConstElement_ptr A, const size_t lda, typename Field::Element_ptr B, const size_t ldb, const size_t threshold=64)
 Solve a triangular system in a symmetric sum: find B upper/lower triangular such that A^T B + B^T A = C where C is symmetric. More...
 
template<class Field >
bool fsytrf (const Field &F, const FFLAS::FFLAS_UPLO UpLo, const size_t N, typename Field::Element_ptr A, const size_t lda, const size_t threshold=__FFLASFFPACK_FSYTRF_THRESHOLD)
 Triangular factorization of symmetric matrices. More...
 
template<class Field >
bool fsytrf_nonunit (const Field &F, const FFLAS::FFLAS_UPLO UpLo, const size_t N, typename Field::Element_ptr A, const size_t lda, typename Field::Element_ptr D, const size_t incD, const size_t threshold=__FFLASFFPACK_FSYTRF_THRESHOLD)
 Triangular factorization of symmetric matrices. More...
 
template<class Field >
size_t PLUQ (const Field &F, const FFLAS::FFLAS_DIAG Diag, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, size_t *P, size_t *Q)
 Compute a PLUQ factorization of the given matrix. More...
 
template<class Field >
size_t LUdivine (const Field &F, const FFLAS::FFLAS_DIAG Diag, const FFLAS::FFLAS_TRANSPOSE trans, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, size_t *P, size_t *Qt, const FFPACK_LU_TAG LuTag=FfpackSlabRecursive, const size_t cutoff=__FFLASFFPACK_LUDIVINE_THRESHOLD)
 Compute the CUP or PLE factorization of the given matrix. More...
 
template<class Field >
size_t ColumnEchelonForm (const Field &F, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, size_t *P, size_t *Qt, bool transform=false, const FFPACK_LU_TAG LuTag=FfpackSlabRecursive)
 Compute the Column Echelon form of the input matrix in-place. More...
 
template<class Field >
size_t RowEchelonForm (const Field &F, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, size_t *P, size_t *Qt, const bool transform=false, const FFPACK_LU_TAG LuTag=FfpackSlabRecursive)
 Compute the Row Echelon form of the input matrix in-place. More...
 
template<class Field >
size_t ReducedColumnEchelonForm (const Field &F, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, size_t *P, size_t *Qt, const bool transform=false, const FFPACK_LU_TAG LuTag=FfpackSlabRecursive)
 Compute the Reduced Column Echelon form of the input matrix in-place. More...
 
template<class Field >
size_t ReducedRowEchelonForm (const Field &F, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, size_t *P, size_t *Qt, const bool transform=false, const FFPACK_LU_TAG LuTag=FfpackSlabRecursive)
 Compute the Reduced Row Echelon form of the input matrix in-place. More...
 
template<class Field >
Field::Element_ptr Invert (const Field &F, const size_t M, typename Field::Element_ptr A, const size_t lda, int &nullity)
 Invert the given matrix in place or computes its nullity if it is singular. More...
 
template<class Field >
Field::Element_ptr Invert (const Field &F, const size_t M, typename Field::ConstElement_ptr A, const size_t lda, typename Field::Element_ptr X, const size_t ldx, int &nullity)
 Invert the given matrix or computes its nullity if it is singular. More...
 
template<class Field >
Field::Element_ptr Invert2 (const Field &F, const size_t M, typename Field::Element_ptr A, const size_t lda, typename Field::Element_ptr X, const size_t ldx, int &nullity)
 Invert the given matrix or computes its nullity if it is singular. More...
 
template<class PolRing >
std::list< typename PolRing::Element > & CharPoly (const PolRing &R, std::list< typename PolRing::Element > &charp, const size_t N, typename PolRing::Domain_t::Element_ptr A, const size_t lda, typename PolRing::Domain_t::RandIter &G, const FFPACK_CHARPOLY_TAG CharpTag=FfpackAuto, const size_t degree=__FFLASFFPACK_ARITHPROG_THRESHOLD)
 Compute the characteristic polynomial of the matrix A. More...
 
template<class PolRing >
PolRing::Element & CharPoly (const PolRing &R, typename PolRing::Element &charp, const size_t N, typename PolRing::Domain_t::Element_ptr A, const size_t lda, typename PolRing::Domain_t::RandIter &G, const FFPACK_CHARPOLY_TAG CharpTag=FfpackAuto, const size_t degree=__FFLASFFPACK_ARITHPROG_THRESHOLD)
 Compute the characteristic polynomial of the matrix A. More...
 
template<class PolRing >
PolRing::Element & CharPoly (const PolRing &R, typename PolRing::Element &charp, const size_t N, typename PolRing::Domain_t::Element_ptr A, const size_t lda, const FFPACK_CHARPOLY_TAG CharpTag=FfpackAuto, const size_t degree=__FFLASFFPACK_ARITHPROG_THRESHOLD)
 Compute the characteristic polynomial of the matrix A. More...
 
template<class Field , class Polynomial >
Polynomial & MinPoly (const Field &F, Polynomial &minP, const size_t N, typename Field::ConstElement_ptr A, const size_t lda)
 Compute the minimal polynomial of the matrix A. More...
 
template<class Field , class Polynomial , class RandIter >
Polynomial & MinPoly (const Field &F, Polynomial &minP, const size_t N, typename Field::ConstElement_ptr A, const size_t lda, RandIter &G)
 Compute the minimal polynomial of the matrix A. More...
 
template<class Field , class Polynomial >
Polynomial & MatVecMinPoly (const Field &F, Polynomial &minP, const size_t N, typename Field::ConstElement_ptr A, const size_t lda, typename Field::ConstElement_ptr v, const size_t incv)
 Compute the minimal polynomial of the matrix A and a vector v, namely the first linear dependency relation in the Krylov basis $(v,Av, ..., A^Nv)$. More...
 
template<class Field >
size_t Rank (const Field &F, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda)
 Computes the rank of the given matrix using a PLUQ factorization. More...
 
template<class Field >
bool IsSingular (const Field &F, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda)
 Returns true if the given matrix is singular. More...
 
template<class Field >
Field::Element & Det (const Field &F, typename Field::Element &det, const size_t N, typename Field::Element_ptr A, const size_t lda, size_t *P=NULL, size_t *Q=NULL)
 Returns the determinant of the given square matrix. More...
 
template<class Field >
Field::Element_ptr Solve (const Field &F, const size_t M, typename Field::Element_ptr A, const size_t lda, typename Field::Element_ptr x, const int incx, typename Field::ConstElement_ptr b, const int incb)
 Solves a linear system AX = b using PLUQ factorization. More...
 
template<class Field >
*void RandomNullSpaceVector (const Field &F, const FFLAS::FFLAS_SIDE Side, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, typename Field::Element_ptr X, const size_t incX)
 Solve L X = B or X L = B in place. More...
 
template<class Field >
size_t NullSpaceBasis (const Field &F, const FFLAS::FFLAS_SIDE Side, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, typename Field::Element_ptr &NS, size_t &ldn, size_t &NSdim)
 Computes a basis of the Left/Right nullspace of the matrix A. More...
 
template<class Field >
size_t RowRankProfile (const Field &F, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, size_t *&rkprofile, const FFPACK_LU_TAG LuTag=FfpackSlabRecursive)
 Computes the row rank profile of A. More...
 
template<class Field >
size_t ColumnRankProfile (const Field &F, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, size_t *&rkprofile, const FFPACK_LU_TAG LuTag=FfpackSlabRecursive)
 Computes the column rank profile of A. More...
 
void RankProfileFromLU (const size_t *P, const size_t N, const size_t R, size_t *rkprofile, const FFPACK_LU_TAG LuTag)
 Recovers the column/row rank profile from the permutation of an LU decomposition. More...
 
size_t LeadingSubmatrixRankProfiles (const size_t M, const size_t N, const size_t R, const size_t LSm, const size_t LSn, const size_t *P, const size_t *Q, size_t *RRP, size_t *CRP)
 Recovers the row and column rank profiles of any leading submatrix from the PLUQ decomposition. More...
 
template<class Field >
size_t RowRankProfileSubmatrixIndices (const Field &F, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, size_t *&rowindices, size_t *&colindices, size_t &R)
 RowRankProfileSubmatrixIndices. More...
 
template<class Field >
size_t ColRankProfileSubmatrixIndices (const Field &F, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, size_t *&rowindices, size_t *&colindices, size_t &R)
 Computes the indices of the submatrix r*r X of A whose columns correspond to the column rank profile of A. More...
 
template<class Field >
size_t RowRankProfileSubmatrix (const Field &F, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, typename Field::Element_ptr &X, size_t &R)
 Computes the r*r submatrix X of A, by picking the row rank profile rows of A. More...
 
template<class Field >
size_t ColRankProfileSubmatrix (const Field &F, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, typename Field::Element_ptr &X, size_t &R)
 Compute the $ r\times r$ submatrix X of A, by picking the row rank profile rows of A. More...
 
template<class Field >
void getTriangular (const Field &F, const FFLAS::FFLAS_UPLO Uplo, const FFLAS::FFLAS_DIAG diag, const size_t M, const size_t N, const size_t R, typename Field::ConstElement_ptr A, const size_t lda, typename Field::Element_ptr T, const size_t ldt, const bool OnlyNonZeroVectors=false)
 Extracts a triangular matrix from a compact storage A=L\U of rank R. More...
 
template<class Field >
void getTriangular (const Field &F, const FFLAS::FFLAS_UPLO Uplo, const FFLAS::FFLAS_DIAG diag, const size_t M, const size_t N, const size_t R, typename Field::Element_ptr A, const size_t lda)
 Cleans up a compact storage A=L\U to reveal a triangular matrix of rank R. More...
 
template<class Field >
void getEchelonForm (const Field &F, const FFLAS::FFLAS_UPLO Uplo, const FFLAS::FFLAS_DIAG diag, const size_t M, const size_t N, const size_t R, const size_t *P, typename Field::ConstElement_ptr A, const size_t lda, typename Field::Element_ptr T, const size_t ldt, const bool OnlyNonZeroVectors=false, const FFPACK_LU_TAG LuTag=FfpackSlabRecursive)
 Extracts a matrix in echelon form from a compact storage A=L\U of rank R obtained by RowEchelonForm or ColumnEchelonForm. More...
 
template<class Field >
void getEchelonForm (const Field &F, const FFLAS::FFLAS_UPLO Uplo, const FFLAS::FFLAS_DIAG diag, const size_t M, const size_t N, const size_t R, const size_t *P, typename Field::Element_ptr A, const size_t lda, const FFPACK_LU_TAG LuTag=FfpackSlabRecursive)
 Cleans up a compact storage A=L\U obtained by RowEchelonForm or ColumnEchelonForm to reveal an echelon form of rank R. More...
 
template<class Field >
void getEchelonTransform (const Field &F, const FFLAS::FFLAS_UPLO Uplo, const FFLAS::FFLAS_DIAG diag, const size_t M, const size_t N, const size_t R, const size_t *P, const size_t *Q, typename Field::ConstElement_ptr A, const size_t lda, typename Field::Element_ptr T, const size_t ldt, const FFPACK_LU_TAG LuTag=FfpackSlabRecursive)
 Extracts a transformation matrix to echelon form from a compact storage A=L\U of rank R obtained by RowEchelonForm or ColumnEchelonForm. More...
 
template<class Field >
void getReducedEchelonForm (const Field &F, const FFLAS::FFLAS_UPLO Uplo, const size_t M, const size_t N, const size_t R, const size_t *P, typename Field::ConstElement_ptr A, const size_t lda, typename Field::Element_ptr T, const size_t ldt, const bool OnlyNonZeroVectors=false, const FFPACK_LU_TAG LuTag=FfpackSlabRecursive)
 Extracts a matrix in echelon form from a compact storage A=L\U of rank R obtained by ReducedRowEchelonForm or ReducedColumnEchelonForm with transform = true. More...
 
template<class Field >
void getReducedEchelonForm (const Field &F, const FFLAS::FFLAS_UPLO Uplo, const size_t M, const size_t N, const size_t R, const size_t *P, typename Field::Element_ptr A, const size_t lda, const FFPACK_LU_TAG LuTag=FfpackSlabRecursive)
 Cleans up a compact storage A=L\U of rank R obtained by ReducedRowEchelonForm or ReducedColumnEchelonForm with transform = true. More...
 
template<class Field >
void getReducedEchelonTransform (const Field &F, const FFLAS::FFLAS_UPLO Uplo, const size_t M, const size_t N, const size_t R, const size_t *P, const size_t *Q, typename Field::ConstElement_ptr A, const size_t lda, typename Field::Element_ptr T, const size_t ldt, const FFPACK_LU_TAG LuTag=FfpackSlabRecursive)
 Extracts a transformation matrix to echelon form from a compact storage A=L\U of rank R obtained by RowEchelonForm or ColumnEchelonForm. More...
 
void PLUQtoEchelonPermutation (const size_t N, const size_t R, const size_t *P, size_t *outPerm)
 Auxiliary routine: determines the permutation that changes a PLUQ decomposition into a echelon form revealing PLUQ decomposition.
 
template<class Field >
size_t LTBruhatGen (const Field &Fi, const FFLAS::FFLAS_DIAG diag, const size_t N, typename Field::Element_ptr A, const size_t lda, size_t *P, size_t *Q)
 LTBruhatGen Suppose A is Left Triangular Matrix This procedure computes the Bruhat Representation of A and return the rank of A. More...
 
template<class Field >
void getLTBruhatGen (const Field &Fi, const size_t N, const size_t r, const size_t *P, const size_t *Q, typename Field::Element_ptr R, const size_t ldr)
 GetLTBruhatGen This procedure Computes the Rank Revealing Matrix based on the Bruhta representation of a Matrix. More...
 
template<class Field >
void getLTBruhatGen (const Field &Fi, const FFLAS::FFLAS_UPLO Uplo, const FFLAS::FFLAS_DIAG diag, const size_t N, const size_t r, const size_t *P, const size_t *Q, typename Field::ConstElement_ptr A, const size_t lda, typename Field::Element_ptr T, const size_t ldt)
 GetLTBruhatGen This procedure computes the matrix L or U f the Bruhat Representation Suppose that A is the bruhat representation of a matrix. More...
 
size_t LTQSorder (const size_t N, const size_t r, const size_t *P, const size_t *Q)
 LTQSorder This procedure computes the order of quasiseparability of a matrix. More...
 
template<class Field >
size_t CompressToBlockBiDiagonal (const Field &Fi, const FFLAS::FFLAS_UPLO Uplo, size_t N, size_t s, size_t r, const size_t *P, const size_t *Q, typename Field::Element_ptr A, size_t lda, typename Field::Element_ptr X, size_t ldx, size_t *K, size_t *M, size_t *T)
 CompressToBlockBiDiagonal This procedure compress a compact representation of a row echelon form or column echelon form. More...
 
template<class Field >
void ExpandBlockBiDiagonalToBruhat (const Field &Fi, const FFLAS::FFLAS_UPLO Uplo, size_t N, size_t s, size_t r, typename Field::Element_ptr A, size_t lda, typename Field::Element_ptr X, size_t ldx, size_t NbBlocks, size_t *K, size_t *M, size_t *T)
 ExpandBlockBiDiagonal This procedure expand a compact representation of a row echelon form or column echelon form. More...
 
void Bruhat2EchelonPermutation (size_t N, size_t R, const size_t *P, const size_t *Q, size_t *M)
 Bruhat2EchelonPermutation (N,R,P,Q) Compute M such that LM or MU is in echelon form where L or U are factors of the Bruhat Rpresentation. More...
 
template<class Field >
void productBruhatxTS (const Field &Fi, size_t N, size_t s, size_t r, const size_t *P, const size_t *Q, const typename Field::Element_ptr Xu, size_t ldu, size_t NbBlocksU, size_t *Ku, size_t *Tu, size_t *MU, const typename Field::Element_ptr Xl, size_t ldl, size_t NbBlocksL, size_t *Kl, size_t *Tl, size_t *ML, typename Field::Element_ptr B, size_t t, size_t ldb, typename Field::Element_ptr C, size_t ldc)
 productBruhatxTS Comput the product between the CRE compact representation of a matrix A and B a tall matrix
 
template<class Field >
Field::Element_ptr LQUPtoInverseOfFullRankMinor (const Field &F, const size_t rank, typename Field::Element_ptr A_factors, const size_t lda, const size_t *QtPointer, typename Field::Element_ptr X, const size_t ldx)
 LQUPtoInverseOfFullRankMinor. More...
 
template<class Field >
void RandomNullSpaceVector (const Field &F, const FFLAS::FFLAS_SIDE Side, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, typename Field::Element_ptr X, const size_t incX)
 Solve L X = B or X L = B in place. More...
 
template<class Field >
Field::Element_ptr expandLCRE (const Field &Fi, size_t N, size_t s, size_t r, size_t *R, size_t i, typename Field::ConstElement_ptr Xu, size_t ldu, size_t NbBlocksU, const size_t *Ku, const size_t *Tuinv, typename Field::ConstElement_ptr Xl, size_t ldl, size_t NbBlocksL, const size_t *Kl, const size_t *Tlinv, typename Field::Element_ptr CRE, size_t ldcre)
 Expands an anti-diagonal block of a left triangular matrix from its compact Bruhat representation.
 
template<class Field >
void productBruhatxTS (const Field &Fi, size_t N, size_t s, size_t r, size_t t, const size_t *P, const size_t *Q, typename Field::ConstElement_ptr Xu, size_t ldu, size_t NbBlocksU, const size_t *Ku, const size_t *Tu, const size_t *MU, typename Field::ConstElement_ptr Xl, size_t ldl, size_t NbBlocksL, const size_t *Kl, const size_t *Tl, const size_t *ML, typename Field::Element_ptr B, size_t ldb, const typename Field::Element beta, typename Field::Element_ptr D, size_t ldd)
 Compute the product of a left-triangular quasi-separable matrix A, represented by a compact Bruhat generator, with a dense rectangular matrix B: $ C \gets A \times B + beta C $. More...
 
template<class Field >
Field::Element_ptr buildMatrix (const Field &F, typename Field::ConstElement_ptr E, typename Field::ConstElement_ptr C, const size_t lda, const size_t *B, const size_t *T, const size_t me, const size_t mc, const size_t lambda, const size_t mu)
 
template<class Field >
size_t fsytrf_UP_RPM (const Field &Fi, const size_t N, typename Field::Element_ptr A, const size_t lda, typename Field::Element_ptr Dinv, const size_t incDinv, size_t *P, size_t BCThreshold)
 
template<class Field >
size_t LUdivine (const Field &F, const FFLAS::FFLAS_DIAG Diag, const FFLAS::FFLAS_TRANSPOSE trans, const size_t M, const size_t N, typename Field::Element_ptr A, const size_t lda, size_t *P, size_t *Q, const FFPACK::FFPACK_LU_TAG LuTag, const size_t cutoff)
 
void composePermutationsLLL (size_t *P1, const size_t *P2, const size_t R, const size_t N)
 Computes P1 x Diag (I_R, P2) where P1 is a LAPACK and P2 a LAPACK permutation and store the result in P1 as a LAPACK permutation. More...
 
void composePermutationsLLM (size_t *MathP, const size_t *P1, const size_t *P2, const size_t R, const size_t N)
 Computes P1 x Diag (I_R, P2) where P1 is a LAPACK and P2 a LAPACK permutation and store the result in MathP as a MathPermutation format. More...
 
void composePermutationsMLM (size_t *MathP1, const size_t *P2, const size_t R, const size_t N)
 Computes MathP1 x Diag (I_R, P2) where MathP1 is a MathPermutation and P2 a LAPACK permutation and store the result in MathP1 as a MathPermutation format. More...
 
template<class Field , class RandIter >
Field::Element_ptr NonZeroRandomMatrix (const Field &F, size_t m, size_t n, typename Field::Element_ptr A, size_t lda, RandIter &G)
 Random non-zero Matrix. More...
 
template<class Field , class RandIter >
Field::Element_ptr NonZeroRandomMatrix (const Field &F, size_t m, size_t n, typename Field::Element_ptr A, size_t lda)
 Random non-zero Matrix. More...
 
template<class Field , class RandIter >
Field::Element_ptr RandomMatrix (const Field &F, size_t m, size_t n, typename Field::Element_ptr A, size_t lda, RandIter &G)
 Random Matrix. More...
 
template<class Field >
Field::Element_ptr RandomMatrix (const Field &F, size_t m, size_t n, typename Field::Element_ptr A, size_t lda)
 Random Matrix. More...
 
template<class Field , class RandIter >
Field::Element_ptr RandomTriangularMatrix (const Field &F, size_t m, size_t n, const FFLAS::FFLAS_UPLO UpLo, const FFLAS::FFLAS_DIAG Diag, bool nonsingular, typename Field::Element_ptr A, size_t lda, RandIter &G)
 Random Triangular Matrix. More...
 
template<class Field >
Field::Element_ptr RandomTriangularMatrix (const Field &F, size_t m, size_t n, const FFLAS::FFLAS_UPLO UpLo, const FFLAS::FFLAS_DIAG Diag, bool nonsingular, typename Field::Element_ptr A, size_t lda)
 Random Triangular Matrix. More...
 
template<class Field , class RandIter >
Field::Element_ptr RandomSymmetricMatrix (const Field &F, size_t n, bool nonsingular, typename Field::Element_ptr A, size_t lda, RandIter &G)
 Random Symmetric Matrix. More...
 
template<class Field , class RandIter >
Field::Element_ptr RandomMatrixWithRank (const Field &F, size_t m, size_t n, size_t r, typename Field::Element_ptr A, size_t lda, RandIter &G)
 Random Matrix with prescribed rank. More...
 
template<class Field >
Field::Element_ptr RandomMatrixWithRank (const Field &F, size_t m, size_t n, size_t r, typename Field::Element_ptr A, size_t lda)
 Random Matrix with prescribed rank. More...
 
size_t * RandomIndexSubset (size_t N, size_t R, size_t *P)
 Pick uniformly at random a sequence of R distinct elements from the set $ \{0,\dots, N-1\}$ using Knuth's shuffle. More...
 
size_t * RandomPermutation (size_t N, size_t *P)
 Pick uniformly at random a permutation of size N stored in LAPACK format using Knuth's shuffle. More...
 
void RandomRankProfileMatrix (size_t M, size_t N, size_t R, size_t *rows, size_t *cols)
 Pick uniformly at random an R-subpermutation of dimension M x N : a matrix with only R non-zeros equal to one, in a random rook placement. More...
 
void RandomSymmetricRankProfileMatrix (size_t N, size_t R, size_t *rows, size_t *cols)
 Pick uniformly at random a symmetric R-subpermutation of dimension N x N : a symmetric matrix with only R non-zeros, all equal to one, in a random rook placement. More...
 
template<class Field , class RandIter >
Field::Element_ptr RandomMatrixWithRankandRPM (const Field &F, size_t M, size_t N, size_t R, typename Field::Element_ptr A, size_t lda, const size_t *RRP, const size_t *CRP, RandIter &G)
 Random Matrix with prescribed rank and rank profile matrix Creates an m x n matrix with random entries and rank r. More...
 
template<class Field >
Field::Element_ptr RandomMatrixWithRankandRPM (const Field &F, size_t M, size_t N, size_t R, typename Field::Element_ptr A, size_t lda, const size_t *RRP, const size_t *CRP)
 Random Matrix with prescribed rank and rank profile matrix Creates an m x n matrix with random entries and rank r. More...
 
template<class Field , class RandIter >
Field::Element_ptr RandomSymmetricMatrixWithRankandRPM (const Field &F, size_t N, size_t R, typename Field::Element_ptr A, size_t lda, const size_t *RRP, const size_t *CRP, RandIter &G)
 Random Symmetric Matrix with prescribed rank and rank profile matrix Creates an n x n symmetric matrix with random entries and rank r. More...
 
template<class Field >
Field::Element_ptr RandomSymmetricMatrixWithRankandRPM (const Field &F, size_t M, size_t N, size_t R, typename Field::Element_ptr A, size_t lda, const size_t *RRP, const size_t *CRP)
 Random Symmetric Matrix with prescribed rank and rank profile matrix Creates an n x n symmetric matrix with random entries and rank r. More...
 
template<class Field , class RandIter >
Field::Element_ptr RandomMatrixWithRankandRandomRPM (const Field &F, size_t M, size_t N, size_t R, typename Field::Element_ptr A, size_t lda, RandIter &G)
 Random Matrix with prescribed rank, with random rank profile matrix Creates an m x n matrix with random entries, rank r and with a rank profile matrix chosen uniformly at random. More...
 
template<class Field >
Field::Element_ptr RandomMatrixWithRankandRandomRPM (const Field &F, size_t M, size_t N, size_t R, typename Field::Element_ptr A, size_t lda)
 Random Matrix with prescribed rank, with random rank profile matrix Creates an m x n matrix with random entries, rank r and with a rank profile matrix chosen uniformly at random. More...
 
template<class Field , class RandIter >
Field::Element_ptr RandomSymmetricMatrixWithRankandRandomRPM (const Field &F, size_t N, size_t R, typename Field::Element_ptr A, size_t lda, RandIter &G)
 Random Symmetric Matrix with prescribed rank, with random rank profile matrix Creates an n x n matrix with random entries, rank r and with a rank profile matrix chosen uniformly at random. More...
 
template<class Field >
Field::Element_ptr RandomSymmetricMatrixWithRankandRandomRPM (const Field &F, size_t N, size_t R, typename Field::Element_ptr A, size_t lda)
 Random Symmetric Matrix with prescribed rank, with random rank profile matrix Creates an n x n matrix with random entries, rank r and with a rank profile matrix chosen uniformly at random. More...
 
template<class Field >
Field::Element_ptr RandomMatrixWithDet (const Field &F, size_t n, const typename Field::Element d, typename Field::Element_ptr A, size_t lda)
 Random Matrix with prescribed det. More...
 
template<class Field , class RandIter >
Field::Element_ptr RandomMatrixWithDet (const Field &F, size_t n, const typename Field::Element d, typename Field::Element_ptr A, size_t lda, RandIter &G)
 Random Matrix with prescribed det. More...
 

Detailed Description

Finite Field PACK Set of elimination based routines for dense linear algebra.

This namespace enlarges the set of BLAS routines of the class FFLAS, with higher level routines based on elimination.

Function Documentation

◆ applyP()

void applyP ( const Field &  F,
const FFLAS::FFLAS_SIDE  Side,
const FFLAS::FFLAS_TRANSPOSE  Trans,
const size_t  M,
const size_t  ibeg,
const size_t  iend,
typename Field::Element_ptr  A,
const size_t  lda,
const size_t *  P 
)
inline

Computes P1 x Diag (I_R, P2) where P1 is a LAPACK and P2 a LAPACK permutation and store the result in P1 as a LAPACK permutation.

Parameters
[in,out]P1a LAPACK permutation of size N
P2a LAPACK permutation of size N-R

Applies a permutation P to the matrix A. Apply a permutation P, stored in the LAPACK format (a sequence of transpositions) between indices ibeg and iend of P to (iend-ibeg) vectors of size M stored in A (as column for NoTrans and rows for Trans). Side==FFLAS::FflasLeft for row permutation Side==FFLAS::FflasRight for a column permutation Trans==FFLAS::FflasTrans for the inverse permutation of P

Parameters
Fbase field
Sidedecides if rows (FflasLeft) or columns (FflasRight) are permuted
Transdecides if the matrix is seen as columns (FflasTrans) or rows (FflasNoTrans)
Msize of the elements to permute
ibegfirst index to consider in P
iendlast index to consider in P
Ainput matrix
ldaleading dimension of A
Ppermutation in LAPACK format
psh(optional): a sequential or parallel helper, to choose between sequential or parallel execution
Warning
not sure the submatrix is still a permutation and the one we expect in all cases... examples for iend=2, ibeg=1 and P=[2,2,2]

◆ MonotonicApplyP()

void MonotonicApplyP ( const Field &  F,
const FFLAS::FFLAS_SIDE  Side,
const FFLAS::FFLAS_TRANSPOSE  Trans,
const size_t  M,
const size_t  ibeg,
const size_t  iend,
typename Field::Element_ptr  A,
const size_t  lda,
const size_t *  P,
const size_t  R 
)
inline

Apply a R-monotonically increasing permutation P, to the matrix A.

MonotonicApplyP Apply a permutation defined by the first R entries of the vector P (the pivots).

The permutation represented by P is defined as follows:

  • the first R values of P is a LAPACK reprensentation (a sequence of transpositions)
  • the remaining iend-ibeg-R values of the permutation are in a monotonically increasing progression Side==FFLAS::FflasLeft for row permutation Side==FFLAS::FflasRight for a column permutation Trans==FFLAS::FflasTrans for the inverse permutation of P
    Parameters
    Fbase field
    Sideselects if it is a row (FflasLeft) or column (FflasRight) permutation
    Transinverse permutation (FflasTrans/NoTrans)
    M
    ibeg
    iend
    Ainput matrix
    ldaleading dimension of A
    PLAPACK permuation
    Rfirst values of P
    The non pivot elements, are located in montonically increasing order.

◆ fgetrs() [1/2]

void fgetrs ( const Field &  F,
const FFLAS::FFLAS_SIDE  Side,
const size_t  M,
const size_t  N,
const size_t  R,
typename Field::Element_ptr  A,
const size_t  lda,
const size_t *  P,
const size_t *  Q,
typename Field::Element_ptr  B,
const size_t  ldb,
int *  info 
)

Solve the system $A X = B$ or $X A = B$.

Solving using the PLUQ decomposition of A already computed inplace with PLUQ (FFLAS::FflasNonUnit). Version for A square. If A is rank deficient, a solution is returned if the system is consistent, Otherwise an info is 1

Parameters
Fbase field
SideDetermine wheter the resolution is left (FflasLeft) or right (FflasRight) looking.
Mrow dimension of B
Ncol dimension of B
Rrank of A
Ainput matrix
ldaleading dimension of A
Prow permutation of the PLUQ decomposition of A
Qcolumn permutation of the PLUQ decomposition of A
BRight/Left hand side matrix. Initially stores B, finally stores the solution X.
ldbleading dimension of B
infoSuccess of the computation: 0 if successfull, >0 if system is inconsistent

◆ fgetrs() [2/2]

Field::Element_ptr fgetrs ( const Field &  F,
const FFLAS::FFLAS_SIDE  Side,
const size_t  M,
const size_t  N,
const size_t  NRHS,
const size_t  R,
typename Field::Element_ptr  A,
const size_t  lda,
const size_t *  P,
const size_t *  Q,
typename Field::Element_ptr  X,
const size_t  ldx,
typename Field::ConstElement_ptr  B,
const size_t  ldb,
int *  info 
)

Solve the system A X = B or X A = B.

Solving using the PLUQ decomposition of A already computed inplace with PLUQ(FFLAS::FflasNonUnit). Version for A rectangular. If A is rank deficient, a solution is returned if the system is consistent, Otherwise an info is 1

Parameters
Fbase field
SideDetermine wheter the resolution is left (FflasLeft) or right (FflasRight) looking.
Mrow dimension of A
Ncol dimension of A
NRHSnumber of columns (if Side = FFLAS::FflasLeft) or row (if Side = FFLAS::FflasRight) of the matrices X and B
Rrank of A
Ainput matrix
ldaleading dimension of A
Prow permutation of the PLUQ decomposition of A
Qcolumn permutation of the PLUQ decomposition of A
Xsolution matrix
ldxleading dimension of X
BRight/Left hand side matrix.
ldbleading dimension of B
infoSucces of the computation: 0 if successfull, >0 if system is inconsistent

◆ fgesv() [1/2]

size_t fgesv ( const Field &  F,
const FFLAS::FFLAS_SIDE  Side,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
typename Field::Element_ptr  B,
const size_t  ldb,
int *  info 
)

Square system solver.

Parameters
FThe computation domain
SideDetermine wheter the resolution is left (FflasLeft) or right (FflasRight) looking
Mrow dimension of B
Ncol dimension of B
Ainput matrix
ldaleading dimension of A
BRight/Left hand side matrix. Initially contains B, finally contains the solution X.
ldbleading dimension of B
infoSuccess of the computation: 0 if successfull, >0 if system is inconsistent
Returns
the rank of the system

Solve the system A X = B or X A = B. Version for A square. If A is rank deficient, a solution is returned if the system is consistent, Otherwise an info is 1

◆ fgesv() [2/2]

size_t fgesv ( const Field &  F,
const FFLAS::FFLAS_SIDE  Side,
const size_t  M,
const size_t  N,
const size_t  NRHS,
typename Field::Element_ptr  A,
const size_t  lda,
typename Field::Element_ptr  X,
const size_t  ldx,
typename Field::ConstElement_ptr  B,
const size_t  ldb,
int *  info 
)

Rectangular system solver.

Parameters
FThe computation domain
SideDetermine wheter the resolution is left (FflasLeft) or right (FflasRight) looking
Mrow dimension of A
Ncol dimension of A
NRHSnumber of columns (if Side = FFLAS::FflasLeft) or row (if Side = FFLAS::FflasRight) of the matrices X and B
Ainput matrix
ldaleading dimension of A
BRight/Left hand side matrix. Initially contains B, finally contains the solution X.
ldbleading dimension of B
X
ldx
infoSuccess of the computation: 0 if successfull, >0 if system is inconsistent
Returns
the rank of the system

Solve the system A X = B or X A = B. Version for A square. If A is rank deficient, a solution is returned if the system is consistent, Otherwise an info is 1

◆ ftrtri()

void ftrtri ( const Field &  F,
const FFLAS::FFLAS_UPLO  Uplo,
const FFLAS::FFLAS_DIAG  Diag,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
const size_t  threshold = __FFLASFFPACK_FTRTRI_THRESHOLD 
)

Compute the inverse of a triangular matrix.

Parameters
Fbase field
Uplowhether the matrix is upper or lower triangular
Diagwhether the matrix is unit diagonal (FflasUnit/NoUnit)
Ninput matrix order
Athe input matrix
ldaleading dimension of A

◆ ftrtrm()

void ftrtrm ( const Field &  F,
const FFLAS::FFLAS_SIDE  side,
const FFLAS::FFLAS_DIAG  diag,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda 
)

Compute the product of two triangular matrices of opposite shape.

Product UL or LU of the upper, resp lower triangular matrices U and L stored one above the other in the square matrix A.

Parameters
Fbase field
Sideset to FflasLeft to compute the product UL, FflasRight to compute LU
diagwhether the matrix U is unit diagonal (FflasUnit/NoUnit)
Ninput matrix order
Athe input matrix
ldaleading dimension of A

◆ ftrstr()

void ftrstr ( const Field &  F,
const FFLAS::FFLAS_SIDE  side,
const FFLAS::FFLAS_UPLO  Uplo,
const FFLAS::FFLAS_DIAG  diagA,
const FFLAS::FFLAS_DIAG  diagB,
const size_t  N,
typename Field::ConstElement_ptr  A,
const size_t  lda,
typename Field::Element_ptr  B,
const size_t  ldb,
const size_t  threshold = 64 
)
inline

Solve a triangular system with a triangular right hand side of the same shape.

Parameters
Fbase field
Sideset to FflasLeft to compute U1^-1*U2 or L1^-1*L2, FflasRight to compute U1*U2^-1 or L1*L2^-1
Uplowhether the matrix A is upper or lower triangular
diag1whether the matrix U1 or L2 is unit diagonal (FflasUnit/NoUnit)
diag2whether the matrix U2 or L2 is unit diagonal (FflasUnit/NoUnit)
Norder of the input matrices
Athe input matrix to be inverted (U1 or L1)
ldaleading dimension of A
Bthe input right hand side (U2 or L2)
ldbleading dimension of B

◆ ftrssyr2k()

void ftrssyr2k ( const Field &  F,
const FFLAS::FFLAS_UPLO  Uplo,
const FFLAS::FFLAS_DIAG  diagA,
const size_t  N,
typename Field::ConstElement_ptr  A,
const size_t  lda,
typename Field::Element_ptr  B,
const size_t  ldb,
const size_t  threshold = 64 
)
inline

Solve a triangular system in a symmetric sum: find B upper/lower triangular such that A^T B + B^T A = C where C is symmetric.

C is overwritten by B.

Parameters
Fbase field
Sideset to FflasLeft to compute U1^-1*U2 or L1^-1*L2, FflasRight to compute U1*U2^-1 or L1*L2^-1
Uplowhether the matrix A is upper or lower triangular
diagAwhether the matrix A is unit diagonal (FflasUnit/NoUnit)
Norder of the input matrices
Athe input matrix
ldaleading dimension of A
[in,out]Bthe input right hand side where the output is written
ldbleading dimension of B

◆ fsytrf()

bool fsytrf ( const Field &  F,
const FFLAS::FFLAS_UPLO  UpLo,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
const size_t  threshold = __FFLASFFPACK_FSYTRF_THRESHOLD 
)

Triangular factorization of symmetric matrices.

Parameters
FThe computation domain
UpLoDetermine wheter to store the upper (FflasUpper) or lower (FflasLower) triangular factor
Norder of the matrix A
[in,out]Ainput matrix
ldaleading dimension of A
Returns
false if the A does not have generic rank profile, making the computation fail.

Compute the a triangular factorization of the matrix A: $ A = L \times D \times  L^T$ if UpLo = FflasLower or $ A = U^T \times D \times  U$ otherwise. D is a diagonal matrix. The matrices L and U are unit diagonal lower (resp. upper) triangular and overwrite the input matrix A. The matrix D is stored on the diagonal of A, as the diagonal of L or U is known to be all ones. If A does not have generic rank profile, the LDLT or UTDU factorizations is not defined, and the algorithm returns false.

◆ fsytrf_nonunit()

bool fsytrf_nonunit ( const Field &  F,
const FFLAS::FFLAS_UPLO  UpLo,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
typename Field::Element_ptr  D,
const size_t  incD,
const size_t  threshold = __FFLASFFPACK_FSYTRF_THRESHOLD 
)

Triangular factorization of symmetric matrices.

Parameters
FThe computation domain
UpLoDetermine wheter to store the upper (FflasUpper) or lower (FflasLower) triangular factor
Norder of the matrix A
[in,out]Ainput matrix
[in,out]D
ldaleading dimension of A
Returns
false if the A does not have generic rank profile, making the computation fail.

Compute the a triangular factorization of the matrix A: $ A = L \times Dinv \times  L^T$ if UpLo = FflasLower or $ A = U^T \times D \times  U$ otherwise. D is a diagonal matrix. The matrices L and U are lower (resp. upper) triangular and overwrite the input matrix A. The matrix D need to be stored separately, as the diagonal of L or U are not unit. If A does not have generic rank profile, the LDLT or UTDU factorizations is not defined, and the algorithm returns false.

◆ PLUQ()

size_t PLUQ ( const Field &  F,
const FFLAS::FFLAS_DIAG  Diag,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
size_t *  P,
size_t *  Q 
)
inline

Compute a PLUQ factorization of the given matrix.

Return its rank. The permutations P and Q are represented using LAPACK's convention.

Parameters
Fbase field
Diagwhether U should have a unit diagonal (FflasUnit) or not (FflasNoUnit)
Mmatrix row dimension
Nmatrix column dimension
Ainput matrix
ldaleading dimension of A
Pthe row permutation
Qthe column permutation
Returns
the rank of A
Bibliography:
  • Dumas J-G., Pernet C., and Sultan Z. Simultaneous computation of the row and column rank profiles , ISSAC'13, 2013

◆ LUdivine() [1/2]

size_t LUdivine ( const Field &  F,
const FFLAS::FFLAS_DIAG  Diag,
const FFLAS::FFLAS_TRANSPOSE  trans,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
size_t *  P,
size_t *  Qt,
const FFPACK_LU_TAG  LuTag = FfpackSlabRecursive,
const size_t  cutoff = __FFLASFFPACK_LUDIVINE_THRESHOLD 
)

Compute the CUP or PLE factorization of the given matrix.

Using a block algorithm and return its rank. The permutations P and Q are represented using LAPACK's convention.

Parameters
Fbase field
Diagwhether the transformation matrix (U of the CUP, L of the PLE) should have a unit diagonal (FflasUnit) or not (FflasNoUnit)
transwhether to compute the CUP decomposition (FflasNoTrans) or the PLE decomposition (FflasTrans)
Mmatrix row dimension
Nmatrix column dimension
Ainput matrix
ldaleading dimension of A
Pthe factor of CUP or PLE
Qa permutation indicating the pivot position in the echelon form C or E in its first r positions
LuTagflag for setting the earling termination if the matrix is singular
cutoffthreshold to basecase
Returns
the rank of A
Bibliography:
  • Jeannerod C-P, Pernet, C. and Storjohann, A. Rank-profile revealing Gaussian elimination and the CUP matrix decomposition , J. of Symbolic Comp., 2013
  • Pernet C, Brassel M LUdivine, une divine factorisation LU, 2002

◆ ColumnEchelonForm()

size_t ColumnEchelonForm ( const Field &  F,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
size_t *  P,
size_t *  Qt,
bool  transform = false,
const FFPACK_LU_TAG  LuTag = FfpackSlabRecursive 
)
inline

Compute the Column Echelon form of the input matrix in-place.

If LuTag == FfpackTileRecursive, then after the computation A = [ M \ V ] such that AU = C is a column echelon decomposition of A, with U = P^T [ V ] and C = M + Q [ Ir ] [ 0 In-r ] [ 0 ] If LuTag == FfpackTileRecursive then A = [ N \ V ] such that the same holds with M = Q N

Qt = Q^T If transform=false, the matrix V is not computed. See also test-colechelon for an example of use

Parameters
Fbase field
Mnumber of rows
Nnumber of columns
[in]Ainput matrix
ldaleading dimension of A
Pthe column permutation
Qtthe row position of the pivots in the echelon form
transformdecides whether V is computed
LuTagchooses the elimination algorithm. SlabRecursive for LUdivine, TileRecursive for PLUQ

◆ RowEchelonForm()

size_t RowEchelonForm ( const Field &  F,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
size_t *  P,
size_t *  Qt,
const bool  transform = false,
const FFPACK_LU_TAG  LuTag = FfpackSlabRecursive 
)
inline

Compute the Row Echelon form of the input matrix in-place.

If LuTag == FfpackTileRecursive, then after the computation A = [ L \ M ] such that X A = R is a row echelon decomposition of A, with X = [ L 0 ] P and R = M + [Ir 0] Q^T [ In-r] If LuTag == FfpackTileRecursive then A = [ L \ N ] such that the same holds with M = N Q^T Qt = Q^T If transform=false, the matrix L is not computed. See also test-rowechelon for an example of use

Parameters
Fbase field
Mnumber of rows
Nnumber of columns
[in]Athe input matrix
ldaleading dimension of A
Pthe row permutation
Qtthe column position of the pivots in the echelon form
transformdecides whether L is computed
LuTagchooses the elimination algorithm. SlabRecursive for LUdivine, TileRecursive for PLUQ

◆ ReducedColumnEchelonForm()

size_t ReducedColumnEchelonForm ( const Field &  F,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
size_t *  P,
size_t *  Qt,
const bool  transform = false,
const FFPACK_LU_TAG  LuTag = FfpackSlabRecursive 
)
inline

Compute the Reduced Column Echelon form of the input matrix in-place.

After the computation A = [ V ] such that AX = R is a reduced col echelon [ M 0 ] decomposition of A, where X = P^T [ V ] and R = Q [ Ir ] [ 0 In-r ] [ M 0 ] Qt = Q^T If transform=false, the matrix X is not computed and the matrix A = R

Parameters
Fbase field
Mnumber of rows
Nnumber of columns
[in]Ainput matrix
ldaleading dimension of A
Pthe column permutation
Qtthe row position of the pivots in the echelon form
transformdecides whether X is computed
LuTagchooses the elimination algorithm. SlabRecursive for LUdivine, TileRecursive for PLUQ

◆ ReducedRowEchelonForm()

size_t ReducedRowEchelonForm ( const Field &  F,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
size_t *  P,
size_t *  Qt,
const bool  transform = false,
const FFPACK_LU_TAG  LuTag = FfpackSlabRecursive 
)
inline

Compute the Reduced Row Echelon form of the input matrix in-place.

After the computation A = [ V1 M ] such that X A = R is a reduced row echelon [ V2 0 ] decomposition of A, where X = [ V1 0 ] P and R = [ Ir M ] Q^T [ V2 In-r ] [ 0 ] Qt = Q^T If transform=false, the matrix X is not computed and the matrix A = R

Parameters
Fbase field
Mnumber of rows
Nnumber of columns
[in]Ainput matrix
ldaleading dimension of A
Pthe row permutation
Qtthe column position of the pivots in the echelon form
transformdecides whether X is computed
LuTagchooses the elimination algorithm. SlabRecursive for LUdivine, TileRecursive for PLUQ

◆ Invert() [1/2]

Field::Element_ptr Invert ( const Field &  F,
const size_t  M,
typename Field::Element_ptr  A,
const size_t  lda,
int &  nullity 
)

Invert the given matrix in place or computes its nullity if it is singular.

An inplace $2n^3$ algorithm is used.

Parameters
FThe computation domain
Morder of the matrix
[in,out]Ainput matrix ( $M \times M$)
ldaleading dimension of A
nullitydimension of the kernel of A
Returns
pointer to $A$ and $A \gets A^{-1}$

◆ Invert() [2/2]

Field::Element_ptr Invert ( const Field &  F,
const size_t  M,
typename Field::ConstElement_ptr  A,
const size_t  lda,
typename Field::Element_ptr  X,
const size_t  ldx,
int &  nullity 
)

Invert the given matrix or computes its nullity if it is singular.

Precondition
X is preallocated and should be large enough to store the $ m \times m$ matrix A.
Parameters
FThe computation domain
Morder of the matrix
[in]Ainput matrix ( $M \times M$)
ldaleading dimension of A
[out]Xthis is the inverse of A if A is invertible (non NULL and $ \mathtt{nullity} = 0$). It is untouched otherwise.
ldxleading dimension of X
nullitydimension of the kernel of A
Returns
pointer to $X = A^{-1}$

◆ Invert2()

Field::Element_ptr Invert2 ( const Field &  F,
const size_t  M,
typename Field::Element_ptr  A,
const size_t  lda,
typename Field::Element_ptr  X,
const size_t  ldx,
int &  nullity 
)

Invert the given matrix or computes its nullity if it is singular.

An $2n^3f$ algorithm is used. This routine can be % faster than FFPACK::Invert but is not totally inplace.

Precondition
X is preallocated and should be large enough to store the $ m \times m$ matrix A.
Warning
A is overwritten here !
Bug:
not tested.
Parameters
Fthe computation domain
Morder of the matrix
[in,out]Ainput matrix ( $M \times M$). On output, A is modified and represents a "psycological" factorisation LU.
ldaleading dimension of A
[out]Xthis is the inverse of A if A is invertible (non NULL and $ \mathtt{nullity} = 0$). It is untouched otherwise.
ldxleading dimension of X
nullitydimension of the kernel of A
Returns
pointer to $X = A^{-1}$
Todo:
this init is not all necessary (done after ftrtri)
Todo:
this init is not all necessary (done after ftrtri)

◆ CharPoly() [1/3]

std::list< typename PolRing::Element > & CharPoly ( const PolRing &  R,
std::list< typename PolRing::Element > &  charp,
const size_t  N,
typename PolRing::Domain_t::Element_ptr  A,
const size_t  lda,
typename PolRing::Domain_t::RandIter &  G,
const FFPACK_CHARPOLY_TAG  CharpTag = FfpackAuto,
const size_t  degree = __FFLASFFPACK_ARITHPROG_THRESHOLD 
)
inline

Compute the characteristic polynomial of the matrix A.

Parameters
Rthe polynomial ring of charp (contains the base field)
[out]charpthe characteristic polynomial of as a list of factors
Norder of the matrix A
[in]Athe input matrix ( $ N \times N$) (could be overwritten in some algorithmic variants)
ldaleading dimension of A
CharpTagthe algorithmic variant
Ga random iterator (required for the randomized variants LUKrylov and ArithProg)

◆ CharPoly() [2/3]

PolRing::Element & CharPoly ( const PolRing &  R,
typename PolRing::Element &  charp,
const size_t  N,
typename PolRing::Domain_t::Element_ptr  A,
const size_t  lda,
typename PolRing::Domain_t::RandIter &  G,
const FFPACK_CHARPOLY_TAG  CharpTag = FfpackAuto,
const size_t  degree = __FFLASFFPACK_ARITHPROG_THRESHOLD 
)
inline

Compute the characteristic polynomial of the matrix A.

Parameters
Rthe polynomial ring of charp (contains the base field)
[out]charpthe characteristic polynomial of as a single polynomial
Norder of the matrix A
[in]Athe input matrix ( $ N \times N$) (could be overwritten in some algorithmic variants)
ldaleading dimension of A
CharpTagthe algorithmic variant
Ga random iterator (required for the randomized variants LUKrylov and ArithProg)

◆ CharPoly() [3/3]

PolRing::Element & CharPoly ( const PolRing &  R,
typename PolRing::Element &  charp,
const size_t  N,
typename PolRing::Domain_t::Element_ptr  A,
const size_t  lda,
const FFPACK_CHARPOLY_TAG  CharpTag = FfpackAuto,
const size_t  degree = __FFLASFFPACK_ARITHPROG_THRESHOLD 
)
inline

Compute the characteristic polynomial of the matrix A.

Parameters
Rthe polynomial ring of charp (contains the base field)
[out]charpthe characteristic polynomial of as a single polynomial
Norder of the matrix A
[in]Athe input matrix ( $ N \times N$) (could be overwritten in some algorithmic variants)
ldaleading dimension of A
CharpTagthe algorithmic variant

◆ MinPoly() [1/2]

Polynomial & MinPoly ( const Field &  F,
Polynomial &  minP,
const size_t  N,
typename Field::ConstElement_ptr  A,
const size_t  lda 
)
inline

Compute the minimal polynomial of the matrix A.

The algorithm is randomized probabilistic, and computes the minimal polynomial of the Krylov iterates of a random vector: (v, Av, .., A^kv)

Parameters
Fthe base field
[out]minPthe minimal polynomial of A
Norder of the matrix A
[in]Athe input matrix ( $ N \times N$)
ldaleading dimension of A

◆ MinPoly() [2/2]

Polynomial & MinPoly ( const Field &  F,
Polynomial &  minP,
const size_t  N,
typename Field::ConstElement_ptr  A,
const size_t  lda,
RandIter &  G 
)
inline

Compute the minimal polynomial of the matrix A.

The algorithm is randomized probabilistic, and computes the minimal polynomial of the Krylov iterates of a random vector: (v, Av, .., A^kv)

Parameters
Fthe base field
[out]minPthe minimal polynomial of A
Norder of the matrix A
[in]Athe input matrix ( $ N \times N$)
ldaleading dimension of A
Ga random iterator

◆ MatVecMinPoly()

Polynomial & MatVecMinPoly ( const Field &  F,
Polynomial &  minP,
const size_t  N,
typename Field::ConstElement_ptr  A,
const size_t  lda,
typename Field::ConstElement_ptr  v,
const size_t  incv 
)
inline

Compute the minimal polynomial of the matrix A and a vector v, namely the first linear dependency relation in the Krylov basis $(v,Av, ..., A^Nv)$.

Parameters
Fthe base field
[out]minPthe minimal polynomial of A and v
Norder of the matrix A
[in]Athe input matrix ( $ N \times N$)
ldaleading dimension of A
Kan $ N \times (N+1)$ matrix containing the vector v on its first row
ldkleading dimension of K
P[out] (optional) the permutation used in the elimination of the Krylov matrix K

◆ Rank()

size_t Rank ( const Field &  F,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda 
)

Computes the rank of the given matrix using a PLUQ factorization.

The input matrix is modified.

Parameters
Fbase field
Mrow dimension of the matrix
Ncolumn dimension of the matrix
[in]Ainput matrix
ldaleading dimension of A
psH(optional) a ParSeqHelper to choose between sequential and parallel execution

◆ IsSingular()

bool IsSingular ( const Field &  F,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda 
)

Returns true if the given matrix is singular.

The method is a block elimination with early termination

using LQUP factorization with early termination. If M != N, then the matrix is virtually padded with zeros to make it square and it's determinant is zero.

Warning
The input matrix is modified.
Parameters
Fbase field
Mrow dimension of the matrix
Ncolumn dimension of the matrix.
[in,out]Ainput matrix
ldaleading dimension of A

◆ Det()

Field::Element & Det ( const Field &  F,
typename Field::Element &  det,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
size_t *  P = NULL,
size_t *  Q = NULL 
)
inline

Returns the determinant of the given square matrix.

The method is a block elimination using PLUQ factorization. The input matrix A is overwritten.

Warning
The input matrix is modified.
Parameters
Fbase field
[out]detthe determinant of A
Nthe order of the square matrix A.
[in,out]Ainput matrix
ldaleading dimension of A
psH(optional) a ParSeqHelper to choose between sequential and parallel execution
P,Q(optional) row and column permutations to be used by the PLUQ factorization. randomized checkers (see cherckes/checker_det.inl) need them for certification

◆ Solve()

Field::Element_ptr Solve ( const Field &  F,
const size_t  M,
typename Field::Element_ptr  A,
const size_t  lda,
typename Field::Element_ptr  x,
const int  incx,
typename Field::ConstElement_ptr  b,
const int  incb 
)
inline

Solves a linear system AX = b using PLUQ factorization.

@oaram F base field @oaram M matrix order

Parameters
[in]Ainput matrix
ldaleading dimension of A
[out]xoutput solution vector
incxincrement of x
binput right hand side of the system
incbincrement of b

◆ RandomNullSpaceVector() [1/2]

*void RandomNullSpaceVector ( const Field &  F,
const FFLAS::FFLAS_SIDE  Side,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
typename Field::Element_ptr  X,
const size_t  incX 
)

Solve L X = B or X L = B in place.

L is M*M if Side == FFLAS::FflasLeft and N*N if Side == FFLAS::FflasRight, B is M*N. Only the R non trivial column of L are stored in the M*R matrix L Requirement : so that L could be expanded in-place Computes a vector of the Left/Right nullspace of the matrix A.

Parameters
FThe computation domain
Sidedecides whether it computes the left (FflasLeft) or right (FflasRight) nullspace
Mnumber of rows
Nnumber of columns
[in,out]Ainput matrix of dimension M x N, A is modified to its LU version
ldaleading dimension of A
[out]Xoutput vector
incXincrement of X

◆ NullSpaceBasis()

size_t NullSpaceBasis ( const Field &  F,
const FFLAS::FFLAS_SIDE  Side,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
typename Field::Element_ptr &  NS,
size_t &  ldn,
size_t &  NSdim 
)

Computes a basis of the Left/Right nullspace of the matrix A.

return the dimension of the nullspace.

Parameters
FThe computation domain
Sidedecides whether it computes the left (FflasLeft) or right (FflasRight) nullspace
Mnumber of rows
Nnumber of columns
[in,out]Ainput matrix of dimension M x N, A is modified
ldaleading dimension of A
[out]NSoutput matrix of dimension N x NSdim (allocated here)
[out]ldnleading dimension of NS
[out]NSdimthe dimension of the Nullspace (N-rank(A))

◆ RowRankProfile()

size_t RowRankProfile ( const Field &  F,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
size_t *&  rkprofile,
const FFPACK_LU_TAG  LuTag = FfpackSlabRecursive 
)
inline

Computes the row rank profile of A.

Parameters
Fbase field
Mnumber of rows
Nnumber of columns
[in]Ainput matrix of dimension M x N
ldaleading dimension of A
[out]rkprofilereturn the rank profile as an array of row indexes, of dimension r=rank(A)
LuTagchooses the elimination algorithm. SlabRecursive for LUdivine, TileRecursive for PLUQ

A is modified rkprofile is allocated during the computation.

Returns
R

◆ ColumnRankProfile()

size_t ColumnRankProfile ( const Field &  F,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
size_t *&  rkprofile,
const FFPACK_LU_TAG  LuTag = FfpackSlabRecursive 
)
inline

Computes the column rank profile of A.

Parameters
Fbase field
Mnumber of rows
Nnumber of columns
[in]Ainput matrix of dimension
ldaleading dimension of A
[out]rkprofilereturn the rank profile as an array of row indexes, of dimension r=rank(A)
LuTagchooses the elimination algorithm. SlabRecursive for LUdivine, TileRecursive for PLUQ

A is modified rkprofile is allocated during the computation.

Returns
R

◆ RankProfileFromLU()

void RankProfileFromLU ( const size_t *  P,
const size_t  N,
const size_t  R,
size_t *  rkprofile,
const FFPACK_LU_TAG  LuTag 
)
inline

Recovers the column/row rank profile from the permutation of an LU decomposition.

Works with both the CUP/PLE decompositions (obtained by LUdivine) or the PLUQ decomposition. Assumes that the output vector containing the rank profile is already allocated.

Parameters
Pthe permutation carrying the rank profile information
Nthe row/col dimension for a row/column rank profile
Rthe rank of the matrix
[out]rkprofilereturn the rank profile as an array of indices
LuTagchooses the elimination algorithm. SlabRecursive for LUdivine, TileRecursive for PLUQ

◆ LeadingSubmatrixRankProfiles()

size_t LeadingSubmatrixRankProfiles ( const size_t  M,
const size_t  N,
const size_t  R,
const size_t  LSm,
const size_t  LSn,
const size_t *  P,
const size_t *  Q,
size_t *  RRP,
size_t *  CRP 
)
inline

Recovers the row and column rank profiles of any leading submatrix from the PLUQ decomposition.

Only works with the PLUQ decomposition Assumes that the output vectors containing the rank profiles are already allocated.

Parameters
Pthe permutation carrying the rank profile information
Mthe row dimension of the initial matrix
Nthe column dimension of the initial matrix
Rthe rank of the initial matrix
LSmthe row dimension of the leading submatrix considered
LSnthe column dimension of the leading submatrix considered
Pthe row permutation of the PLUQ decomposition
Qthe column permutation of the PLUQ decomposition
RRPreturn the row rank profile of the leading submatrix
Returns
the rank of the LSm x LSn leading submatrix

A is modified

Bibliography:
  • Dumas J-G., Pernet C., and Sultan Z. Simultaneous computation of the row and column rank profiles , ISSAC'13.

◆ RowRankProfileSubmatrixIndices()

size_t RowRankProfileSubmatrixIndices ( const Field &  F,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
size_t *&  rowindices,
size_t *&  colindices,
size_t &  R 
)

RowRankProfileSubmatrixIndices.

Computes the indices of the submatrix r*r X of A whose rows correspond to the row rank profile of A.

Parameters
Fbase field
Mnumber of rows
Nnumber of columns
[in]Ainput matrix of dimension
rowindicesarray of the row indices of X in A
colindicesarray of the col indices of X in A
ldaleading dimension of A
[out]Rlist of indices

rowindices and colindices are allocated during the computation. A is modified

Returns
R

◆ ColRankProfileSubmatrixIndices()

size_t ColRankProfileSubmatrixIndices ( const Field &  F,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
size_t *&  rowindices,
size_t *&  colindices,
size_t &  R 
)

Computes the indices of the submatrix r*r X of A whose columns correspond to the column rank profile of A.

Parameters
Fbase field
Mnumber of rows
Nnumber of columns
[in]Ainput matrix of dimension
rowindicesarray of the row indices of X in A
colindicesarray of the col indices of X in A
ldaleading dimension of A
[out]Rlist of indices

rowindices and colindices are allocated during the computation.

Warning
A is modified
Returns
R

◆ RowRankProfileSubmatrix()

size_t RowRankProfileSubmatrix ( const Field &  F,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
typename Field::Element_ptr &  X,
size_t &  R 
)

Computes the r*r submatrix X of A, by picking the row rank profile rows of A.

Parameters
Fbase field
Mnumber of rows
Nnumber of columns
[in]Ainput matrix of dimension M x N
ldaleading dimension of A
[out]Xthe output matrix
[out]Rlist of indices

A is not modified X is allocated during the computation.

Returns
R

◆ ColRankProfileSubmatrix()

size_t ColRankProfileSubmatrix ( const Field &  F,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
typename Field::Element_ptr &  X,
size_t &  R 
)

Compute the $ r\times r$ submatrix X of A, by picking the row rank profile rows of A.

Parameters
Fbase field
Mnumber of rows
Nnumber of columns
[in]Ainput matrix of dimension M x N
ldaleading dimension of A
[out]Xthe output matrix
[out]Rlist of indices

A is not modified X is allocated during the computation.

Returns
R

◆ getTriangular() [1/2]

void getTriangular ( const Field &  F,
const FFLAS::FFLAS_UPLO  Uplo,
const FFLAS::FFLAS_DIAG  diag,
const size_t  M,
const size_t  N,
const size_t  R,
typename Field::ConstElement_ptr  A,
const size_t  lda,
typename Field::Element_ptr  T,
const size_t  ldt,
const bool  OnlyNonZeroVectors = false 
)
inline

Extracts a triangular matrix from a compact storage A=L\U of rank R.

if OnlyNonZeroVectors is false, then T and A have the same dimensions Otherwise, T is R x N if UpLo = FflasUpper, else T is M x R

Parameters
Fbase field
UpLoselects if the upper (FflasUpper) or lower (FflasLower) triangular matrix is returned
diagselects if the triangular matrix unit-diagonal (FflasUnit/NoUnit)
Mrow dimension of T
Ncolumn dimension of T
Rrank of the triangular matrix (how many rows/columns need to be copied)
[in]Ainput matrix
ldaleading dimension of A
[out]Toutput matrix
ldtleading dimension of T
OnlyNonZeroVectorsdecides whether the last zero rows/columns should be ignored
Todo:
just one triangular fzero+fassign ?
Todo:
just one triangular fzero+fassign ?

◆ getTriangular() [2/2]

void getTriangular ( const Field &  F,
const FFLAS::FFLAS_UPLO  Uplo,
const FFLAS::FFLAS_DIAG  diag,
const size_t  M,
const size_t  N,
const size_t  R,
typename Field::Element_ptr  A,
const size_t  lda 
)
inline

Cleans up a compact storage A=L\U to reveal a triangular matrix of rank R.

Parameters
Fbase field
UpLoselects if the upper (FflasUpper) or lower (FflasLower) triangular matrix is revealed
diagselects if the triangular matrix unit-diagonal (FflasUnit/NoUnit)
Mrow dimension of A
Ncolumn dimension of A
Rrank of the triangular matrix
[in,out]Ainput/output matrix
ldaleading dimension of A
Todo:
just one triangular fzero+fassign ?
Todo:
just one triangular fzero+fassign ?

◆ getEchelonForm() [1/2]

void getEchelonForm ( const Field &  F,
const FFLAS::FFLAS_UPLO  Uplo,
const FFLAS::FFLAS_DIAG  diag,
const size_t  M,
const size_t  N,
const size_t  R,
const size_t *  P,
typename Field::ConstElement_ptr  A,
const size_t  lda,
typename Field::Element_ptr  T,
const size_t  ldt,
const bool  OnlyNonZeroVectors = false,
const FFPACK_LU_TAG  LuTag = FfpackSlabRecursive 
)
inline

Extracts a matrix in echelon form from a compact storage A=L\U of rank R obtained by RowEchelonForm or ColumnEchelonForm.

Either L or U is in Echelon form (depending on Uplo) The echelon structure is defined by the first R values of the array P. row and column dimension of T are greater or equal to that of A

Parameters
Fbase field
UpLoselects if the upper (FflasUpper) or lower (FflasLower) triangular matrix is returned
diagselects if the echelon matrix has unit pivots (FflasUnit/NoUnit)
Mrow dimension of T
Ncolumn dimension of T
Rrank of the triangular matrix (how many rows/columns need to be copied)
Ppositions of the R pivots
[in]Ainput matrix
ldaleading dimension of A
[out]Toutput matrix
ldtleading dimension of T
OnlyNonZeroVectorsdecides whether the last zero rows/columns should be ignored
LuTagwhich factorized form (CUP/PLE if FfpackSlabRecursive, PLUQ if FfpackTileRecursive)

◆ getEchelonForm() [2/2]

void getEchelonForm ( const Field &  F,
const FFLAS::FFLAS_UPLO  Uplo,
const FFLAS::FFLAS_DIAG  diag,
const size_t  M,
const size_t  N,
const size_t  R,
const size_t *  P,
typename Field::Element_ptr  A,
const size_t  lda,
const FFPACK_LU_TAG  LuTag = FfpackSlabRecursive 
)
inline

Cleans up a compact storage A=L\U obtained by RowEchelonForm or ColumnEchelonForm to reveal an echelon form of rank R.

Either L or U is in Echelon form (depending on Uplo) The echelon structure is defined by the first R values of the array P.

Parameters
Fbase field
UpLoselects if the upper (FflasUpper) or lower (FflasLower) triangular matrix is returned
diagselects if the echelon matrix has unit pivots (FflasUnit/NoUnit)
Mrow dimension of A
Ncolumn dimension of A
Rrank of the triangular matrix (how many rows/columns need to be copied)
Ppositions of the R pivots
[in,out]Ainput/output matrix
ldaleading dimension of A
LuTagwhich factorized form (CUP/PLE if FfpackSlabRecursive, PLUQ if FfpackTileRecursive)

◆ getEchelonTransform()

void getEchelonTransform ( const Field &  F,
const FFLAS::FFLAS_UPLO  Uplo,
const FFLAS::FFLAS_DIAG  diag,
const size_t  M,
const size_t  N,
const size_t  R,
const size_t *  P,
const size_t *  Q,
typename Field::ConstElement_ptr  A,
const size_t  lda,
typename Field::Element_ptr  T,
const size_t  ldt,
const FFPACK_LU_TAG  LuTag = FfpackSlabRecursive 
)
inline

Extracts a transformation matrix to echelon form from a compact storage A=L\U of rank R obtained by RowEchelonForm or ColumnEchelonForm.

If Uplo == FflasLower: T is N x N (already allocated) such that A T = C is a transformation of A in Column echelon form Else T is M x M (already allocated) such that T A = E is a transformation of A in Row Echelon form

Parameters
Fbase field
UpLoLower (FflasLower) means Transformation to Column Echelon Form, Upper (FflasUpper), to Row Echelon Form
diagselects if the echelon matrix has unit pivots (FflasUnit/NoUnit)
Mrow dimension of A
Ncolumn dimension of A
Rrank of the triangular matrix
Ppermutation matrix
[in]Ainput matrix
ldaleading dimension of A
[out]Toutput matrix
ldtleading dimension of T
LuTagwhich factorized form (CUP/PLE if FfpackSlabRecursive, PLUQ if FfpackTileRecursive)

◆ getReducedEchelonForm() [1/2]

void getReducedEchelonForm ( const Field &  F,
const FFLAS::FFLAS_UPLO  Uplo,
const size_t  M,
const size_t  N,
const size_t  R,
const size_t *  P,
typename Field::ConstElement_ptr  A,
const size_t  lda,
typename Field::Element_ptr  T,
const size_t  ldt,
const bool  OnlyNonZeroVectors = false,
const FFPACK_LU_TAG  LuTag = FfpackSlabRecursive 
)
inline

Extracts a matrix in echelon form from a compact storage A=L\U of rank R obtained by ReducedRowEchelonForm or ReducedColumnEchelonForm with transform = true.

Either L or U is in Echelon form (depending on Uplo) The echelon structure is defined by the first R values of the array P. row and column dimension of T are greater or equal to that of A

Parameters
Fbase field
UpLoselects if the upper (FflasUpper) or lower (FflasLower) triangular matrix is returned
diagselects if the echelon matrix has unit pivots (FflasUnit/NoUnit)
Mrow dimension of T
Ncolumn dimension of T
Rrank of the triangular matrix (how many rows/columns need to be copied)
Ppositions of the R pivots
[in]Ainput matrix
ldaleading dimension of A
ldtleading dimension of T
LuTagwhich factorized form (CUP/PLE if FfpackSlabRecursive, PLUQ if FfpackTileRecursive)
OnlyNonZeroVectorsdecides whether the last zero rows/columns should be ignored

◆ getReducedEchelonForm() [2/2]

void getReducedEchelonForm ( const Field &  F,
const FFLAS::FFLAS_UPLO  Uplo,
const size_t  M,
const size_t  N,
const size_t  R,
const size_t *  P,
typename Field::Element_ptr  A,
const size_t  lda,
const FFPACK_LU_TAG  LuTag = FfpackSlabRecursive 
)
inline

Cleans up a compact storage A=L\U of rank R obtained by ReducedRowEchelonForm or ReducedColumnEchelonForm with transform = true.

Either L or U is in Echelon form (depending on Uplo) The echelon structure is defined by the first R values of the array P.

Parameters
Fbase field
UpLoselects if the upper (FflasUpper) or lower (FflasLower) triangular matrix is returned
diagselects if the echelon matrix has unit pivots (FflasUnit/NoUnit)
Mrow dimension of A
Ncolumn dimension of A
Rrank of the triangular matrix (how many rows/columns need to be copied)
Ppositions of the R pivots
[in,out]Ainput/output matrix
ldaleading dimension of A
LuTagwhich factorized form (CUP/PLE if FfpackSlabRecursive, PLUQ if FfpackTileRecursive)

◆ getReducedEchelonTransform()

void getReducedEchelonTransform ( const Field &  F,
const FFLAS::FFLAS_UPLO  Uplo,
const size_t  M,
const size_t  N,
const size_t  R,
const size_t *  P,
const size_t *  Q,
typename Field::ConstElement_ptr  A,
const size_t  lda,
typename Field::Element_ptr  T,
const size_t  ldt,
const FFPACK_LU_TAG  LuTag = FfpackSlabRecursive 
)
inline

Extracts a transformation matrix to echelon form from a compact storage A=L\U of rank R obtained by RowEchelonForm or ColumnEchelonForm.

If Uplo == FflasLower: T is N x N (already allocated) such that A T = C is a transformation of A in Column echelon form Else T is M x M (already allocated) such that T A = E is a transformation of A in Row Echelon form

Parameters
Fbase field
UpLoselects Col (FflasLower) or Row (FflasUpper) Echelon Form
diagselects if the echelon matrix has unit pivots (FflasUnit/NoUnit)
Mrow dimension of A
Ncolumn dimension of A
Rrank of the triangular matrix
Ppermutation matrix
[in]Ainput matrix
ldaleading dimension of A
[out]Toutput matrix
ldtleading dimension of T
LuTagwhich factorized form (CUP/PLE if FfpackSlabRecursive, PLUQ if FfpackTileRecursive)

◆ LTBruhatGen()

size_t LTBruhatGen ( const Field &  Fi,
const FFLAS::FFLAS_DIAG  diag,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
size_t *  P,
size_t *  Q 
)
inline

LTBruhatGen Suppose A is Left Triangular Matrix This procedure computes the Bruhat Representation of A and return the rank of A.

Parameters
Fibase Field
diag
Nsize of A
Athe matrix we search the Bruhat representation
ldathe leading dimension of A
Pa permutation matrix
Qa permutation matrix

◆ getLTBruhatGen() [1/2]

void getLTBruhatGen ( const Field &  Fi,
const size_t  N,
const size_t  r,
const size_t *  P,
const size_t *  Q,
typename Field::Element_ptr  R,
const size_t  ldr 
)
inline

GetLTBruhatGen This procedure Computes the Rank Revealing Matrix based on the Bruhta representation of a Matrix.

Parameters
Fibase Field
Nsize of the matrix
rthe rank of the matrix
Pa permutation matrix
Qa permutation matrix
Rthe matrix that will contain the rank revealing matrix
ldrthe leading fimension of R

◆ getLTBruhatGen() [2/2]

void getLTBruhatGen ( const Field &  Fi,
const FFLAS::FFLAS_UPLO  Uplo,
const FFLAS::FFLAS_DIAG  diag,
const size_t  N,
const size_t  r,
const size_t *  P,
const size_t *  Q,
typename Field::ConstElement_ptr  A,
const size_t  lda,
typename Field::Element_ptr  T,
const size_t  ldt 
)
inline

GetLTBruhatGen This procedure computes the matrix L or U f the Bruhat Representation Suppose that A is the bruhat representation of a matrix.

Parameters
Fibase Field
Uplochoose if the procedure return L or U
diag
Nsize of A
rrank of A
Ppermutaion matrix
Qpermutation matrix
Aa bruhat representation
ldaleading dimension of A
Tmatrix that will contains L or U
ldtleading dimension of T

◆ LTQSorder()

size_t LTQSorder ( const size_t  N,
const size_t  r,
const size_t *  P,
const size_t *  Q 
)
inline

LTQSorder This procedure computes the order of quasiseparability of a matrix.

Parameters
Nsize of the matrix
rrank of the matrix
Ppermutation matrix
Qpermutation matrix

◆ CompressToBlockBiDiagonal()

size_t CompressToBlockBiDiagonal ( const Field &  Fi,
const FFLAS::FFLAS_UPLO  Uplo,
size_t  N,
size_t  s,
size_t  r,
const size_t *  P,
const size_t *  Q,
typename Field::Element_ptr  A,
size_t  lda,
typename Field::Element_ptr  X,
size_t  ldx,
size_t *  K,
size_t *  M,
size_t *  T 
)
inline

CompressToBlockBiDiagonal This procedure compress a compact representation of a row echelon form or column echelon form.

Parameters
Fibase Field
Uplochosse if the procedure is based on row or column
Nsize of the matrix
sorder of qausiseparability
rrank
Ppermutation matrix
Qpermutation matrix
Athe matrix to compact
ldaleading dimension of A
Xmatrix that will stock the representation
ldxleading dimension of X
Kstock the position of the blocks in A
Mpermutation matrix
Tstock the operation done in the procedure

◆ ExpandBlockBiDiagonalToBruhat()

void ExpandBlockBiDiagonalToBruhat ( const Field &  Fi,
const FFLAS::FFLAS_UPLO  Uplo,
size_t  N,
size_t  s,
size_t  r,
typename Field::Element_ptr  A,
size_t  lda,
typename Field::Element_ptr  X,
size_t  ldx,
size_t  NbBlocks,
size_t *  K,
size_t *  M,
size_t *  T 
)
inline

ExpandBlockBiDiagonal This procedure expand a compact representation of a row echelon form or column echelon form.

Parameters
Fibase Field
Uplochosse if the procedure is based on row or column
Nsize of the matrix
sorder of qausiseparability
rrank
Athe matrix that will sotck the expanded representation
ldaleading dimension of A
Xmatrix to expand
ldxleading dimension of X
Kstock the position of the blocks in A
Mpermutation matrix
Tstock the operation done in the procedure

◆ Bruhat2EchelonPermutation()

void Bruhat2EchelonPermutation ( size_t  N,
size_t  R,
const size_t *  P,
const size_t *  Q,
size_t *  M 
)
inline

Bruhat2EchelonPermutation (N,R,P,Q) Compute M such that LM or MU is in echelon form where L or U are factors of the Bruhat Rpresentation.

Parameters
[in]Nsize of the matrix
[in]Rrank
[in]Ppermutation Matrix
[in]Qpermutation Matrix
[out]Moutput permutation matrix

◆ LQUPtoInverseOfFullRankMinor()

Field::Element_ptr LQUPtoInverseOfFullRankMinor ( const Field &  F,
const size_t  rank,
typename Field::Element_ptr  A_factors,
const size_t  lda,
const size_t *  QtPointer,
typename Field::Element_ptr  X,
const size_t  ldx 
)

LQUPtoInverseOfFullRankMinor.

Suppose A has been factorized as L.Q.U.P, with rank r. Then Qt.A.Pt has an invertible leading principal r x r submatrix This procedure efficiently computes the inverse of this minor and puts it into X.

Note
It changes the lower entries of A_factors in the process (NB: unless A was nonsingular and square)
Parameters
Fbase field
rankrank of the matrix.
A_factorsmatrix containing the L and U entries of the factorization
ldaleading dimension of A
QtPointertheLQUP->getQ()->getPointer() (note: getQ returns Qt!)
Xdesired location for output
ldxleading dimension of X

◆ RandomNullSpaceVector() [2/2]

void RandomNullSpaceVector ( const Field &  F,
const FFLAS::FFLAS_SIDE  Side,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
typename Field::Element_ptr  X,
const size_t  incX 
)

Solve L X = B or X L = B in place.

L is M*M if Side == FFLAS::FflasLeft and N*N if Side == FFLAS::FflasRight, B is M*N. Only the R non trivial column of L are stored in the M*R matrix L Requirement : so that L could be expanded in-place Computes a vector of the Left/Right nullspace of the matrix A.

Parameters
FThe computation domain
Sidedecides whether it computes the left (FflasLeft) or right (FflasRight) nullspace
Mnumber of rows
Nnumber of columns
[in,out]Ainput matrix of dimension M x N, A is modified to its LU version
ldaleading dimension of A
[out]Xoutput vector
incXincrement of X

◆ productBruhatxTS()

void productBruhatxTS ( const Field &  Fi,
size_t  N,
size_t  s,
size_t  r,
size_t  t,
const size_t *  P,
const size_t *  Q,
typename Field::ConstElement_ptr  Xu,
size_t  ldu,
size_t  NbBlocksU,
const size_t *  Ku,
const size_t *  Tu,
const size_t *  MU,
typename Field::ConstElement_ptr  Xl,
size_t  ldl,
size_t  NbBlocksL,
const size_t *  Kl,
const size_t *  Tl,
const size_t *  ML,
typename Field::Element_ptr  B,
size_t  ldb,
const typename Field::Element  beta,
typename Field::Element_ptr  D,
size_t  ldd 
)
inline

Compute the product of a left-triangular quasi-separable matrix A, represented by a compact Bruhat generator, with a dense rectangular matrix B: $ C \gets A \times B + beta C $.

Parameters
Fthe base field
Nthe order of A
sthe order of quasiseparability of A
rthe number of pivots in the left-triangular par of the rank profile matrix of A
tthe number of columns of B
Pthe row indices of the pivots of A
Qthe column indices of the pivots of A
Xuthe compact storage of U: Du blocks in the first s rows, Su blocks in the last s rows
ldxuthe leading dimension of Xu
NbBlocksUthe number of diagonal blocks in the compact storage of U
Kuthe list of starting column positions for each block of the storage of U
Tuthe folding matrix for the compact storage of U: $ Du + Tu  Su$ is in row echelon form
Mua permutation matrix such that $ Mu (Du + Tu  Su)$ is the U factor of the Bruhat generator
Xlthe compact storage of L: Dl blocks in the first s columns, Sl blocks in the last s columns
ldxlthe leading dimension of Xl
NbBlocksLthe number of diagonal blocks in the compact storage of L
Klthe list of starting row positions for each block of the storage of L
Tlthe folding matrix for the compact storage of L: $ Dl + Sl  Tl $ is in column echelon form
Mla permutation matrix such that $(Dl + Tl Sl) Ml $ is the L factor of the Bruhat generator
Ban $ N \times t$ dense matrix
ldbleading dimension of B
betascaling constant
[in,out]Coutput matrix
ldcleading dimension of C
Bibliography:
Pernet C. and Storjohann A. Time and space efficient generators for quasiseparable matrices , JSC (85), 2018, doi:10.1016/j.jsc.2017.07.010

◆ buildMatrix()

Field::Element_ptr buildMatrix ( const Field &  F,
typename Field::ConstElement_ptr  E,
typename Field::ConstElement_ptr  C,
const size_t  lda,
const size_t *  B,
const size_t *  T,
const size_t  me,
const size_t  mc,
const size_t  lambda,
const size_t  mu 
)
Bug:
is this :

◆ fsytrf_UP_RPM()

size_t fsytrf_UP_RPM ( const Field &  Fi,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
typename Field::Element_ptr  Dinv,
const size_t  incDinv,
size_t *  P,
size_t  BCThreshold 
)
inline

MathP <-[ [ I ] x P1 | ] [ I_(N1+R2) ] [ P2^T ] | ] x [ P3^T ] [ -----------—|--— ] [ | Q2^T ]

Changing [ U1 V1 | E1 E21 E22 ] into [ U1 E11 E12 V1 E* E* ] [ 0 | L2 \ U2 V21 V22 ] [ U4 V41 0 V42 V43 ] [ 0 | M2 0 0 ] [ U3 0 0 V3 ] [ ---—|-------------— ] [ 0 0 0 ] [ 0 | H1 H21 H22 ] [ 0 | U3 V3 ] [ 0 | 0 ] where U4 is the 2R2 x 2R2 matrix formed by interleaving U2, L2^T and H1

◆ LUdivine() [2/2]

size_t LUdivine ( const Field &  F,
const FFLAS::FFLAS_DIAG  Diag,
const FFLAS::FFLAS_TRANSPOSE  trans,
const size_t  M,
const size_t  N,
typename Field::Element_ptr  A,
const size_t  lda,
size_t *  P,
size_t *  Q,
const FFPACK::FFPACK_LU_TAG  LuTag,
const size_t  cutoff 
)
inline
Todo:
std::swap ?

◆ composePermutationsLLL()

void composePermutationsLLL ( size_t *  P1,
const size_t *  P2,
const size_t  R,
const size_t  N 
)
inline

Computes P1 x Diag (I_R, P2) where P1 is a LAPACK and P2 a LAPACK permutation and store the result in P1 as a LAPACK permutation.

Parameters
[in,out]P1a LAPACK permutation of size N
P2a LAPACK permutation of size N-R

◆ composePermutationsLLM()

void composePermutationsLLM ( size_t *  MathP,
const size_t *  P1,
const size_t *  P2,
const size_t  R,
const size_t  N 
)
inline

Computes P1 x Diag (I_R, P2) where P1 is a LAPACK and P2 a LAPACK permutation and store the result in MathP as a MathPermutation format.

Parameters
[out]

a MathPermutation of size N

Parameters
P1a LAPACK permutation of size N
P2a LAPACK permutation of size N-R

◆ composePermutationsMLM()

void composePermutationsMLM ( size_t *  MathP1,
const size_t *  P2,
const size_t  R,
const size_t  N 
)
inline

Computes MathP1 x Diag (I_R, P2) where MathP1 is a MathPermutation and P2 a LAPACK permutation and store the result in MathP1 as a MathPermutation format.

Parameters
[in,out]MathP1a MathPermutation of size N
P2a LAPACK permutation of size N-R

◆ NonZeroRandomMatrix() [1/2]

Field::Element_ptr NonZeroRandomMatrix ( const Field &  F,
size_t  m,
size_t  n,
typename Field::Element_ptr  A,
size_t  lda,
RandIter &  G 
)
inline

Random non-zero Matrix.

Creates a m x n matrix with random entries, and at least one of them is non zero.

Parameters
Ffield
mnumber of rows in A
nnumber of cols in A
[out]Athe matrix (preallocated to at least m x lda field elements)
ldaleading dimension of A
Ga random iterator
Returns
A.

◆ NonZeroRandomMatrix() [2/2]

Field::Element_ptr NonZeroRandomMatrix ( const Field &  F,
size_t  m,
size_t  n,
typename Field::Element_ptr  A,
size_t  lda 
)
inline

Random non-zero Matrix.

Creates a m x n matrix with random entries, and at least one of them is non zero.

Parameters
Ffield
mnumber of rows in A
nnumber of cols in A
[out]Athe matrix (preallocated to at least m x lda field elements)
ldaleading dimension of A
Returns
A.

◆ RandomMatrix() [1/2]

Field::Element_ptr RandomMatrix ( const Field &  F,
size_t  m,
size_t  n,
typename Field::Element_ptr  A,
size_t  lda,
RandIter &  G 
)
inline

Random Matrix.

Creates a m x n matrix with random entries.

Parameters
Ffield
mnumber of rows in A
nnumber of cols in A
[out]Athe matrix (preallocated to at least m x lda field elements)
ldaleading dimension of A
Ga random iterator
Returns
A.

◆ RandomMatrix() [2/2]

Field::Element_ptr RandomMatrix ( const Field &  F,
size_t  m,
size_t  n,
typename Field::Element_ptr  A,
size_t  lda 
)
inline

Random Matrix.

Creates a m x n matrix with random entries.

Parameters
Ffield
mnumber of rows in A
nnumber of cols in A
[out]Athe matrix (preallocated to at least m x lda field elements)
ldaleading dimension of A
Returns
A.

◆ RandomTriangularMatrix() [1/2]

Field::Element_ptr RandomTriangularMatrix ( const Field &  F,
size_t  m,
size_t  n,
const FFLAS::FFLAS_UPLO  UpLo,
const FFLAS::FFLAS_DIAG  Diag,
bool  nonsingular,
typename Field::Element_ptr  A,
size_t  lda,
RandIter &  G 
)
inline

Random Triangular Matrix.

Creates a m x n triangular matrix with random entries. The UpLo parameter defines wether it is upper or lower triangular.

Parameters
Ffield
mnumber of rows in A
nnumber of cols in A
UpLowhether A is upper or lower triangular
[out]Athe matrix (preallocated to at least m x lda field elements)
ldaleading dimension of A
Ga random iterator
Returns
A.

◆ RandomTriangularMatrix() [2/2]

Field::Element_ptr RandomTriangularMatrix ( const Field &  F,
size_t  m,
size_t  n,
const FFLAS::FFLAS_UPLO  UpLo,
const FFLAS::FFLAS_DIAG  Diag,
bool  nonsingular,
typename Field::Element_ptr  A,
size_t  lda 
)
inline

Random Triangular Matrix.

Creates a m x n triangular matrix with random entries. The UpLo parameter defines wether it is upper or lower triangular.

Parameters
Ffield
mnumber of rows in A
nnumber of cols in A
UpLowhether A is upper or lower triangular
[out]Athe matrix (preallocated to at least m x lda field elements)
ldaleading dimension of A
Returns
A.

◆ RandomSymmetricMatrix()

Field::Element_ptr RandomSymmetricMatrix ( const Field &  F,
size_t  n,
bool  nonsingular,
typename Field::Element_ptr  A,
size_t  lda,
RandIter &  G 
)
inline

Random Symmetric Matrix.

Creates a m x n triangular matrix with random entries. The UpLo parameter defines wether it is upper or lower triangular.

Parameters
Ffield
norder of A
[out]Athe matrix (preallocated to at least n x lda field elements)
ldaleading dimension of A
Ga random iterator
Returns
A.

◆ RandomMatrixWithRank() [1/2]

Field::Element_ptr RandomMatrixWithRank ( const Field &  F,
size_t  m,
size_t  n,
size_t  r,
typename Field::Element_ptr  A,
size_t  lda,
RandIter &  G 
)
inline

Random Matrix with prescribed rank.

Creates an m x n matrix with random entries and rank r.

Parameters
Ffield
mnumber of rows in A
nnumber of cols in A
rrank of the matrix to build
Athe matrix (preallocated to at least m x lda field elements)
ldaleading dimension of A
Ga random iterator
Returns
A.

◆ RandomMatrixWithRank() [2/2]

Field::Element_ptr RandomMatrixWithRank ( const Field &  F,
size_t  m,
size_t  n,
size_t  r,
typename Field::Element_ptr  A,
size_t  lda 
)
inline

Random Matrix with prescribed rank.

Creates an m x n matrix with random entries and rank r.

Parameters
Ffield
mnumber of rows in A
nnumber of cols in A
rrank of the matrix to build
[out]Athe matrix (preallocated to at least m x lda field elements)
ldaleading dimension of A
Returns
A.

◆ RandomIndexSubset()

size_t * RandomIndexSubset ( size_t  N,
size_t  R,
size_t *  P 
)
inline

Pick uniformly at random a sequence of R distinct elements from the set $ \{0,\dots, N-1\}$ using Knuth's shuffle.

Parameters
Nthe cardinality of the sampling set
Rthe number of elements to sample
[out]Pthe output sequence (pre-allocated to at least R indices)

◆ RandomPermutation()

size_t * RandomPermutation ( size_t  N,
size_t *  P 
)
inline

Pick uniformly at random a permutation of size N stored in LAPACK format using Knuth's shuffle.

Parameters
Nthe length of the permutation
[out]Pthe output permutation (pre-allocated to at least N indices)

◆ RandomRankProfileMatrix()

void RandomRankProfileMatrix ( size_t  M,
size_t  N,
size_t  R,
size_t *  rows,
size_t *  cols 
)
inline

Pick uniformly at random an R-subpermutation of dimension M x N : a matrix with only R non-zeros equal to one, in a random rook placement.

Parameters
Mrow dimension
Ncolumn dimension
[out]rowsthe row position of each non zero element (pre-allocated)
[out]colsthe column position of each non zero element (pre-allocated)

◆ RandomSymmetricRankProfileMatrix()

void RandomSymmetricRankProfileMatrix ( size_t  N,
size_t  R,
size_t *  rows,
size_t *  cols 
)
inline

Pick uniformly at random a symmetric R-subpermutation of dimension N x N : a symmetric matrix with only R non-zeros, all equal to one, in a random rook placement.

Parameters
Nmatrix order
[out]rowsthe row position of each non zero element (pre-allocated)
[out]colsthe column position of each non zero element (pre-allocated)

◆ RandomMatrixWithRankandRPM() [1/2]

Field::Element_ptr RandomMatrixWithRankandRPM ( const Field &  F,
size_t  M,
size_t  N,
size_t  R,
typename Field::Element_ptr  A,
size_t  lda,
const size_t *  RRP,
const size_t *  CRP,
RandIter &  G 
)
inline

Random Matrix with prescribed rank and rank profile matrix Creates an m x n matrix with random entries and rank r.

Parameters
Ffield
mnumber of rows in A
nnumber of cols in A
rrank of the matrix to build
Athe matrix (preallocated to at least m x lda field elements)
ldaleading dimension of A
RRPthe R dimensional array with row positions of the rank profile matrix' pivots
CRPthe R dimensional array with column positions of the rank profile matrix' pivots
Ga random iterator
Returns
A.

◆ RandomMatrixWithRankandRPM() [2/2]

Field::Element_ptr RandomMatrixWithRankandRPM ( const Field &  F,
size_t  M,
size_t  N,
size_t  R,
typename Field::Element_ptr  A,
size_t  lda,
const size_t *  RRP,
const size_t *  CRP 
)
inline

Random Matrix with prescribed rank and rank profile matrix Creates an m x n matrix with random entries and rank r.

Parameters
Ffield
mnumber of rows in A
nnumber of cols in A
rrank of the matrix to build
Athe matrix (preallocated to at least m x lda field elements)
ldaleading dimension of A
RRPthe R dimensional array with row positions of the rank profile matrix' pivots
CRPthe R dimensional array with column positions of the rank profile matrix' pivots
Returns
A.

◆ RandomSymmetricMatrixWithRankandRPM() [1/2]

Field::Element_ptr RandomSymmetricMatrixWithRankandRPM ( const Field &  F,
size_t  N,
size_t  R,
typename Field::Element_ptr  A,
size_t  lda,
const size_t *  RRP,
const size_t *  CRP,
RandIter &  G 
)
inline

Random Symmetric Matrix with prescribed rank and rank profile matrix Creates an n x n symmetric matrix with random entries and rank r.

Parameters
Ffield
norder of A
rrank of A
Athe matrix (preallocated to at least n x lda field elements)
ldaleading dimension of A
RRPthe R dimensional array with row positions of the rank profile matrix' pivots
CRPthe R dimensional array with column positions of the rank profile matrix' pivots
Ga random iterator
Returns
A.

◆ RandomSymmetricMatrixWithRankandRPM() [2/2]

Field::Element_ptr RandomSymmetricMatrixWithRankandRPM ( const Field &  F,
size_t  M,
size_t  N,
size_t  R,
typename Field::Element_ptr  A,
size_t  lda,
const size_t *  RRP,
const size_t *  CRP 
)
inline

Random Symmetric Matrix with prescribed rank and rank profile matrix Creates an n x n symmetric matrix with random entries and rank r.

Parameters
Ffield
norder of A
rrank of A
Athe matrix (preallocated to at least n x lda field elements)
ldaleading dimension of A
RRPthe R dimensional array with row positions of the rank profile matrix' pivots
CRPthe R dimensional array with column positions of the rank profile matrix' pivots
Returns
A.

◆ RandomMatrixWithRankandRandomRPM() [1/2]

Field::Element_ptr RandomMatrixWithRankandRandomRPM ( const Field &  F,
size_t  M,
size_t  N,
size_t  R,
typename Field::Element_ptr  A,
size_t  lda,
RandIter &  G 
)
inline

Random Matrix with prescribed rank, with random rank profile matrix Creates an m x n matrix with random entries, rank r and with a rank profile matrix chosen uniformly at random.

Parameters
Ffield
mnumber of rows in A
nnumber of cols in A
rrank of the matrix to build
Athe matrix (preallocated to at least m x lda field elements)
ldaleading dimension of A
Ga random iterator
Returns
A.

◆ RandomMatrixWithRankandRandomRPM() [2/2]

Field::Element_ptr RandomMatrixWithRankandRandomRPM ( const Field &  F,
size_t  M,
size_t  N,
size_t  R,
typename Field::Element_ptr  A,
size_t  lda 
)
inline

Random Matrix with prescribed rank, with random rank profile matrix Creates an m x n matrix with random entries, rank r and with a rank profile matrix chosen uniformly at random.

Parameters
Ffield
mnumber of rows in A
nnumber of cols in A
rrank of the matrix to build
Athe matrix (preallocated to at least m x lda field elements)
ldaleading dimension of A
Returns
A.

◆ RandomSymmetricMatrixWithRankandRandomRPM() [1/2]

Field::Element_ptr RandomSymmetricMatrixWithRankandRandomRPM ( const Field &  F,
size_t  N,
size_t  R,
typename Field::Element_ptr  A,
size_t  lda,
RandIter &  G 
)
inline

Random Symmetric Matrix with prescribed rank, with random rank profile matrix Creates an n x n matrix with random entries, rank r and with a rank profile matrix chosen uniformly at random.

Parameters
Ffield
norder of A
rrank of A
Athe matrix (preallocated to at least n x lda field elements)
ldaleading dimension of A
Ga random iterator
Returns
A.

◆ RandomSymmetricMatrixWithRankandRandomRPM() [2/2]

Field::Element_ptr RandomSymmetricMatrixWithRankandRandomRPM ( const Field &  F,
size_t  N,
size_t  R,
typename Field::Element_ptr  A,
size_t  lda 
)
inline

Random Symmetric Matrix with prescribed rank, with random rank profile matrix Creates an n x n matrix with random entries, rank r and with a rank profile matrix chosen uniformly at random.

Parameters
Ffield
norder of A
rrank of A
Athe matrix (preallocated to at least n x lda field elements)
ldaleading dimension of A
Returns
A.

◆ RandomMatrixWithDet() [1/2]

Field::Element_ptr RandomMatrixWithDet ( const Field &  F,
size_t  n,
const typename Field::Element  d,
typename Field::Element_ptr  A,
size_t  lda 
)
inline

Random Matrix with prescribed det.

Creates a m x n matrix with random entries and rank r.

Parameters
Ffield
dthe prescribed value for the determinant of A
nnumber of cols in A
Athe matrix to be generated (preallocated to at least n x lda field elements)
ldaleading dimension of A
Returns
A.

◆ RandomMatrixWithDet() [2/2]

Field::Element_ptr RandomMatrixWithDet ( const Field &  F,
size_t  n,
const typename Field::Element  d,
typename Field::Element_ptr  A,
size_t  lda,
RandIter &  G 
)
inline

Random Matrix with prescribed det.

Creates a m x n matrix with random entries and rank r.

Parameters
Ffield
dthe prescribed value for the determinant of A
nnumber of cols in A
Athe matrix to be generated (preallocated to at least n x lda field elements)
ldaleading dimension of A
Returns
A.