F4
Library for Gröebner basis computation in finite field.
 All Classes Namespaces Files Functions Variables Friends Pages
Public Member Functions | Private Attributes | List of all members
F4::MatrixGeneric< Field > Class Template Reference

#include <matrix-generic.h>

Public Member Functions

 MatrixGeneric (Field &f)
 Constructor. More...
 
 MatrixGeneric (Field &f, int height, int width)
 Constructor. More...
 
 MatrixGeneric (Field &f, std::string const &filename)
 Constructor. More...
 
 MatrixGeneric (MatrixGeneric const &matrix)
 Copy constructor. More...
 
 MatrixGeneric (MatrixGeneric &&matrix)
 Move constructor. More...
 
 ~MatrixGeneric ()
 Destructor.
 
void erase ()
 Delete _startTail, _endCol, _sigma, _tau.
 
int getHeight () const
 Modify matrix element. More...
 
int getWidth () const
 Get the width of the matrix (number of columns).
 
void setNbPiv (int nbPiv)
 Specify the number of pivots.
 
int getNbPiv () const
 Get the number of pivots.
 
void setTau (int *tau)
 Specify the permutation _tau.
 
int * getTau ()
 Get the permutation _tau.
 
void setSigma (int *sigma)
 Specify the permutation _sigma.
 
int * getSigma ()
 Get the permutation _sigma.
 
void setStartTail (int *startTail)
 Specify the array _startTail.
 
int * getStartTail ()
 Get the array _startTail.
 
void setEndCol (int *encCol)
 Specify the array _endCol.
 
int * getEndCol ()
 Get the array _endCol.
 
void setInfo (int nbPiv, int *tau, int *sigma, int *startTail, int *endCol)
 Set the informations required by echelonize.
 
void printMatrix (std::ostream &stream) const
 Print the matrix.
 
void printMatrix (std::string const &filename) const
 Print the matrix.
 
bool isZero (int row, int col) const
 Test if _matrix(row,col) is zero. More...
 
int echelonize ()
 Echelonize the matrix mat using the shape of the F4 matrix. More...
 

Private Attributes

Field::Element * _matrix
 Overload the operator =. More...
 
Field::Element * _A
 
Field::Element * _B
 
Field::Element * _C
 
Field::Element * _D
 
Field _F
 
int _height
 
int _width
 
int _nbPiv
 
int * _tau
 
int * _sigma
 
int * _startTail
 
int * _endCol
 

Detailed Description

template<class Field>
class F4::MatrixGeneric< Field >

Represent a matrix under fflas-ffpack format.

Definition at line 52 of file matrix-generic.h.

Constructor & Destructor Documentation

template<class Field >
F4::MatrixGeneric< Field >::MatrixGeneric ( Field &  f)

Constructor.

Parameters
fBase field.
template<class Field >
F4::MatrixGeneric< Field >::MatrixGeneric ( Field &  f,
int  height,
int  width 
)

Constructor.

Parameters
fBase field.
heightHeight of _matrix.
widthWidth of _matrix.
template<class Field >
F4::MatrixGeneric< Field >::MatrixGeneric ( Field &  f,
std::string const &  filename 
)

Constructor.

Parameters
fBase field.
filenameName of a matrix file.
template<class Field >
F4::MatrixGeneric< Field >::MatrixGeneric ( MatrixGeneric< Field > const &  matrix)

Copy constructor.

Parameters
matrixMatrixGeneric.
template<class Field >
F4::MatrixGeneric< Field >::MatrixGeneric ( MatrixGeneric< Field > &&  matrix)

Move constructor.

Parameters
matrixMatrixGeneric.

Member Function Documentation

template<class Field >
int F4::MatrixGeneric< Field >::echelonize ( )

Echelonize the matrix mat using the shape of the F4 matrix.

Returns
Height of the echelonized matrix.
template<class Field >
int F4::MatrixGeneric< Field >::getHeight ( ) const

Modify matrix element.

  • Get / Set */
    Parameters
    rowRow of the element.
    colColumn of the element.
    Returns
    Reference on the element. Get matrix element.
    Parameters
    rowRow of the element.
    colColumn of the element.
    Returns
    Element. Get matrix element.
    Parameters
    rowRow of the element.
    colColumn of the element.
    Returns
    Element. Modify matrix element.
    Parameters
    rowRow of the element.
    colColumn of the element.
    elementElement. Get the row-th row of this.
    rowIndex of the row. Get the height of the matrix (number of rows).
template<class Field >
bool F4::MatrixGeneric< Field >::isZero ( int  row,
int  col 
) const

Test if _matrix(row,col) is zero.

Parameters
rowRow of the element.
colColumn of the element.
Returns
true if _matrix(row,col) is zero.
false otherwise.

Member Data Documentation

template<class Field >
Field::Element* F4::MatrixGeneric< Field >::_A
private

Upper left

Definition at line 259 of file matrix-generic.h.

template<class Field >
Field::Element* F4::MatrixGeneric< Field >::_B
private

Upper right

Definition at line 260 of file matrix-generic.h.

template<class Field >
Field::Element* F4::MatrixGeneric< Field >::_C
private

Lower left

Definition at line 261 of file matrix-generic.h.

template<class Field >
Field::Element* F4::MatrixGeneric< Field >::_D
private

Lower right

Definition at line 262 of file matrix-generic.h.

template<class Field >
int* F4::MatrixGeneric< Field >::_endCol
private

endCol[i] = end of column i if i < nbPiv. Otherwise endCol[i]=end of column i without taking into account the lines under nbPiv.

Definition at line 270 of file matrix-generic.h.

template<class Field >
Field F4::MatrixGeneric< Field >::_F
private

Base field

Definition at line 263 of file matrix-generic.h.

template<class Field >
int F4::MatrixGeneric< Field >::_height
private

Height of _matrix.

Definition at line 264 of file matrix-generic.h.

template<class Field >
Field::Element* F4::MatrixGeneric< Field >::_matrix
private

Overload the operator =.

  • Internal operator */
    Precondition
    The static variable MODULO must be set beforehand.
    Parameters
    matrixMatrixGeneric to copy.
    Returns
    Reference on this. Overload the operator = (move assignment). Used when mon is unnamed (only copy the pointer).
    Precondition
    The static variable MODULO must be set beforehand.
    Parameters
    matrixMatrixGeneric to copy.
    Returns
    Reference on this.Macaulay matrix

Definition at line 258 of file matrix-generic.h.

template<class Field >
int F4::MatrixGeneric< Field >::_nbPiv
private

Number of pivots.

Definition at line 266 of file matrix-generic.h.

template<class Field >
int* F4::MatrixGeneric< Field >::_sigma
private

_sigma[i]=index in tab_mon of the column i monomial.

Definition at line 268 of file matrix-generic.h.

template<class Field >
int* F4::MatrixGeneric< Field >::_startTail
private

startTail[i]=column of the first possibly non zero coefficient (in line i) after nb_piv if i < nb_piv. Otherwise startTail[i]=0. startTail[i] = min{j>=nb_piv : _igma[i]<_sigma[j]}.

Definition at line 269 of file matrix-generic.h.

template<class Field >
int* F4::MatrixGeneric< Field >::_tau
private

Permutation, _sigma(_tau(i))=_tau(_sigma(i))=i. _tau[i]=column of the monomial tab_mon[i].

Definition at line 267 of file matrix-generic.h.

template<class Field >
int F4::MatrixGeneric< Field >::_width
private

Width of _matrix.

Definition at line 265 of file matrix-generic.h.


The documentation for this class was generated from the following file: