Class used to perform row reduction operations on a matrix.
More...
#include <ProgressiveRowReducer.h>
|
| ProgressiveRowReducer (unsigned int nCols=0) |
| Constructor. More...
|
|
void | reset (unsigned int nCols) |
| Clears the reducer and set the number of columns to nCols . More...
|
|
void | addRow (GeneratingMatrix newRow) |
| Adds a row below the current matrix and updates the reduction subsequently. More...
|
|
void | addColumn (GeneratingMatrix newCol) |
| Adds a column on the right to the current matrix and updates the reduction subsequently. More...
|
|
void | replaceRow (unsigned int rowIndex, GeneratingMatrix &&newRow, int verbose=0) |
| Replaces the row in position rowIndex by newRow . More...
|
|
unsigned int | computeRank () const |
| Computes the rank of the matrix.
|
|
std::vector< unsigned int > | computeRanks (unsigned int firstCol, unsigned int numCol) const |
| Computes the ranks of the submatrices with an increasing number of columns. More...
|
|
unsigned int | smallestFullRank () |
| Returns the minimal number of columns necessary for the system spanned by the rows to be of full rank. More...
|
|
const GeneratingMatrix & | reducedMatrix () const |
| Returns a const reference to the row-reduced matrix.
|
|
const GeneratingMatrix & | rowOperations () const |
| Returns a const reference to the row operations matrix.
|
|
unsigned int | numRows () const |
| Returns the number of rows in the reducer.
|
|
unsigned int | numCols () const |
| Returns the number of columns in the reducer.
|
|
std::map< unsigned int, unsigned int > | getPivots () const |
| Returns a map of pivot positions (key: row index, value: column index).
|
|
Class used to perform row reduction operations on a matrix.
◆ ProgressiveRowReducer()
NetBuilder::ProgressiveRowReducer::ProgressiveRowReducer |
( |
unsigned int |
nCols = 0 | ) |
|
Constructor.
- Parameters
-
nCols | number of columns of the reducer. |
◆ addColumn()
Adds a column on the right to the current matrix and updates the reduction subsequently.
- Parameters
-
newCol | The one-column matrix to stack on the right. |
◆ addRow()
Adds a row below the current matrix and updates the reduction subsequently.
- Parameters
-
newRow | The one-row matrix to stack below. |
◆ checkIfInvertible()
static bool NetBuilder::ProgressiveRowReducer::checkIfInvertible |
( |
GeneratingMatrix |
matrix | ) |
|
|
static |
Check if a matrix is invertible.
Returns false if the matrix is not-square or singular, and true otherwise.
◆ computeRanks()
std::vector<unsigned int> NetBuilder::ProgressiveRowReducer::computeRanks |
( |
unsigned int |
firstCol, |
|
|
unsigned int |
numCol |
|
) |
| const |
Computes the ranks of the submatrices with an increasing number of columns.
- Parameters
-
firstCol | Index of the the last column of the first submatrix. |
numCol | Number of submatrices to consider. |
◆ replaceRow()
void NetBuilder::ProgressiveRowReducer::replaceRow |
( |
unsigned int |
rowIndex, |
|
|
GeneratingMatrix && |
newRow, |
|
|
int |
verbose = 0 |
|
) |
| |
Replaces the row in position rowIndex
by newRow
.
- Parameters
-
rowIndex | Index of the row to discard. |
newRow | Replacement row. |
verbose | Verbosity level. |
◆ reset()
void NetBuilder::ProgressiveRowReducer::reset |
( |
unsigned int |
nCols | ) |
|
Clears the reducer and set the number of columns to nCols
.
- Parameters
-
nCols | New number of columns of the reducer. |
◆ smallestFullRank()
unsigned int NetBuilder::ProgressiveRowReducer::smallestFullRank |
( |
| ) |
|
|
inline |
Returns the minimal number of columns necessary for the system spanned by the rows to be of full rank.
Returns nCols() + 1 if the system is not of full rank even if all the columns are taken.
The documentation for this class was generated from the following file: