23#ifndef LINEAR_ALGEBRA_H
24#define LINEAR_ALGEBRA_H
222 const bool isRowEchelon,
442 const number tolerance,
466 const number tolerance,
491 const number tolerance
569bool qrDS(
const int n,
matrix* queue,
int& queueL, number* eigenValues,
570 int& eigenValuesL,
const number tol1,
const number tol2,
const ring
R);
579 const number tolerance
bool luSolveViaLDUDecomp(const matrix pMat, const matrix lMat, const matrix dMat, const matrix uMat, const poly l, const poly u, const poly lTimesU, const matrix bVec, matrix &xVec, matrix &H)
Solves the linear system A * x = b, where A is an (m x n)-matrix which is given by its LDU-decomposit...
bool luInverseFromLUDecomp(const matrix pMat, const matrix lMat, const matrix uMat, matrix &iMat, const ring r=currRing)
Computes the inverse of an (n x n)-matrix which is given by its LU- decomposition.
void luDecomp(const matrix aMat, matrix &pMat, matrix &lMat, matrix &uMat, const ring r=currRing)
LU-decomposition of a given (m x n)-matrix.
bool realSqrt(const number n, const number tolerance, number &root)
Computes the square root of a non-negative real number and returns it as a new number.
void swapColumns(int column1, int column2, matrix &aMat)
Swaps two columns of a given matrix and thereby modifies it.
bool luInverse(const matrix aMat, matrix &iMat, const ring r=currRing)
Computes the inverse of a given (n x n)-matrix.
void hessenberg(const matrix aMat, matrix &pMat, matrix &hessenbergMat, const number tolerance, const ring r)
Computes the Hessenberg form of a given square matrix.
int quadraticSolve(const poly p, number &s1, number &s2, const number tolerance)
Returns all solutions of a quadratic polynomial relation with real coefficients.
bool unitMatrix(const int n, matrix &unitMat, const ring r=currRing)
Creates a new matrix which is the (nxn) unit matrix, and returns true in case of success.
void matrixBlock(const matrix aMat, const matrix bMat, matrix &block)
Creates a new matrix which contains the first argument in the top left corner, and the second in the ...
void henselFactors(const int xIndex, const int yIndex, const poly h, const poly f0, const poly g0, const int d, poly &f, poly &g)
Computes a factorization of a polynomial h(x, y) in K[[x]][y] up to a certain degree in x,...
bool pivot(const matrix aMat, const int r1, const int r2, const int c1, const int c2, int *bestR, int *bestC, const ring r=currRing)
Finds the best pivot element in some part of a given matrix.
int similar(const number *nn, const int nnLength, const number n, const number tolerance)
Tries to find the number n in the array nn[0..nnLength-1].
bool qrDS(const int n, matrix *queue, int &queueL, number *eigenValues, int &eigenValuesL, const number tol1, const number tol2, const ring R)
bool charPoly(const matrix aMat, poly &charPoly)
Computes the characteristic polynomial from a quadratic (2x2) matrix and returns true in case of succ...
void lduDecomp(const matrix aMat, matrix &pMat, matrix &lMat, matrix &dMat, matrix &uMat, poly &l, poly &u, poly &lTimesU)
LU-decomposition of a given (m x n)-matrix with performing only those divisions that yield zero remai...
void swapRows(int row1, int row2, matrix &aMat)
Swaps two rows of a given matrix and thereby modifies it.
int luRank(const matrix aMat, const bool isRowEchelon, const ring r=currRing)
Computes the rank of a given (m x n)-matrix.
bool lowerLeftTriangleInverse(const matrix lMat, matrix &iMat, bool diagonalIsOne)
Computes the inverse of a given (n x n)-matrix in lower left triangular form.
bool subMatrix(const matrix aMat, const int rowIndex1, const int rowIndex2, const int colIndex1, const int colIndex2, matrix &subMat)
Creates a new matrix which is a submatrix of the first argument, and returns true in case of success.
int pivotScore(number n, const ring r=currRing)
Returns a pivot score for any non-zero matrix entry.
bool upperRightTriangleInverse(const matrix uMat, matrix &iMat, bool diagonalIsOne, const ring r=currRing)
Computes the inverse of a given (n x n)-matrix in upper right triangular form.
bool luSolveViaLUDecomp(const matrix pMat, const matrix lMat, const matrix uMat, const matrix bVec, matrix &xVec, matrix &H)
Solves the linear system A * x = b, where A is an (m x n)-matrix which is given by its LU-decompositi...
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...