template<class Polynomial , class Blackbox >
Polynomial & cia (Polynomial &P, const Blackbox &A, const Method::DenseElimination &M)
Algorithm computing the integer characteristic polynomial of a dense matrix.
uint64_t primes_count (size_t pbits)
Lower bound on number of b-bit primes.
template<class Field >
size_t & NullSpaceBasisIn (const Tag::Side Side, BlasMatrix < Field > &A, BlasMatrix < Field > &Ker, size_t &kerdim)
Nullspace of a dense matrix on a finite field.
template<class DenseMat >
size_t & NullSpaceBasisIn (const Tag::Side Side, BlasSubmatrix< DenseMat > &A, BlasMatrix < typename DenseMat::Field > &Ker, size_t &kerdim)
template<class Field >
size_t & NullSpaceBasis (const Tag::Side Side, const BlasMatrix < Field > &A, BlasMatrix < Field > &Ker, size_t &kerdim)
Nullspace of a dense matrix on a finite field.
template<class Field >
size_t NullSpaceBasisIn (const Field &F, const Tag::Side Side, const size_t &m, const size_t &n, typename Field::Element *A, const size_t &lda, typename Field::Element *&Ker, size_t &ldk, size_t &kerdim)
Computes the kernel of a dense matrix using LQUP
.
template<class Ring >
bool partial_hegcd (Ring &Z, typename Ring::Element &e, typename Ring::Element &b, const typename Ring::Element &n, const typename Ring::Element &d, const typename Ring::Element &denBound)
partial_hegcd() sets e, b from the remainder sequence of n,d.
template<class Ring >
int dyadicToRational (const Ring &Z, typename Ring::Element &a, typename Ring::Element &b, const typename Ring::Element &n, const typename Ring::Element &d, const typename Ring::Element &B)
Rational reconstruction of a/b from n/d with denominator bound B.
template<class Blackbox , class MyMethod >
Blackbox::Field::Element & lif_cra_det (typename Blackbox::Field::Element &d, const Blackbox &A, const RingCategories::IntegerTag &tag, const MyMethod &M)
Compute the determinant of A over the integers.
std::vector< cl_platform_id > enumPlatforms ()
Enumerate all of the platforms currently available on the system.
std::string getPlatformName (cl_platform_id platform)
Get the platform name associated with the platform.
double getPlatformVersion (cl_platform_id platform)
Get the platform version associated with the platform.
std::vector< std::string > getPlatformExtensions (cl_platform_id platform)
Get the platform extensions associated with the platform.
std::vector< cl_device_id > enumDevices (cl_platform_id platform)
Enumerate all of the devices currently available on the platform.
cl_context createContext (cl_platform_id platform, cl_device_id device)
Create an OpenCL context from a platfrom and device.
int large_double_division (integer &x, const integer &y, const integer &z)
NO DOC.
template<class Domain >
void reduceIn (Domain &D, std::pair< typename Domain::Element, typename Domain::Element > &frac)
utility function to reduce a rational pair to lowest form
template<class Domain , class Vector >
void vectorGcdIn (typename Domain::Element &result, Domain &D, Vector &v)
utility function to gcd-in a vector of elements over a domain
template<class Domain , class Vector >
Domain::Element vectorGcd (Domain &D, Vector &v)
utility function, returns gcd of a vector of elements over a domain
template<class Domain , class IMatrix >
void create_MatrixQadic (const Domain &D, const IMatrix &Mat , double *chunks, size_t num_chunks, const integer shift)
split an integer matrix into a padic chunk representation
template<class Domain , class Vector >
void create_VectorQadic (const Domain &D, const Vector &V, double *chunks, size_t num_chunks)
split an integer vector into a padic chunk representation
template<class Domain , class Vector >
void create_VectorQadic_32 (const Domain &D, const Vector &V, double *chunks, size_t num_chunks)
split an integer vector into a padic chunk representation
template<class Field >
DenseMatrix < Field > & genericNullspaceRandomRight (DenseMatrix < Field > &N, const FIBB< Field > &A)
N: AN = 0, each col random.
template<class Field >
DenseMatrix < Field > & genericNullspaceRandomLeft (DenseMatrix < Field > &N, const FIBB< Field > &A)
N: NA = 0, each row random.
double naturallog (const Givaro::Integer &a)
Natural logarithm (ln).
template<class T >
std::enable_if<!std::is_unsigned< T >::value, bool >::value isPositive (const T &t)
Positiveness of an integer.
template<class _Field , class _Storage >
std::ostream & operator<< (std::ostream &os, const BlasMatrix < _Field, _Storage > &Mat )
Write a matrix to a stream.
void RandomBlasPermutation (BlasPermutation < size_t > &P)
template<class T >
std::ostream & operator<< (std::ostream &o, const DenseMat < T > &Mat )
Write a matrix to a stream.
template<class Field , class Vector >
Vector & prepare (const Field &F, Vector &y, const typename Field::Element &a)
y <- ay.
template<typename Container >
PrimeSequence < typename Container::const_iterator > create_prime_sequence (const Container &cont)
convenience factory to create a PrimeSequence from an STL-like container.
template<class Blackbox , class Polynomial , class MyMethod >
Polynomial & charpoly (Polynomial &P, const Blackbox &A, const MyMethod &M)
...using an optional Method parameter
template<class Blackbox , class Polynomial >
Polynomial & charpoly (Polynomial &P, const Blackbox &A)
...using default method
template<class Blackbox , class Polynomial >
Polynomial & charpoly (Polynomial &P, const Blackbox &A, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
Compute the characteristic polynomial over .
template<class Blackbox , class Polynomial >
Polynomial & charpoly (Polynomial &P, const Blackbox &A, const RingCategories::ModularTag &tag, const Method::Blackbox &M)
Compute the characteristic polynomial over .
template<class Blackbox , class DetMethod , class DomainCategory >
Blackbox::Field::Element & det (typename Blackbox::Field::Element &d, const Blackbox &A, const DomainCategory &tag, const DetMethod &Meth)
Compute the determinant of A.
template<class Field >
Field::Element & detInPlace (typename Field::Element &d, BlasMatrix < Field > &A)
Rank of Blackbox A
.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t rowEchelon (Matrix &E, const Matrix &A, const CategoryTag &tag, const EchelonMethod &m)
Compute the row echelon form of a matrix, not reduced.
template<class Matrix , class EchelonMethod >
size_t rowEchelon (Matrix &E, const Matrix &A, const EchelonMethod &m)
rowEchelon dispatcher for automated category tag.
template<class Matrix >
size_t rowEchelon (Matrix &E, const Matrix &A)
rowEchelon dispatcher for automated method.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t rowEchelon (Matrix &E, Matrix &T, const Matrix &A, const CategoryTag &tag, const EchelonMethod &m)
Compute the row echelon form of a matrix, not reduced, and the related transformation matrix.
template<class Matrix , class EchelonMethod >
size_t rowEchelon (Matrix &E, Matrix &T, const Matrix &A, const EchelonMethod &m)
rowEchelon dispatcher for automated category tag.
template<class Matrix >
size_t rowEchelon (Matrix &E, Matrix &T, const Matrix &A)
rowEchelon dispatcher for automated method.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t rowEchelonize (Matrix &A, const CategoryTag &tag, const EchelonMethod &m)
Replace the input matrix by its row echelon form, not reduced.
template<class Matrix , class EchelonMethod >
size_t rowEchelonize (Matrix &A, const EchelonMethod &m)
rowEchelonize dispatcher for automated category tag.
template<class Matrix >
size_t rowEchelonize (Matrix &A)
rowEchelonize dispatcher for automated method.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t rowEchelonize (Matrix &A, Matrix &T, const CategoryTag &tag, const EchelonMethod &m)
Compute the row echelon form of a matrix, not reduced, and the related transformation matrix.
template<class Matrix , class EchelonMethod >
size_t rowEchelonize (Matrix &A, Matrix &T, const EchelonMethod &m)
rowEchelonize dispatcher for automated category tag.
template<class Matrix >
size_t rowEchelonize (Matrix &A, Matrix &T)
rowEchelonize dispatcher for automated method.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t reducedRowEchelon (Matrix &E, const Matrix &A, const CategoryTag &tag, const EchelonMethod &m)
Compute the reduced row echelon form of a matrix.
template<class Matrix , class EchelonMethod >
size_t reducedRowEchelon (Matrix &E, const Matrix &A, const EchelonMethod &m)
reducedRowEchelon dispatcher for automated category tag.
template<class Matrix >
size_t reducedRowEchelon (Matrix &E, const Matrix &A)
reducedRowEchelon dispatcher for automated method.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t reducedRowEchelon (Matrix &E, Matrix &T, const Matrix &A, const CategoryTag &tag, const EchelonMethod &m)
Compute the reduced row echelon form of a matrix, and the related transformation matrix.
template<class Matrix , class EchelonMethod >
size_t reducedRowEchelon (Matrix &E, Matrix &T, const Matrix &A, const EchelonMethod &m)
reducedRowEchelon dispatcher for automated category tag.
template<class Matrix >
size_t reducedRowEchelon (Matrix &E, Matrix &T, const Matrix &A)
reducedRowEchelon dispatcher for automated method.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t reducedRowEchelonize (Matrix &A, const CategoryTag &tag, const EchelonMethod &m)
Replace the input matrix by its reduced row echelon form.
template<class Matrix , class EchelonMethod >
size_t reducedRowEchelonize (Matrix &A, const EchelonMethod &m)
reducedRowEchelonize dispatcher for automated category tag.
template<class Matrix >
size_t reducedRowEchelonize (Matrix &A)
reducedRowEchelonize dispatcher for automated method.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t reducedRowEchelonize (Matrix &A, Matrix &T, const CategoryTag &tag, const EchelonMethod &m)
Compute the reduced row echelon form of a matrix, and the related transformation matrix.
template<class Matrix , class EchelonMethod >
size_t reducedRowEchelonize (Matrix &A, Matrix &T, const EchelonMethod &m)
reducedRowEchelonize dispatcher for automated category tag.
template<class Matrix >
size_t reducedRowEchelonize (Matrix &A, Matrix &T)
reducedRowEchelonize dispatcher for automated method.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t colEchelon (Matrix &E, const Matrix &A, const CategoryTag &tag, const EchelonMethod &m)
Compute the column echelon form of a matrix, not reduced.
template<class Matrix , class EchelonMethod >
size_t colEchelon (Matrix &E, const Matrix &A, const EchelonMethod &m)
colEchelon dispatcher for automated category tag.
template<class Matrix >
size_t colEchelon (Matrix &E, const Matrix &A)
colEchelon dispatcher for automated method.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t colEchelon (Matrix &E, Matrix &T, const Matrix &A, const CategoryTag &tag, const EchelonMethod &m)
Compute the column echelon form of a matrix, not reduced, and the related transformation matrix.
template<class Matrix , class EchelonMethod >
size_t colEchelon (Matrix &E, Matrix &T, const Matrix &A, const EchelonMethod &m)
colEchelon dispatcher for automated category tag.
template<class Matrix >
size_t colEchelon (Matrix &E, Matrix &T, const Matrix &A)
colEchelon dispatcher for automated method.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t colEchelonize (Matrix &A, const CategoryTag &tag, const EchelonMethod &m)
Replace the input matrix by its column echelon form, not reduced.
template<class Matrix , class EchelonMethod >
size_t colEchelonize (Matrix &A, const EchelonMethod &m)
colEchelonize dispatcher for automated category tag.
template<class Matrix >
size_t colEchelonize (Matrix &A)
colEchelonize dispatcher for automated method.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t colEchelonize (Matrix &A, Matrix &T, const CategoryTag &tag, const EchelonMethod &m)
Compute the column echelon form of a matrix, not reduced, and the related transformation matrix.
template<class Matrix , class EchelonMethod >
size_t colEchelonize (Matrix &A, Matrix &T, const EchelonMethod &m)
colEchelonize dispatcher for automated category tag.
template<class Matrix >
size_t colEchelonize (Matrix &A, Matrix &T)
colEchelonize dispatcher for automated method.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t reducedColEchelon (Matrix &E, const Matrix &A, const CategoryTag &tag, const EchelonMethod &m)
Compute the reduced column echelon form of a matrix.
template<class Matrix , class EchelonMethod >
size_t reducedColEchelon (Matrix &E, const Matrix &A, const EchelonMethod &m)
reducedColEchelon dispatcher for automated category tag.
template<class Matrix >
size_t reducedColEchelon (Matrix &E, const Matrix &A)
reducedColEchelon dispatcher for automated method.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t reducedColEchelon (Matrix &E, Matrix &T, const Matrix &A, const CategoryTag &tag, const EchelonMethod &m)
Compute the reduced column echelon form of a matrix, and the related transformation matrix.
template<class Matrix , class EchelonMethod >
size_t reducedColEchelon (Matrix &E, Matrix &T, const Matrix &A, const EchelonMethod &m)
reducedColEchelon dispatcher for automated category tag.
template<class Matrix >
size_t reducedColEchelon (Matrix &E, Matrix &T, const Matrix &A)
reducedColEchelon dispatcher for automated method.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t reducedColEchelonize (Matrix &A, const CategoryTag &tag, const EchelonMethod &m)
Replace the input matrix by its reduced column echelon form.
template<class Matrix , class EchelonMethod >
size_t reducedColEchelonize (Matrix &A, const EchelonMethod &m)
reducedColEchelonize dispatcher for automated category tag.
template<class Matrix >
size_t reducedColEchelonize (Matrix &A)
reducedColEchelonize dispatcher for automated method.
template<class Matrix , class CategoryTag , class EchelonMethod >
size_t reducedColEchelonize (Matrix &A, Matrix &T, const CategoryTag &tag, const EchelonMethod &m)
Compute the reduced column echelon form of a matrix, and the related transformation matrix.
template<class Matrix , class EchelonMethod >
size_t reducedColEchelonize (Matrix &A, Matrix &T, const EchelonMethod &m)
reducedColEchelonize dispatcher for automated category tag.
template<class Matrix >
size_t reducedColEchelonize (Matrix &A, Matrix &T)
reducedColEchelonize dispatcher for automated method.
template<class Matrix , class CategoryTag >
size_t rowEchelon (Matrix &E, const Matrix &A, const CategoryTag &tag, const Method::Auto &m)
rowEchelon specialisation for Auto.
template<class Field >
size_t rowEchelon (DenseMatrix < Field > &E, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::Auto &m)
rowEchelon specialisation for Auto with DenseMatrix and ModularTag.
template<class Matrix , class CategoryTag >
size_t rowEchelon (Matrix &E, Matrix &T, const Matrix &A, const CategoryTag &tag, const Method::Auto &m)
rowEchelon specialisation for Auto.
template<class Field >
size_t rowEchelon (DenseMatrix < Field > &E, DenseMatrix < Field > &T, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::Auto &m)
rowEchelon specialisation for Auto with DenseMatrix and ModularTag.
template<class Matrix , class CategoryTag >
size_t rowEchelonize (Matrix &A, const CategoryTag &tag, const Method::Auto &m)
rowEchelonize specialisation for Auto.
template<class Field >
size_t rowEchelonize (DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::Auto &m)
rowEchelonize specialisation for Auto with DenseMatrix and ModularTag.
template<class Matrix , class CategoryTag >
size_t rowEchelonize (Matrix &A, Matrix &T, const CategoryTag &tag, const Method::Auto &m)
rowEchelonize specialisation for Auto.
template<class Field >
size_t rowEchelonize (DenseMatrix < Field > &A, DenseMatrix < Field > &T, const RingCategories::ModularTag &tag, const Method::Auto &m)
rowEchelonize specialisation for Auto with DenseMatrix and ModularTag.
template<class Matrix , class CategoryTag >
size_t reducedRowEchelon (Matrix &E, const Matrix &A, const CategoryTag &tag, const Method::Auto &m)
reducedRowEchelon specialisation for Auto.
template<class Field >
size_t reducedRowEchelon (DenseMatrix < Field > &E, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::Auto &m)
reducedRowEchelon specialisation for Auto with DenseMatrix and ModularTag.
template<class Matrix , class CategoryTag >
size_t reducedRowEchelon (Matrix &E, Matrix &T, const Matrix &A, const CategoryTag &tag, const Method::Auto &m)
reducedRowEchelon specialisation for Auto.
template<class Field >
size_t reducedRowEchelon (DenseMatrix < Field > &E, DenseMatrix < Field > &T, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::Auto &m)
reducedRowEchelon specialisation for Auto with DenseMatrix and ModularTag.
template<class Matrix , class CategoryTag >
size_t reducedRowEchelonize (Matrix &A, const CategoryTag &tag, const Method::Auto &m)
reducedRowEchelonize specialisation for Auto.
template<class Field >
size_t reducedRowEchelonize (DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::Auto &m)
reducedRowEchelonize specialisation for Auto with DenseMatrix and ModularTag.
template<class Matrix , class CategoryTag >
size_t reducedRowEchelonize (Matrix &A, Matrix &T, const CategoryTag &tag, const Method::Auto &m)
reducedRowEchelonize specialisation for Auto.
template<class Field >
size_t reducedRowEchelonize (DenseMatrix < Field > &A, DenseMatrix < Field > &T, const RingCategories::ModularTag &tag, const Method::Auto &m)
reducedRowEchelonize specialisation for Auto with DenseMatrix and ModularTag.
template<class Matrix , class CategoryTag >
size_t colEchelon (Matrix &E, const Matrix &A, const CategoryTag &tag, const Method::Auto &m)
colEchelon specialisation for Auto.
template<class Field >
size_t colEchelon (DenseMatrix < Field > &E, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::Auto &m)
colEchelon specialisation for Auto with DenseMatrix and ModularTag.
template<class Matrix , class CategoryTag >
size_t colEchelon (Matrix &E, Matrix &T, const Matrix &A, const CategoryTag &tag, const Method::Auto &m)
colEchelon specialisation for Auto.
template<class Field >
size_t colEchelon (DenseMatrix < Field > &E, DenseMatrix < Field > &T, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::Auto &m)
colEchelon specialisation for Auto with DenseMatrix and ModularTag.
template<class Matrix , class CategoryTag >
size_t colEchelonize (Matrix &A, const CategoryTag &tag, const Method::Auto &m)
colEchelonize specialisation for Auto.
template<class Field >
size_t colEchelonize (DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::Auto &m)
colEchelonize specialisation for Auto with DenseMatrix and ModularTag.
template<class Matrix , class CategoryTag >
size_t colEchelonize (Matrix &A, Matrix &T, const CategoryTag &tag, const Method::Auto &m)
colEchelonize specialisation for Auto.
template<class Field >
size_t colEchelonize (DenseMatrix < Field > &A, DenseMatrix < Field > &T, const RingCategories::ModularTag &tag, const Method::Auto &m)
colEchelonize specialisation for Auto with DenseMatrix and ModularTag.
template<class Matrix , class CategoryTag >
size_t reducedColEchelon (Matrix &E, const Matrix &A, const CategoryTag &tag, const Method::Auto &m)
reducedColEchelon specialisation for Auto.
template<class Field >
size_t reducedColEchelon (DenseMatrix < Field > &E, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::Auto &m)
reducedColEchelon specialisation for Auto with DenseMatrix and ModularTag.
template<class Matrix , class CategoryTag >
size_t reducedColEchelon (Matrix &E, Matrix &T, const Matrix &A, const CategoryTag &tag, const Method::Auto &m)
reducedColEchelon specialisation for Auto.
template<class Field >
size_t reducedColEchelon (DenseMatrix < Field > &E, DenseMatrix < Field > &T, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::Auto &m)
reducedColEchelon specialisation for Auto with DenseMatrix and ModularTag.
template<class Matrix , class CategoryTag >
size_t reducedColEchelonize (Matrix &A, const CategoryTag &tag, const Method::Auto &m)
reducedColEchelonize specialisation for Auto.
template<class Field >
size_t reducedColEchelonize (DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::Auto &m)
reducedColEchelonize specialisation for Auto with DenseMatrix and ModularTag.
template<class Matrix , class CategoryTag >
size_t reducedColEchelonize (Matrix &A, Matrix &T, const CategoryTag &tag, const Method::Auto &m)
reducedColEchelonize specialisation for Auto.
template<class Field >
size_t reducedColEchelonize (DenseMatrix < Field > &A, DenseMatrix < Field > &T, const RingCategories::ModularTag &tag, const Method::Auto &m)
reducedColEchelonize specialisation for Auto with DenseMatrix and ModularTag.
template<class Field >
size_t rowEchelon (DenseMatrix < Field > &E, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
rowEchelon specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class Field >
size_t rowEchelon (DenseMatrix < Field > &E, DenseMatrix < Field > &T, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
rowEchelon with transformation specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class Field >
size_t rowEchelonize (DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
rowEchelonize specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class Field >
size_t rowEchelonize (DenseMatrix < Field > &A, DenseMatrix < Field > &T, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
rowEchelonize with transformation specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class Field >
size_t reducedRowEchelon (DenseMatrix < Field > &E, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
reducedRowEchelon specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class Field >
size_t reducedRowEchelon (DenseMatrix < Field > &E, DenseMatrix < Field > &T, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
reducedRowEchelon with transformation specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class Field >
size_t reducedRowEchelonize (DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
reducedRowEchelonize specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class Field >
size_t reducedRowEchelonize (DenseMatrix < Field > &A, DenseMatrix < Field > &T, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
reducedRowEchelonize with transformation specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class Field >
size_t colEchelon (DenseMatrix < Field > &E, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
colEchelon specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class Field >
size_t colEchelon (DenseMatrix < Field > &E, DenseMatrix < Field > &T, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
colEchelon with transformation specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class Field >
size_t colEchelonize (DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
colEchelonize specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class Field >
size_t colEchelonize (DenseMatrix < Field > &A, DenseMatrix < Field > &T, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
colEchelonize with transformation specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class Field >
size_t reducedColEchelon (DenseMatrix < Field > &E, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
reducedColEchelon specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class Field >
size_t reducedColEchelon (DenseMatrix < Field > &E, DenseMatrix < Field > &T, const DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
reducedColEchelon with transformation specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class Field >
size_t reducedColEchelonize (DenseMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
reducedColEchelonize specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class Field >
size_t reducedColEchelonize (DenseMatrix < Field > &A, DenseMatrix < Field > &T, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
reducedColEchelonize with transformation specialisation for DenseElimination with DenseMatrix and ModularTag.
template<class BB >
BB::Field::Element & getEntry (typename BB::Field::Element &x, const BB &A, const size_t i, const size_t j)
Getting the i,j entry of the blackbox.
template<class BB , class Method >
BB::Field::Element & getEntry (typename BB::Field::Element &x, const BB &A, const size_t i, const size_t j, Method &m)
To ignore methods.
template<class IMatrix >
void HadamardRowLogBound (double &logBound, double &minLogNorm, const IMatrix &A)
Precise Hadamard bound (bound on determinant) by taking the row-wise euclidean norm.
template<class IMatrix >
void HadamardColLogBound (double &logBound, double &minLogNorm, const IMatrix &A)
Precise Hadamard bound (bound on determinant) by taking the column-wise euclidean norm.
template<class IMatrix >
HadamardLogBoundDetails DetailedHadamardBound (const IMatrix &A)
Precise Hadamard bound (bound on determinant) by taking the minimum of the column-wise and the row-wise euclidean norm.
template<class IMatrix >
double HadamardBound (const IMatrix &A)
Precise Hadamard bound (bound on determinant) by taking the minimum of the column-wise and the row-wise euclidean norm.
template<class IMatrix , class MTag >
Integer & InfinityNorm (Integer &max, const IMatrix &A, const MTag &tag)
Returns the maximal absolute value.
template<class IMatrix >
double FastHadamardBound (const IMatrix &A, const Integer &infnorm)
Returns the bit size of the Hadamard bound.
template<class IMatrix >
double FastCharPolyDumasPernetWanBound (const IMatrix &A, const Integer &infnorm)
Bound on the coefficients of the characteristic polynomial.
template<class IMatrix >
double FastCharPolyGoldsteinGrahamBound (const IMatrix &A, const Integer &infnorm)
A.J.
template<class Matrix , class Vector >
std::enable_if< std::is_same< typenameFieldTraits< typenameMatrix::Field >::categoryTag, RingCategories::IntegerTag >::value, RationalSolveHadamardBoundData >::type RationalSolveHadamardBound (const Matrix &A, const Vector &b)
Bound on the rational solution of a linear system Ax = b.
template<class Matrix , class Vector >
std::enable_if< std::is_same< typenameFieldTraits< typenameMatrix::Field >::categoryTag, RingCategories::RationalTag >::value, RationalSolveHadamardBoundData >::type RationalSolveHadamardBound (const Matrix &A, const Vector &b)
@fixme Needed to solve-cra.h, but can't be used yet.
template<class Blackbox , class MyMethod >
bool isPositiveDefinite (const Blackbox &A, const MyMethod &M)
Compute the isPositiveDefinite of A.
template<class Blackbox >
bool isPositiveDefinite (const Blackbox &A, const RingCategories::IntegerTag &tag, const Method::Auto &M)
template<class Blackbox >
bool isPositiveDefinite (const Blackbox &A, const RingCategories::IntegerTag &tag, const Method::DenseElimination &M)
template<class Blackbox , class MyMethod >
bool isPositiveSemiDefinite (const Blackbox &A, const MyMethod &M)
Determine if A is positive semidefinite.
template<class Blackbox >
bool isPositiveSemiDefinite (const Blackbox &A, const RingCategories::IntegerTag &tag, const Method::DenseElimination &M)
template<class Polynomial , class Blackbox >
Polynomial & minpoly (Polynomial &P, const Blackbox &A)
...using default Method
template<class Blackbox , class Method , class DomainCategory >
size_t & rank (size_t &r, const Blackbox &A, const DomainCategory &tag, const Method &M)
Compute the rank of a linear transform A over a field by selected method.
template<class Blackbox >
size_t & rank (size_t &r, const Blackbox &A)
Compute the rank of a linear transform A over a field.
template<class Blackbox , class Method >
size_t & rank (size_t &r, const Blackbox &A, const Method &M)
Compute the rank of a linear transform A over a field.
template<class Blackbox >
size_t & rankInPlace (size_t &r, Blackbox &A)
Rank of A
.
template<class Blackbox >
size_t & rank (size_t &r, const Blackbox &A, const RingCategories::ModularTag &tag, const Method::Auto &m)
template<class Blackbox >
size_t & rank (size_t &res, const Blackbox &A, const RingCategories::ModularTag &tag, const Method::Wiedemann &M)
M may be Method::Wiedemann()
.
template<class Field >
size_t & rank (size_t &r, const SparseMatrix< Field, SparseMatrixFormat::SparseSeq > &A, const RingCategories::ModularTag &tag, const Method::SparseElimination &M)
M may be Method::SparseElimination()
.
size_t & rankInPlace (size_t &r, GaussDomain < GF2 >::Matrix &A, const Method::SparseElimination &)
specialization to
size_t & rankInPlace (size_t &r, GaussDomain < GF2 >::Matrix &A, const RingCategories::ModularTag &, const Method::SparseElimination &M)
specialization to
template<class Field >
size_t & rankInPlace (size_t &r, BlasMatrix < Field > &A, const RingCategories::ModularTag &tag, const Method::DenseElimination &M)
A is modified.
template<class Blackbox , class Method >
SmithList< typename Blackbox::Field > & smithForm (SmithList< typename Blackbox::Field > &S, const Blackbox &A, const Method &M)
Compute the Smith form of A.
template<class ResultVector , class Matrix , class Vector , class CategoryTag , class SolveMethod >
ResultVector & solve (ResultVector &x, const Matrix &A, const Vector &b, const CategoryTag &tag, const SolveMethod &m)
Solve Ax = b, for x.
template<class ResultVector , class Matrix , class Vector , class SolveMethod >
ResultVector & solve (ResultVector &x, const Matrix &A, const Vector &b, const SolveMethod &m)
Solve dispatcher for automated category tag.
template<class ResultVector , class Matrix , class Vector >
ResultVector & solve (ResultVector &x, const Matrix &A, const Vector &b)
Solve dispatcher for automated solve method.
template<class RatVector , class RatMatrix , class Vector , class SolveMethod >
RatVector & solve (RatVector &x, const RatMatrix &A, const Vector &b, const RingCategories::RationalTag &tag, const SolveMethod &m)
Solve specialisation on RationalTag, with a generic method.
template<class RatVector , class Matrix , class Vector , class SolveMethod >
std::enable_if< std::is_same< typenameSolveMethod::CategoryTag, RingCategories::IntegerTag >::value &&std::is_same< typenameFieldTraits< typenameRatVector::Field >::categoryTag, RingCategories::RationalTag >::value, RatVector & >::type solve (RatVector &x, const Matrix &A, const Vector &b, const RingCategories::IntegerTag &tag, const SolveMethod &m)
Solve specialisation on IntegerTag with Vector<QField> as result.
template<class Matrix , class Vector , class SolveMethod >
std::enable_if< std::is_same< typenameSolveMethod::CategoryTag, RingCategories::IntegerTag >::value, VectorFraction < typenameMatrix::Field > & >::type solve (VectorFraction < typename Matrix::Field > &x, const Matrix &A, const Vector &b, const RingCategories::IntegerTag &tag, const SolveMethod &m)
Solve specialisation on IntegerTag with VectorFraction as result.
template<class IntVector , class Matrix , class Vector , class CategoryTag , class SolveMethod >
void solve (IntVector &xNum, typename IntVector::Element &xDen, const Matrix &A, const Vector &b, const CategoryTag &tag, const SolveMethod &m)
Rational solve Ax = b, for x expressed as xNum/xDen.
template<class IntVector , class Matrix , class Vector , class SolveMethod >
void solve (IntVector &xNum, typename IntVector::Element &xDen, const Matrix &A, const Vector &b, const RingCategories::IntegerTag &tag, const SolveMethod &m)
Rational solve dispatcher for unimplemented methods.
template<class IntVector , class Matrix , class Vector , class SolveMethod >
void solve (IntVector &xNum, typename IntVector::Element &xDen, const Matrix &A, const Vector &b, const SolveMethod &m)
Rational solve dispatcher for automated category tag.
template<class IntVector , class Matrix , class Vector >
void solve (IntVector &xNum, typename IntVector::Element &xDen, const Matrix &A, const Vector &b)
Rational solve dispatcher for automated solve method.
template<class ResultVector , class Matrix , class Vector , class CategoryTag , class SolveMethod >
ResultVector & solveInPlace (ResultVector &x, Matrix &A, const Vector &b, const CategoryTag &tag, const SolveMethod &m)
Solve Ax = b, for x.
template<class ResultVector , class Matrix , class Vector , class SolveMethod >
ResultVector & solveInPlace (ResultVector &x, Matrix &A, const Vector &b, const SolveMethod &m)
Solve in place dispatcher for automated category tag.
template<class ResultVector , class Matrix , class Vector >
ResultVector & solveInPlace (ResultVector &x, Matrix &A, const Vector &b)
Solve in place dispatcher for automated solve method.
template<class IntVector , class Matrix , class Vector , class SolveMethod , class CategoryTag >
void solveInPlace (IntVector &xNum, typename IntVector::Element &xDen, Matrix &A, const Vector &b, const CategoryTag &tag, const SolveMethod &m)
Rational solve in place Ax = b, for x expressed as xNum/xDen.
template<class IntVector , class Matrix , class Vector , class SolveMethod >
void solveInPlace (IntVector &xNum, typename IntVector::Element &xDen, Matrix &A, const Vector &b, const SolveMethod &m)
Rational solve in place dispatcher for automated category tag.
template<class IntVector , class Matrix , class Vector >
void solveInPlace (IntVector &xNum, typename IntVector::Element &xDen, Matrix &A, const Vector &b)
Rational solve in place dispatcher for automated solve method.
template<class ResultVector , class Matrix , class Vector , class CategoryTag >
ResultVector & solve (ResultVector &x, const Matrix &A, const Vector &b, const CategoryTag &tag, const Method::Auto &m)
Solve specialisation for Auto.
template<class ResultVector , class Field , class Vector >
ResultVector & solve (ResultVector &x, const DenseMatrix < Field > &A, const Vector &b, const RingCategories::ModularTag &tag, const Method::Auto &m)
Solve specialisation for Auto with DenseMatrix and ModularTag.
template<class ResultVector , class... MatrixArgs, class Vector >
ResultVector & solve (ResultVector &x, const SparseMatrix< MatrixArgs... > &A, const Vector &b, const RingCategories::ModularTag &tag, const Method::Auto &m)
Solve specialisation for Auto with SparseMatrix and ModularTag.
template<class ResultVector , class Matrix , class Vector >
ResultVector & solve (ResultVector &x, const Matrix &A, const Vector &b, const RingCategories::IntegerTag &tag, const Method::Auto &m)
Solve specialisation for Auto and IntegerTag.
template<class ResultVector , class Matrix , class Vector >
ResultVector & solve (ResultVector &x, const Matrix &A, const Vector &b, const RingCategories::RationalTag &tag, const Method::Auto &m)
Solve specialisation for Auto and RationalTag.
template<class IntVector , class Matrix , class Vector >
void solve (IntVector &xNum, typename IntVector::Element &xDen, const Matrix &A, const Vector &b, const RingCategories::IntegerTag &tag, const Method::Auto &m)
Solve specialization for Auto and IntegerTag.
template<class ResultVector , class Matrix , class Vector , class CategoryTag >
ResultVector & solveInPlace (ResultVector &x, Matrix &A, const Vector &b, const CategoryTag &tag, const Method::Auto &m)
Solve in place specialisation for Auto.
template<class ResultVector , class Matrix , class Vector >
ResultVector & solveInPlace (ResultVector &x, Matrix &A, const Vector &b, const RingCategories::IntegerTag &tag, const Method::Auto &m)
Solve in place specialisation for Auto and IntegerTag.
template<class ResultVector , class Field , class Vector , class CategoryTag >
std::enable_if<!std::is_same< CategoryTag, RingCategories::IntegerTag >::value, ResultVector & >::type solveInPlace (ResultVector &x, DenseMatrix < Field > &A, const Vector &b, const CategoryTag &tag, const Method::Auto &m)
Solve in place specialisation for Auto with DenseMatrix and non-IntegerTag.
template<class ResultVector , class... MatrixArgs, class Vector , class CategoryTag >
std::enable_if<!std::is_same< CategoryTag, RingCategories::IntegerTag >::value, ResultVector & >::type solveInPlace (ResultVector &x, SparseMatrix< MatrixArgs... > &A, const Vector &b, const CategoryTag &tag, const Method::Auto &m)
Solve in place specialisation for Auto with SparseMatrix and non-IntegerTag.
template<class Matrix , class Vector >
void solveInPlace (Vector &xNum, typename Vector::Element &xDen, Matrix &A, const Vector &b, const RingCategories::IntegerTag &tag, const Method::Auto &m)
Solve in place specialization for Auto and IntegerTag.
template<class ResultVector , class Matrix , class Vector , class CategoryTag >
ResultVector & solve (ResultVector &x, const Matrix &A, const Vector &b, const CategoryTag &tag, const Method::Blackbox &m)
Solve specialisation for Blackbox.
template<class ResultVector , class Matrix , class Vector , class CategoryTag >
ResultVector & solveInPlace (ResultVector &x, Matrix &A, const Vector &b, const CategoryTag &tag, const Method::Blackbox &m)
Solve in place specialisation for Blackbox.
template<class IntVector , class Matrix , class Vector , class IterationMethod >
void solve (IntVector &xNum, typename IntVector::Element &xDen, const Matrix &A, const Vector &b, const RingCategories::IntegerTag &tag, const Method::CRA< IterationMethod > &m)
Solve specialization with Chinese Remainder Algorithm method for an Integer or Rational tags.
template<class RatVector , class RatMatrix , class IterationMethod >
RatVector & solve (RatVector &x, const RatMatrix &A, const RatVector &b, const RingCategories::RationalTag &tag, const Method::CRA< IterationMethod > &m)
Solve specialization with Chinese Remainder Algorithm method for a Rational matrix.
template<class Matrix , class Vector >
Vector & solve (Vector &x, const Matrix &A, const Vector &b, const RingCategories::ModularTag &tag, const Method::DenseElimination &m)
Solve specialisation for DenseElimination.
template<class Field , class Vector >
Vector & solve (Vector &x, const DenseMatrix < Field > &A, const Vector &b, const RingCategories::ModularTag &tag, const Method::DenseElimination &m)
Solve specialisation for DenseElimination on dense matrices with ModularTag.
template<class IntVector , class Blackbox , class Vector >
void solve (IntVector &xNum, typename IntVector::Element &xDen, const Blackbox &A, const Vector &b, const RingCategories::IntegerTag &tag, const Method::Dixon &m)
Solve specialisation for Dixon on blackboxes matrices.
template<class IntVector , class Ring , class Vector >
void solve (IntVector &xNum, typename IntVector::Element &xDen, const DenseMatrix < Ring > &A, const Vector &b, const RingCategories::IntegerTag &tag, const Method::Dixon &m)
Solve specialisation for Dixon on dense matrices.
template<class IntVector , class... MatrixArgs, class Vector >
void solve (IntVector &xNum, typename IntVector::Element &xDen, const SparseMatrix< MatrixArgs... > &A, const Vector &b, const RingCategories::IntegerTag &tag, const Method::Dixon &m)
Solve specialisation for Dixon on sparse matrices.
template<class Matrix , class Vector , class CategoryTag >
Vector & solve (Vector &x, const Matrix &A, const Vector &b, const CategoryTag &tag, const Method::Elimination &m)
Solve specialisation for Elimination.
template<class MatrixField , class Vector , class CategoryTag >
Vector & solve (Vector &x, const DenseMatrix < MatrixField > &A, const Vector &b, const CategoryTag &tag, const Method::Elimination &m)
Solve specialisation for Elimination with DenseMatrix.
template<class MatrixField , class Vector , class CategoryTag >
Vector & solve (Vector &x, const SparseMatrix< MatrixField > &A, const Vector &b, const CategoryTag &tag, const Method::Elimination &m)
Solve specialisation for Elimination with SparseMatrix.
template<class Matrix , class Vector , class CategoryTag >
Vector & solveInPlace (Vector &x, Matrix &A, const Vector &b, const CategoryTag &tag, const Method::Elimination &m)
Solve in place specialisation for Elimination.
template<class MatrixField , class Vector , class CategoryTag >
Vector & solveInPlace (Vector &x, DenseMatrix < MatrixField > &A, const Vector &b, const CategoryTag &tag, const Method::Elimination &m)
Solve in place specialisation for Elimination with DenseMatrix.
template<class MatrixField , class Vector , class CategoryTag >
Vector & solveInPlace (Vector &x, SparseMatrix< MatrixField > &A, const Vector &b, const CategoryTag &tag, const Method::Elimination &m)
Solve in place specialisation for Elimination with SparseMatrix.
template<class Matrix , class Vector , class CategoryTag >
Vector & solve (Vector &x, const Matrix &A, const Vector &b, const CategoryTag &tag, const Method::Lanczos &m)
Solve specialisation for Lanczos.
template<class Matrix , class Vector >
Vector & solve (Vector &x, const Matrix &A, const Vector &b, const RingCategories::ModularTag &tag, const Method::Lanczos &m)
Solve specialisation for Lanczos with ModularTag.
template<class Matrix , class Vector , class CategoryTag >
Vector & solve (Vector &x, const Matrix &A, const Vector &b, const CategoryTag &tag, const Method::BlockLanczos &m)
Solve specialisation for BlockLanczos.
template<class Matrix , class Vector >
Vector & solve (Vector &x, const Matrix &A, const Vector &b, const RingCategories::ModularTag &tag, const Method::BlockLanczos &m)
Solve specialisation for BlockLanczos with ModularTag.
template<class IntVector , class Ring , class Vector >
void solve (IntVector &xNum, typename IntVector::Element &xDen, const DenseMatrix < Ring > &A, const Vector &b, const RingCategories::IntegerTag &tag, const Method::SymbolicNumericNorm &m)
Solve specialisation for SymbolicNumericNorm with IntegerTag on DenseMatrix.
template<class Matrix , class Vector >
Vector & solve (Vector &x, const Matrix &A, const Vector &b, const RingCategories::ModularTag &tag, const Method::SparseElimination &m)
Solve specialisation for SparseElimination.
template<class... MatrixArgs, class Vector >
Vector & solve (Vector &x, const SparseMatrix< MatrixArgs... > &A, const Vector &b, const RingCategories::ModularTag &tag, const Method::SparseElimination &m)
Solve specialisation for SparseElimination with SparseMatrix.
template<class... MatrixArgs, class Vector >
Vector & solveInPlace (Vector &x, SparseMatrix< MatrixArgs... > &A, const Vector &b, const RingCategories::ModularTag &tag, const Method::SparseElimination &m)
Solve in place specialisation for SparseElimination with SparseMatrix.
template<class ResultVector , class Matrix , class Vector , class CategoryTag >
ResultVector & solve (ResultVector &x, const Matrix &A, const Vector &b, const CategoryTag &tag, const Method::Wiedemann &m)
Solve specialisation for Wiedemann.
template<class ResultVector , class Matrix , class Vector >
ResultVector & solve (ResultVector &x, const Matrix &A, const Vector &b, const RingCategories::IntegerTag &tag, const Method::Wiedemann &m)
Solve specialisation for Wiedemann with IntegerTag.
template<class ResultVector , class Matrix , class Vector >
ResultVector & solve (ResultVector &x, const Matrix &A, const Vector &b, const RingCategories::ModularTag &tag, const Method::Wiedemann &m)
Solve specialisation for Wiedemann with ModularTag.
template<class ResultVector , class Matrix , class Vector , class CategoryTag >
ResultVector & solve (ResultVector &x, const Matrix &A, const Vector &b, const CategoryTag &tag, const Method::BlockWiedemann &m)
Solve specialisation for BlockWiedemann.
template<class ResultVector , class Matrix , class Vector >
ResultVector & solve (ResultVector &x, const Matrix &A, const Vector &b, const RingCategories::ModularTag &tag, const Method::BlockWiedemann &m)
Solve specialisation for BlockWiedemann with ModularTag.
template<class ResultVector , class Matrix , class Vector , class CategoryTag >
ResultVector & solve (ResultVector &x, const Matrix &A, const Vector &b, const CategoryTag &tag, const Method::Coppersmith &m)
Solve specialisation for Coppersmith.
template<class ResultVector , class Matrix , class Vector >
ResultVector & solve (ResultVector &x, const Matrix &A, const Vector &b, const RingCategories::ModularTag &tag, const Method::Coppersmith &m)
Solve specialisation for Coppersmith on ModularTag.
template<class BB >
BB::Field::Element & trace (typename BB::Field::Element &t, const BB &A)
Sum of the eigenvalues.
template<class Blackbox , class MyMethod >
Blackbox::Field::Element & valence (typename Blackbox::Field::Element &v, const Blackbox &A, const MyMethod &M)
Compute the valence of A.
uint64_t serialize (std::vector< uint8_t > &bytes, const Integer &integer )
Serializes an Integer with its underlying __mpz_struct.
uint64_t unserialize (Integer &integer , const std::vector< uint8_t > &bytes, uint64_t offset=0u)
Unserializes an Integer.
template<class Field >
uint64_t serialize (std::vector< uint8_t > &bytes, const BlasMatrix < Field > &M)
Serializes a BlasMatrix .
template<class Field >
uint64_t unserialize (BlasMatrix < Field > &M, const std::vector< uint8_t > &bytes, uint64_t offset=0u)
Unserializes a BlasMatrix .
template<class Field >
uint64_t serialize (std::vector< uint8_t > &bytes, const SparseMatrix< Field > &M)
Serializes a SparseMatrix.
template<class Field >
uint64_t unserialize (SparseMatrix< Field > &M, const std::vector< uint8_t > &bytes, uint64_t offset=0u)
Unserializes a SparseMatrix.
template<class Field >
uint64_t serialize (std::vector< uint8_t > &bytes, const BlasVector< Field > &V)
Serializes a BlasVector.
template<class Field >
uint64_t unserialize (BlasVector< Field > &V, const std::vector< uint8_t > &bytes, uint64_t offset=0u)
Unserializes a BlasVector.
template<class Field >
std::ostream & writeMMComment (std::ostream &os, Field &F, std::string name, std::string comment)
Write second line and comment part of matrix market header.
template<class BB >
std::ostream & writeMMCoordHeader (std::ostream &os, BB &A, size_t nnz, std::string name, std::string comment="")
Write matrix market header (up to the i,j,val lines) for a sparse or structured matrix.
template<class BB >
std::ostream & writeMMPatternHeader (std::ostream &os, BB &A, size_t nnz, std::string name, std::string comment="")
Write matrix market header (up to the i,j lines) for a {0,1} sparse or structured matrix.
template<class BB >
std::ostream & writeMMArrayHeader (std::ostream &os, BB &A, std::string name, std::string comment="")
Write matrix market header (up to the entry lines) for a dense matrix.
template<class Mat >
std::ostream & writeMMArray (std::ostream &os, Mat &A, std::string name, std::string comment="")
Generic dense matrix writer to matrix market array format (col major).
std::string eltype (float x)
eltype(x) returns a string containing the name of the type of field or ring element x.
template<class Field , class Vector >
Vector randomVector (Field &F, size_t n, typename Field::RandIter &r)
Random vector generator This templated function takes a field and a random field element generator and returns a vector of random field elements.
template<class Ring , class Matrix >
Matrix & randomAns (const Ring &R, Matrix &Mat , size_t n, size_t epr)
size_t & RandIntInInt (const size_t &s, size_t &RIII, const int &seed=0)
gives a random number such that .
void RandomPermutation (size_t *P, const size_t &len)
Creates a random Lapack style Permutation P
of size 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 >
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
.
void showAdvanceLinear (size_t curr, size_t min, size_t max)
show the advancement (on the terminal) suppose linear advancement
void showFinish (size_t curr, size_t all)
tells the current series of measure has completed (on the terminal)
void showSkip (size_t curr, size_t all)
tells the current series of measure was skipped (on the terminal)
double computeMFLOPS (const double &tim, const double mflo, const size_t rpt=1)
computes the number of megaflops.
double computeMFLOPS (const dvector_t &tim, const double mflo, Tag::TimeSelect ts=Tag::TimeSelect::bestThree )
computes the number of megaflops.
bool isDigit (const std::string &s)
Check if a string is actually a double.
bool fortifiedString (const std::string &s)
Tells is a string has double quotes around.
std::string unfortifyString (const std::string &s)
removes the surrounding quotes.
std::string fortifyString (const std::string &s)
adds surrounding quotes.
std::string getDateTime (const std::string &sep)
get ISO time and date
smatrix_t getMachineInformation ()
get some machine information (not cpu yet)
template<class T >
std::string toString (T &nam)
Converts anything to a string.
bool findKeyword (size_t &i, const svector_t::const_iterator &begin, const svector_t::const_iterator &end, const std::string &keyword)
finds keyword betwen begin and end, return true if found and i is the index where it is (possibly correspondig to end)
double fit2 (const dvector_t &X, const dvector_t &Y, int n, double x)
fit X[n-1,n],Y[n-1,n] and return evaluation at x.
double fit3 (const dvector_t &X, const dvector_t &Y, int n, double x)
fit X[n-2,n],Y[n-2,n] and return evaluation at x.
Butterfly preconditioner and supporting function
std::vector< bool > setButterfly (const std::vector< bool > &x, size_t j=0)
A function used with Butterfly Blackbox Matrices.