linbox
test-matrix-utils.h File Reference

Utilities for tests on matrices. More...

#include "fflas-ffpack/utils/Matio.h"

Namespaces

namespace  LinBox
 Namespace in which all linbox code resides.
 

Macros

#define RAPPORT(a)
 
#define TESTE(a)
 
#define element_t(Field)
 

Functions

size_t & RandIntInInt (const size_t &s, size_t &RIII, const int &seed=0)
 gives a random number such that \(0 \leq RIII < s\).
 
void RandomPermutation (size_t *P, const size_t &len)
 Creates a random Lapack style Permutation P of size len.
 
int permutationDet (size_t *P, const size_t len)
 
template<class Field>
bool CheckRank (const Field &F, const typename Field ::Element *A, const size_t &m, const size_t &n, const size_t &lda, const size_t &alledged_rank)
 Checks we got the right rank.
 
template<class Field>
bool CheckRank (const Field &F, const BlasMatrix< Field > &A, const size_t &alledged_rank)
 
template<class Field>
bool CheckRank (const Field &F, const BlasSubmatrix< Field > &A, const size_t &alledged_rank)
 
template<class Field>
bool CheckDet (const Field &F, const typename Field ::Element *A, const size_t &m, const size_t &lda, const typename Field ::Element &alledged_det)
 
template<class Field>
void RandomMatrixWithRank (const Field &F, typename Field ::Element *A, const size_t &m, const size_t &n, const size_t &lda, const size_t &rank)
 Builds a m x n random matrix of rank rank over field F.
 
template<class Field>
void RandomMatrixWithDet (const Field &F, typename Field ::Element *A, const size_t &m, const size_t &lda, const typename Field ::Element &det)
 Builds a m x m random matrix of determinant det over field F.
 

Detailed Description

Utilities for tests on matrices.

Warning
this should better written and shared among the tests
Bug
put in matrix/random-matrix.h

Macro Definition Documentation

◆ RAPPORT

#define RAPPORT ( a)
Value:
if (pass) { \
commentator().report() << "\t \033[1;36m<<<\033[0;m \t" << (a) << " passed :)" << std::endl; \
} \
else { \
commentator().report() << "\t \033[1; 31m!!!\033[0;m \t " << (a) << " failed :(" << std::endl ; \
exit(-1); \
}

◆ TESTE

#define TESTE ( a)
Value:
commentator().report() << "\t \033[1;35m>>>\033[0;m \t testing " << (a) << " :" << std::endl ;
Commentator & commentator()
Definition commentator.h:998

◆ element_t

#define element_t ( Field)
Value:
typename Field ::Element