CMR  1.3.0
Functions
linear_algebra_internal.h File Reference
#include <cmr/linear_algebra.h>

Go to the source code of this file.

Functions

CMR_ERROR CMRintmatComputeUpperDiagonal (CMR *cmr, CMR_INTMAT *matrix, bool invert, size_t *prank, CMR_SUBMAT **ppermutations, CMR_INTMAT **presult, CMR_INTMAT **ptranspose)
 Transforms matrix into a new matrix by applying integer row operations and row- and column swaps to find an upper-diagonal basis matrix. More...
 

Function Documentation

◆ CMRintmatComputeUpperDiagonal()

CMR_ERROR CMRintmatComputeUpperDiagonal ( CMR cmr,
CMR_INTMAT matrix,
bool  invert,
size_t *  prank,
CMR_SUBMAT **  ppermutations,
CMR_INTMAT **  presult,
CMR_INTMAT **  ptranspose 
)

Transforms matrix into a new matrix by applying integer row operations and row- and column swaps to find an upper-diagonal basis matrix.

The rank \( r \) is stored in *prank and the row- and column permutations are stored in *ppermutations, such that the first \( r \) rows and columns of the resulting matrix form an invertible upper-diagonal matrix. If invert is true then in this \( r \)-by- \( r \) submatrix, the largest (in terms of absolute value) entry in each column is on the diagonal.

Parameters
cmrCMR environment.
matrixA matrix
invertWhether the transformed basis columns shall be strictly diagonally dominant.
prankPointer for storing the rank of the basis matrix.
ppermutationsPointer for storing the row- and column permutations applied to matrix (may be NULL).
presultPointer for storing the resulting int matrix (may be NULL).
ptransposePointer for storing the transpose of the result int matrix (may be NULL).