Classes | Typedefs | Enumerations | Functions
fmatvec Namespace Reference

Namespace fmatvec. More...

Classes

class  Matrix< GeneralBand, AT >
 This is a matrix class for general band matrices. More...
class  Matrix< Diagonal, AT >
 This is a matrix class for diagonal matrices. More...
class  Matrix< General, AT >
 This is a matrix class for general matrices. More...
class  Index
 This is an index class for creating submatrices. More...
class  Matrix
 This is the basic matrix class for arbitrary matrices. More...
class  RowVector
 This is a rowvector class of general shape in dense storage format. More...
class  Matrix< Sparse, AT >
 This is a matrix class for sparse quadratic matrices. More...
class  SquareMatrix
 This is a matrix class of general quadratic matrices. More...
class  Matrix< Symmetric, AT >
 This is a matrix class for symmetric matrices. More...
class  BasicType
 Basic shape class for matrices. More...
class  General
 Shape class for general matrices. More...
class  GeneralBand
 Shape class for general band matrices. More...
class  Symmetric
 Shape class for symmetric matrices. More...
class  Diagonal
 Shape class for diagonal matrices. More...
class  Sparse
 Shape class for sparse matrices. More...
class  Vector
 This is a vector class of general shape in dense storage format. More...

Typedefs

typedef Matrix< General, double > Mat
 General matrix.
typedef Vector< double > Vec
 Vector.
typedef RowVector< double > RowVec
 Row vector.
typedef SquareMatrix< double > SqrMat
 Square matrix.
typedef Matrix< Diagonal, double > DiagMat
 Diagonal matrix.
typedef Matrix< Symmetric, double > SymMat
 Symmetric matrix.
typedef Matrix< GeneralBand,
double > 
BandMat
 Band matrix.

Enumerations

enum  Initialization { INIT, NONINIT, EYE }

Functions

void myblas_daxpy (const CBLAS_TRANSPOSE transa, const CBLAS_TRANSPOSE transb, int m, int n, double alpha, const double *a, int lda1, double *b, int ldb1)
void myblas_dcopy (const CBLAS_TRANSPOSE transa, const CBLAS_TRANSPOSE transb, int m, int n, const double *a, int lda1, double *b, int ldb1)
void myblas_dscal (int n, double da, const double *dx, int incx, double *c)
void myblas_dscal (const CBLAS_TRANSPOSE transa, int m, int n, double alpha, const double *a, int lda1, double *c, int ldc)
void myblas_dscal (char transa, int m, int n, double alpha, double *a, int lda1)
void myblas_daxpy (int n, double da, const double *dx, int incx, const double *dy, int incy, double *c)
void myblas_daxpy (const CBLAS_TRANSPOSE transa, const CBLAS_TRANSPOSE transb, int m, int n, double alpha, const double *a, int lda1, const double *b, int ldb1, double *c, int ldc)
bool operator== (const Index &I, const Index &J)
 Equality operator for indices.
template<class AT >
RowVector< AT > trans (const Vector< AT > &x)
 Transpose of a vector.
template<class AT >
Vector< AT > operator- (const Vector< AT > &x)
 Negation.
template<class AT >
Vector< AT > operator* (const Vector< AT > &x, const AT &alpha)
 Vector-scalar multiplication.
template<class AT >
Vector< AT > operator* (const AT &alpha, const Vector< AT > &x)
 Scalar-vector multiplication.
template<class AT >
Vector< AT > trans (const RowVector< AT > &x)
 Transpose of a rowvector.
template<class AT >
RowVector< AT > operator- (const RowVector< AT > &a)
 Negation.
template<class AT >
RowVector< AT > operator* (const RowVector< AT > &x, const AT &alpha)
 Rowvector-scalar multiplication.
template<class AT >
RowVector< AT > operator* (const AT &alpha, const RowVector< AT > &x)
 Scalar-rowvector multiplication.
template<class AT >
Vector< AT > operator+ (const Vector< AT > &x, const Vector< AT > &y)
 Vector-vector addition.
template<class AT >
Vector< AT > operator- (const Vector< AT > &x, const Vector< AT > &y)
 Vector-vector subtraction.
template<class AT >
AT scalarProduct (const Vector< AT > &x, const Vector< AT > &y)
 Scalar product.
template<class AT >
Vector< AT > crossProduct (const Vector< AT > &x, const Vector< AT > &y)
 Cross product.
template<class AT >
double tripleProduct (const Vector< AT > &a, const Vector< AT > &x, const Vector< AT > &y)
 Triple product.
template<class AT >
RowVector< AT > operator- (const RowVector< AT > &x, const RowVector< AT > &y)
 Rowvector-rowvector subtraction.
template<class AT >
AT operator* (const RowVector< AT > &x, const Vector< AT > &y)
 Scalar product.
template<class AT >
Matrix< General, AT > trans (const Matrix< General, AT > &A)
 Transpose of a matrix.
template<class AT >
SquareMatrix< AT > trans (const SquareMatrix< AT > &A)
 Transpose of a matrix.
template<class AT >
SquareMatrix< AT > operator- (const SquareMatrix< AT > &A)
 Negation.
template<class AT , class Type >
Matrix< Type, AT > operator- (const Matrix< Type, AT > &A)
 Negation.
template<class AT , class Type >
Matrix< Type, AT > operator* (const Matrix< Type, AT > &A, const AT &alpha)
 Matrix-scalar multiplication.
template<class AT , class Type >
Matrix< Type, AT > operator* (const AT &alpha, const Matrix< Type, AT > &A)
 Scalar-matrix multiplication.
template<class AT >
SquareMatrix< AT > tilde (const Vector< AT > &x)
 Tilde operator.
template<class AT , class Type >
Vector< AT > operator* (const Matrix< Type, AT > &A, const Vector< AT > &x)
 Matrix-vector multiplication.
template<class AT , class Type >
RowVector< AT > operator* (const RowVector< AT > &x, const Matrix< Type, AT > &A)
 Vector-matrix multiplication.
template<class AT , class Type1 , class Type2 >
Matrix< General, AT > operator+ (const Matrix< Type1, AT > &A, const Matrix< Type2, AT > &B)
 Matrix-matrix addition.
template<class AT , class Type1 , class Type2 >
Matrix< General, AT > operator- (const Matrix< Type1, AT > &A, const Matrix< Type2, AT > &B)
 Matrix-matrix subtraction.
template<class AT , class Type1 , class Type2 >
Matrix< General, AT > operator* (const Matrix< Type1, AT > &A, const Matrix< Type2, AT > &B)
 Matrix-matrix multiplication.
template<class AT , class Type1 , class Type2 >
bool operator== (const Matrix< Type1, AT > &A, const Matrix< Type2, AT > &B)
 Matrix-matrix comparison.
template<class AT , class Type1 , class Type2 >
bool operator!= (const Matrix< Type1, AT > &A, const Matrix< Type2, AT > &B)
 Matrix-matrix comparison.
template<class AT >
Vector< AT > operator* (const Matrix< Sparse, AT > &A, const Vector< AT > &x)
 Matrix-vector multiplication.
template<class AT >
AT max (const Vector< AT > &x)
 Maximum value.
template<class AT >
int maxIndex (const Vector< AT > &x)
 Index of maximum value.
template<class AT >
AT min (const Vector< AT > &x)
 Minimum value.
template<class AT >
int minIndex (const Vector< AT > &x)
 Index of minimum value.
template<class AT >
Matrix< General, AT > bubbleSort (const Matrix< General, AT > &A_, int PivotCol)
 Bubble Sort Algorithm (stable sorting Algorithm )
template<class AT >
void quicksortmedian_intern (Matrix< General, AT > &A, int PivotCol, RowVector< AT > &tmp, int l, int r)
template<class AT >
Matrix< General, AT > quickSortMedian (const Matrix< General, AT > &A_, int PivotCol)
 Modified QuickSort Algorithm (unstable sorting Algorithm )
template<class AT >
int countElements (const SquareMatrix< AT > &A)
 Count nonzero elements.
Matrix< Diagonal, double > & operator*= (const Matrix< Diagonal, double > &A, double alpha)
 Matrix-scalar multiplication.
Matrix< Diagonal, double > & operator/= (const Matrix< Diagonal, double > &A, double alpha)
 Matrix-scalar division.
SquareMatrix< double > & operator*= (const SquareMatrix< double > &A, double alpha)
 Matrix-scalar multiplication.
SquareMatrix< double > & operator/= (const SquareMatrix< double > &A, double alpha)
 Matrix-scalar division.
SquareMatrix< double > operator* (const SquareMatrix< double > &A, double alpha)
 Matrix-scalar multiplication.
SquareMatrix< double > operator* (double alpha, const SquareMatrix< double > &A)
 Scalar-matrix multiplication.
SquareMatrix< double > operator/ (const SquareMatrix< double > &A, double alpha)
 Matrix-scalar division.
Matrix< General, double > & operator*= (const Matrix< General, double > &A, const double &alpha)
 Matrix-scalar multiplication.
Matrix< General, double > & operator/= (const Matrix< General, double > &A, const double &alpha)
 Matrix-scalar division.
Matrix< General, double > operator+ (const Matrix< General, double > &A, const Matrix< General, double > &B)
 Matrix-matrix addition.
Matrix< General, double > operator- (const Matrix< General, double > &A, const Matrix< General, double > &B)
 Matrix-matrix subtraction.
SquareMatrix< double > operator+ (const SquareMatrix< double > &A, const SquareMatrix< double > &B)
 Matrix-matrix addition.
Matrix< Symmetric, double > operator+ (const Matrix< Symmetric, double > &A, const Matrix< Symmetric, double > &B)
 Matrix-matrix addition.
SquareMatrix< double > operator- (const SquareMatrix< double > &A, const SquareMatrix< double > &B)
 Matrix-matrix subtraction.
Matrix< Symmetric, double > operator- (const Matrix< Symmetric, double > &A, const Matrix< Symmetric, double > &B)
 Matrix-matrix subtraction.
Matrix< General, double > operator* (const Matrix< General, double > &A, double alpha)
 Matrix-scalar multiplication.
Matrix< General, double > operator* (double alpha, const Matrix< General, double > &A)
 Scalar-matrix multiplication.
Matrix< General, double > operator/ (const Matrix< General, double > &A, double alpha)
 Matrix-scalar division.
Matrix< Symmetric, double > operator* (const Matrix< Symmetric, double > &A, double alpha)
 Matrix-scalar multiplication.
Matrix< Symmetric, double > operator* (double alpha, const Matrix< Symmetric, double > &A)
 Scalar-matrix multiplication.
Matrix< Symmetric, double > operator/ (const Matrix< Symmetric, double > &A, double alpha)
 Matrix-scalar division.
Matrix< Diagonal, double > operator* (const Matrix< Diagonal, double > &A, double alpha)
 Matrix-scalar multiplication.
Matrix< Diagonal, double > operator* (double alpha, const Matrix< Diagonal, double > &A)
 Scalar-matrix multiplication.
Matrix< Diagonal, double > operator/ (const Matrix< Diagonal, double > &A, double alpha)
 Matrix-scalar division.
Matrix< Symmetric, double > JTJ (const Matrix< General, double > &A)
 Special multiplication.
Matrix< Symmetric, double > JTMJ (const Matrix< Symmetric, double > &B, const Matrix< General, double > &A)
 Special multiplication.
Matrix< Symmetric, double > JTMJ (const Matrix< Diagonal, double > &B, const Matrix< General, double > &A)
 Special multiplication.
Matrix< Diagonal, double > & operator+= (const Matrix< Diagonal, double > &A, const Matrix< Diagonal, double > &B)
 Matrix-matrix addition.
Matrix< Diagonal, double > & operator-= (const Matrix< Diagonal, double > &A, const Matrix< Diagonal, double > &B)
 Matrix-matrix subtraction.
Matrix< Symmetric, double > & operator+= (const Matrix< Symmetric, double > &A, const Matrix< Symmetric, double > &B)
 Matrix-matrix addition.
Matrix< Symmetric, double > & operator-= (const Matrix< Symmetric, double > &A, const Matrix< Symmetric, double > &B)
 Matrix-matrix subtraction.
SquareMatrix< double > & operator+= (const SquareMatrix< double > &A, const SquareMatrix< double > &B)
 Matrix-matrix addition.
SquareMatrix< double > & operator-= (const SquareMatrix< double > &A, const SquareMatrix< double > &B)
 Matrix-matrix subtraction.
Matrix< General, double > & operator+= (const Matrix< General, double > &A, const Matrix< General, double > &B)
 Matrix-matrix addition.
Matrix< General, double > & operator-= (const Matrix< General, double > &A, const Matrix< General, double > &B)
 Matrix-matrix subtraction.
Matrix< General, double > operator* (const Matrix< General, double > &A, const Matrix< General, double > &B)
 Matrix-matrix multiplication.
SquareMatrix< double > operator* (const SquareMatrix< double > &A, const SquareMatrix< double > &B)
 Matrix-matrix multiplication.
Matrix< General, double > operator* (const Matrix< General, double > &A, const Matrix< Symmetric, double > &B)
 Matrix-matrix multiplication.
Matrix< General, double > operator* (const Matrix< Symmetric, double > &A, const Matrix< General, double > &B)
 Scalar-matrix multiplication.
Matrix< General, double > operator* (const Matrix< General, double > &A, const Matrix< Diagonal, double > &B)
 Matrix-matrix multiplication.
Matrix< General, double > operator* (const Matrix< Diagonal, double > &B, const Matrix< General, double > &A)
 Scalar-matrix multiplication.
Vector< double > & operator*= (const Vector< double > &x, const double &alpha)
 Vector-scalar multiplication.
Vector< double > operator* (const Vector< double > &x, double alpha)
 Vector-scalar multiplication.
Vector< double > operator* (double alpha, const Vector< double > &x)
 Scalar-vector multiplication.
Vector< double > & operator/= (const Vector< double > &x, const double &alpha)
 Vector-scalar division.
Vector< double > operator/ (const Vector< double > &x, double alpha)
 Vector-scalar division.
Vector< double > & operator+= (const Vector< double > &x, const Vector< double > &y)
 Vector-vector addition.
Vector< double > & operator-= (const Vector< double > &x, const Vector< double > &y)
 Vector-vector subtraction.
Vector< double > operator+ (const Vector< double > &x, const Vector< double > &y)
 Vector-vector addition.
Vector< double > operator- (const Vector< double > &x, const Vector< double > &y)
 Vector-vector subtraction.
RowVector< double > & operator*= (const RowVector< double > &x, const double &alpha)
 vector-scalar multiplication.
RowVector< double > & operator/= (const RowVector< double > &x, const double &alpha)
 Vector-scalar division.
RowVector< double > operator* (double alpha, const RowVector< double > &x)
 Vector-scalar multiplication.
RowVector< double > operator* (const RowVector< double > &x, double alpha)
 Scalar-vector multiplication.
RowVector< double > operator/ (const RowVector< double > &x, double alpha)
 Vector-scalar division.
RowVector< double > & operator+= (const RowVector< double > &x, const RowVector< double > &y)
 Vector-vector addition.
RowVector< double > & operator-= (const RowVector< double > &x, const RowVector< double > &y)
 Vector-vector subtraction.
RowVector< double > operator+ (const RowVector< double > &x, const RowVector< double > &y)
 Vector-vector addition.
RowVector< double > operator- (const RowVector< double > &x, const RowVector< double > &y)
 Vector-vector subtraction.
Vector< double > operator* (const Matrix< General, double > &A, const Vector< double > &x)
 Matrix-vector multiplication.
Vector< double > operator* (const Matrix< Symmetric, double > &A, const Vector< double > &x)
 Matrix-vector multiplication.
Vector< double > operator* (const Matrix< Diagonal, double > &A, const Vector< double > &x)
 Matrix-vector multiplication.
RowVector< double > operator* (const RowVector< double > &x, const Matrix< General, double > &A)
 Vector-matrix multiplication.
RowVector< double > operator* (const RowVector< double > &x, const Matrix< Symmetric, double > &A)
 Vector-matrix multiplication.
RowVector< double > operator* (const RowVector< double > &x, const Matrix< Diagonal, double > &A)
 Vector-matrix multiplication.
double operator* (const RowVector< double > &x, const Vector< double > &y)
 Vector-vector multiplication.
Vector< std::complex< double > > eigval (const SquareMatrix< double > &A)
 Eigenvalues.
int eigvec (const Matrix< Symmetric, double > &A, const Matrix< Symmetric, double > &B, SquareMatrix< double > &eigenvectors, Vector< double > &eigenvalues)
 Eigenvectors and Eigenvalues.
Vector< double > eigval (const Matrix< Symmetric, double > &A)
 Eigenvalues.
Vector< double > eigvalSel (const Matrix< Symmetric, double > &A, int il, int iu, double abstol=0)
 Eigenvalues.
Matrix< General, double > slvLU (const SquareMatrix< double > &A, const Matrix< General, double > &B)
 Systems of linear equations.
Vector< double > slvLU (const SquareMatrix< double > &A, const Vector< double > &b)
 System of linear equations.
Matrix< General, double > slvLUFac (const SquareMatrix< double > &A, const Matrix< General, double > &B, const Vector< int > &ipiv)
 Systems of linear equations.
Vector< double > slvLUFac (const SquareMatrix< double > &A, const Vector< double > &b, const Vector< int > &ipiv)
 System of linear equations.
Matrix< General, double > slvLL (const Matrix< Symmetric, double > &A, const Matrix< General, double > &B)
 Systems of linear equations.
Vector< double > slvLL (const Matrix< Symmetric, double > &A, const Vector< double > &b)
 System of linear equations.
Matrix< General, double > slvQR (const SquareMatrix< double > &A, const Matrix< General, double > &B)
 Systems of linear equations.
Vector< double > slvQR (const SquareMatrix< double > &A, const Vector< double > &b)
 System of linear equations.
SquareMatrix< double > inv (const SquareMatrix< double > &A)
 Inverse.
Matrix< Symmetric, double > inv (const Matrix< Symmetric, double > &A)
 Inverse.
Matrix< Diagonal, double > inv (const Matrix< Diagonal, double > &A)
 Inverse.
Matrix< General, double > facLU (const Matrix< General, double > &A, Vector< int > &ipiv)
 LU decomposition.
SquareMatrix< double > facLU (const SquareMatrix< double > &A, Vector< int > &ipiv)
 LU decomposition.
Matrix< Symmetric, double > facLL (const Matrix< Symmetric, double > &A)
 LL decomposition.
double nrm1 (const Vector< double > &x)
 1-norm
double nrm2 (const Vector< double > &x)
 2-norm
double nrmInf (const Vector< double > &x)
 Infinity-norm.
double nrm1 (const Matrix< General, double > &A)
 1-norm
double nrm2 (const Matrix< General, double > &A)
 2-norm
double nrmInf (const Matrix< General, double > &A)
 Infinity-norm.
double nrmFro (const Matrix< General, double > &A)
 Frobenius-norm.
double rho (const SquareMatrix< double > &A)
 Spectral radius.
double rho (const Matrix< Symmetric, double > &A)
 Spectral radius.
Vector< double > slvLLFac (const Matrix< Symmetric, double > &A, const Vector< double > &x)
Matrix< General, double > slvLLFac (const Matrix< Symmetric, double > &A, const Matrix< General, double > &X)
Matrix< General, double > slvLS (const Matrix< General, double > &A, const Matrix< General, double > &B, double rcond=-1)
Vector< double > slvLS (const Matrix< General, double > &A, const Vector< double > &b, double rcond=-1)
template<class ST , class AT >
std::ostream & operator<< (std::ostream &os, const Matrix< ST, AT > &A)
 Matrix output.
template<class ST , class AT >
std::istream & operator>> (std::istream &is, Matrix< ST, AT > &A)
 Matrix input.
template<class ST , class AT >
void dump (const char *str, const Matrix< ST, AT > &A)
 Matrix dump.
int dsyevx (const char jobz, const char range, const CBLAS_UPLO cuplo, const int n, double *a, const int lda, const double vl, const double vu, const int il, const int iu, const double abstol, const int *m, double *w, double *z, const int ldz)
int dgels (const CBLAS_TRANSPOSE ctr, const int m, const int n, const int nhrs, double *a, const int lda, double *b, const int ldb)
int dgelss (const int m, const int n, const int nrhs, double *a, const int lda, double *b, const int ldb, const double rcond)
int dgeev (const char jobvl, const char jobvr, const int n, double *a, const int lda, double *wr, double *wi, double *vl, const int ldvl, double *vr, const int ldvr)
int dsygv (const int itype, const char jobz, const char uplo, const int n, double *a, const int lda, double *b, const int ldb, double *w)
int dsyev (const char jobz, const char ul, const int n, double *a, const int lda, double *w)
double dlange (const char norm, const int m, const int n, const double *a, const int lda)

Detailed Description

Namespace fmatvec.


Typedef Documentation

Band matrix.

BandMat is an abbreviation for band matrices of type double.

typedef Matrix<Diagonal, double> fmatvec::DiagMat

Diagonal matrix.

DiagMat is an abbreviation for diagonal matrices of type double.

typedef Matrix<General, double> fmatvec::Mat

General matrix.

Mat is an abbreviation for general matrices of type double.

typedef RowVector<double> fmatvec::RowVec

Row vector.

RowVec is an abbreviation for row vectors of type double.

typedef SquareMatrix<double> fmatvec::SqrMat

Square matrix.

SqrMat is an abbreviation for square matrices of type double.

typedef Matrix<Symmetric, double> fmatvec::SymMat

Symmetric matrix.

SymMat is an abbreviation for symmetric matrices of type double.

typedef Vector<double> fmatvec::Vec

Vector.

Vec is an abbreviation for vectors of type double.


Enumeration Type Documentation

Enumerate for initialization of matrices


Function Documentation

template<class AT >
Matrix<General, AT> fmatvec::bubbleSort ( const Matrix< General, AT > &  A_,
int  PivotCol 
)

Bubble Sort Algorithm (stable sorting Algorithm )

Values of rowvectors of Matrix A are sorted in ascending order

Parameters:
A_Matrix to be sorted
PivotColColumn of A used as sorting index

References fmatvec::Matrix< General, AT >::cols(), fmatvec::Matrix< General, AT >::copy(), fmatvec::Matrix< General, AT >::row(), and fmatvec::Matrix< General, AT >::rows().

template<class AT >
int fmatvec::countElements ( const SquareMatrix< AT > &  A)

Count nonzero elements.

This function counts the nonzero elements of a matrix. ALL diagonal elements are treated as NONZERO!!! (See the storage format for sparse matrix)

Returns:
The number of nonzero or diagonal elemets.

References fmatvec::SquareMatrix< AT >::size().

Referenced by fmatvec::Matrix< Sparse, AT >::operator<<().

template<class AT >
Vector<AT> fmatvec::crossProduct ( const Vector< AT > &  x,
const Vector< AT > &  y 
)

Cross product.

This function computes the cross product of two vectors.

Returns:
The cross product.

References fmatvec::Vector< AT >::size().

template<class ST , class AT >
void fmatvec::dump ( const char *  str,
const Matrix< ST, AT > &  A 
)

Matrix dump.

This function dumps a matrix to a file in ASCII-format.

Parameters:
isThe filename.
AA matrix of any shape and type.

References fmatvec::Matrix< ST, AT >::cols(), and fmatvec::Matrix< ST, AT >::rows().

Vector<std::complex<double> > fmatvec::eigval ( const SquareMatrix< double > &  A)

Eigenvalues.

This function computes the complex eigenvalues of a square matrix.

Parameters:
AA square matrix.
Returns:
A vector containig the eigenvalues.
Vector<double> fmatvec::eigval ( const Matrix< Symmetric, double > &  A)

Eigenvalues.

This function computes the eigenvalues of a symmetric matrix.

Parameters:
AA symmetric matrix.
Returns:
A vector containig the eigenvalues.
Vector<double> fmatvec::eigvalSel ( const Matrix< Symmetric, double > &  A,
int  il,
int  iu,
double  abstol = 0 
)

Eigenvalues.

This function computes selected eigenvalues of a symmetric matrix. The eigenvalues can be selected by specifying either a range of values or a range of indices for the desired eigenvalues.

Parameters:
AA symmetric matrix.
ilThe index of the smallest eigenvalue to be returned
iuThe index of the largest eigenvalue to be returned
abstolThe absolute error tolerance for the eigenvalues
Returns:
A vector containig the eigenvalues.
int fmatvec::eigvec ( const Matrix< Symmetric, double > &  A,
const Matrix< Symmetric, double > &  B,
SquareMatrix< double > &  eigenvectors,
Vector< double > &  eigenvalues 
)

Eigenvectors and Eigenvalues.

This function computes all the eigenvectors and the eigenvalues of a real generalized symmetric-definite eigenproblem, of the form A*x=(lambda)*B*x. Here A and B are assumed to be symmetric and B is also positive definite.

Parameters:
AA symmetric matrix.
BA symmetric, positive definite matrix.
eigenvectorA square matrix in the dimension of A, containing the normalized Eigenvectors at the end of the function.
eigenvaluesA vector in the size of A, containing the Eigenvalues at the end of the function
Returns:
void
Matrix<Symmetric, double> fmatvec::facLL ( const Matrix< Symmetric, double > &  A)

LL decomposition.

This function computes the Cholesky decomposition of a symmetric matrix according to

\[\boldsymbol{A}=\boldsymbol{L}\,\boldsymbol{L} \]

Parameters:
AA symmetric matrix.
Returns:
A symmetric matrix containig the result.
Matrix<General, double> fmatvec::facLU ( const Matrix< General, double > &  A,
Vector< int > &  ipiv 
)

LU decomposition.

This function computes the LU decomposition of a general matrix according to

\[\boldsymbol{A}=\boldsymbol{P}\,\boldsymbol{L}\,\boldsymbol{U} \]

Parameters:
AA general matrix.
ipivA vector of integers containing the pivot indices.
Returns:
A general matrix containig the result.
SquareMatrix<double> fmatvec::facLU ( const SquareMatrix< double > &  A,
Vector< int > &  ipiv 
)

LU decomposition.

This function computes the LU decomposition of a square matrix according to

\[\boldsymbol{A}=\boldsymbol{P}\,\boldsymbol{L}\,\boldsymbol{U} \]

Parameters:
AA square matrix.
ipivA vector of integers containing the pivot indices.
Returns:
A square matrix containig the result.
SquareMatrix<double> fmatvec::inv ( const SquareMatrix< double > &  A)

Inverse.

This function computes the inverse of a general matrix according to

\[\boldsymbol{A}^{-1} \]

Parameters:
AA square matrix.
Returns:
A square matrix containig the result.
Matrix<Symmetric, double> fmatvec::inv ( const Matrix< Symmetric, double > &  A)

Inverse.

This function computes the inverse of a symmetric matrix according to

\[\boldsymbol{A}^{-1} \]

Parameters:
AA symmetric matrix.
Returns:
A symmetric matrix containig the result.
Matrix<Diagonal, double> fmatvec::inv ( const Matrix< Diagonal, double > &  A)

Inverse.

This function computes the inverse of a diagonal matrix according to

\[\boldsymbol{A}^{-1} \]

Parameters:
AA diagonal matrix.
Returns:
A diagonal matrix containig the result.
Matrix<Symmetric, double> fmatvec::JTJ ( const Matrix< General, double > &  A)

Special multiplication.

This function computes the product of a general matrix according to

\[ \boldsymbol{A}^T\,\boldsymbol{A} \]

Parameters:
AA general matrix.
Returns:
A new symmetric matrix containig the result.
Matrix<Symmetric, double> fmatvec::JTMJ ( const Matrix< Symmetric, double > &  B,
const Matrix< General, double > &  A 
)

Special multiplication.

This function computes the product of a symmetric and a general matrix according to

\[ \boldsymbol{A}^T\,\boldsymbol{B}\,\boldsymbol{A} \]

Parameters:
AA general matrix.
BA symmetric matrix.
Returns:
A new symmetric matrix containig the result.
Matrix<Symmetric, double> fmatvec::JTMJ ( const Matrix< Diagonal, double > &  B,
const Matrix< General, double > &  A 
)

Special multiplication.

This function computes the product of a diagonal and a symmetric matrix according to

\[ \boldsymbol{A}^T\,\boldsymbol{B}\,\boldsymbol{A} \]

Parameters:
AA general matrix.
BA diagonal matrix.
Returns:
A new symmetric matrix containig the result.
template<class AT >
AT fmatvec::max ( const Vector< AT > &  x)

Maximum value.

This function computes the maximum value of a vector.

Returns:
The maximum value.

References fmatvec::Vector< AT >::size().

template<class AT >
int fmatvec::maxIndex ( const Vector< AT > &  x)

Index of maximum value.

This function computes the index of the maximum value of a vector

Returns:
The index of the maximum value.

References fmatvec::Vector< AT >::size().

template<class AT >
AT fmatvec::min ( const Vector< AT > &  x)

Minimum value.

This function computes the minimum value of a vector.

Returns:
The minimum value.

References fmatvec::Vector< AT >::size().

template<class AT >
int fmatvec::minIndex ( const Vector< AT > &  x)

Index of minimum value.

This function computes the index of the minimum value of a vector

Returns:
The index of the minimum value.

References fmatvec::Vector< AT >::size().

double fmatvec::nrm1 ( const Vector< double > &  x)

1-norm

This function computes the sum of the absolute values of a vector.

Parameters:
xA vector.
Returns:
A scalar containig the result.
double fmatvec::nrm1 ( const Matrix< General, double > &  A)

1-norm

This function computes the largest column sum of the absolute values of a general matrix.

Parameters:
AA general matrix.
Returns:
A scalar containig the result.
double fmatvec::nrm2 ( const Vector< double > &  x)

2-norm

This function computes the the Euclidean norm of a vector.

Parameters:
xA vector.
Returns:
A scalar containig the result.
double fmatvec::nrm2 ( const Matrix< General, double > &  A)

2-norm

This function computes the largest singular value of a general matrix.

Parameters:
AA general matrix.
Returns:
A scalar containig the result.
double fmatvec::nrmFro ( const Matrix< General, double > &  A)

Frobenius-norm.

This function computes the Frobenius norm of a general matrix.

Parameters:
AA general matrix.
Returns:
A scalar containig the result.
double fmatvec::nrmInf ( const Vector< double > &  x)

Infinity-norm.

This function computes the the largest absolute value of a vector.

Parameters:
xA vector.
Returns:
A scalar containig the result.
double fmatvec::nrmInf ( const Matrix< General, double > &  A)

Infinity-norm.

This function computes the largest row sum of the absolute values of a general matrix.

Parameters:
AA general matrix.
Returns:
A scalar containig the result.
template<class AT , class Type1 , class Type2 >
bool fmatvec::operator!= ( const Matrix< Type1, AT > &  A,
const Matrix< Type2, AT > &  B 
)

Matrix-matrix comparison.

This function compares two matrices.

Returns:
True, if the matrices are different, false otherwise.

References fmatvec::Matrix< ST, AT >::cols(), and fmatvec::Matrix< ST, AT >::rows().

template<class AT >
Vector<AT> fmatvec::operator* ( const Vector< AT > &  x,
const AT &  alpha 
)

Vector-scalar multiplication.

This function computes the product of a vector and a scalar.

Returns:
The product.

References fmatvec::Vector< AT >::size().

template<class AT >
Vector<AT> fmatvec::operator* ( const AT &  alpha,
const Vector< AT > &  x 
)

Scalar-vector multiplication.

See also:
operator*(const Vector<AT>&x,const AT&).

References fmatvec::Vector< AT >::size().

SquareMatrix<double> fmatvec::operator* ( const SquareMatrix< double > &  A,
double  alpha 
)

Matrix-scalar multiplication.

This function computes the product of a square matrix and a scalar.

Parameters:
AA square matrix.
alphaA scalar.
Returns:
A new square matrix containig the result.
SquareMatrix<double> fmatvec::operator* ( double  alpha,
const SquareMatrix< double > &  A 
)

Scalar-matrix multiplication.

See also:
operator*(const SquareMatrix<double> &A, double alpha).
template<class AT >
RowVector<AT> fmatvec::operator* ( const RowVector< AT > &  x,
const AT &  alpha 
)

Rowvector-scalar multiplication.

This function computes the product of a rowvector and a scalar.

Returns:
The product.

References fmatvec::RowVector< AT >::size().

template<class AT >
RowVector<AT> fmatvec::operator* ( const AT &  alpha,
const RowVector< AT > &  x 
)

Scalar-rowvector multiplication.

See also:
operator*(const RowVector<AT>&, const AT&).

References fmatvec::RowVector< AT >::size().

Matrix<General, double> fmatvec::operator* ( const Matrix< General, double > &  A,
double  alpha 
)

Matrix-scalar multiplication.

This function computes the product of a general matrix and a scalar.

Parameters:
AA general matrix.
alphaA scalar.
Returns:
A new general matrix containig the result.
Matrix<General, double> fmatvec::operator* ( double  alpha,
const Matrix< General, double > &  A 
)

Scalar-matrix multiplication.

See also:
operator*(const Matrix<General, double> &A, double alpha).
Matrix<Symmetric, double> fmatvec::operator* ( const Matrix< Symmetric, double > &  A,
double  alpha 
)

Matrix-scalar multiplication.

This function computes the product of a symmetric matrix and a scalar.

Parameters:
AA symmetric matrix.
alphaA scalar.
Returns:
A new symmetric matrix containig the result.
Matrix<Symmetric, double> fmatvec::operator* ( double  alpha,
const Matrix< Symmetric, double > &  A 
)

Scalar-matrix multiplication.

See also:
operator*(const Matrix<Symmetric, double> &A, double alpha).
Matrix<Diagonal, double> fmatvec::operator* ( const Matrix< Diagonal, double > &  A,
double  alpha 
)

Matrix-scalar multiplication.

This function computes the product of a diagonal matrix and a scalar.

Parameters:
AA diagonal matrix.
alphaA scalar.
Returns:
A new diagonal matrix containig the result.
Matrix<Diagonal, double> fmatvec::operator* ( double  alpha,
const Matrix< Diagonal, double > &  A 
)

Scalar-matrix multiplication.

See also:
operator*(const Matrix<Diagonal, double> &D, double alpha).
template<class AT >
AT fmatvec::operator* ( const RowVector< AT > &  x,
const Vector< AT > &  y 
)

Scalar product.

This function computes the product of a vector and a rowvector. The result is a scalar.

Returns:
The product.

References fmatvec::RowVector< AT >::size(), and fmatvec::Vector< AT >::size().

template<class AT , class Type >
Matrix<Type, AT> fmatvec::operator* ( const Matrix< Type, AT > &  A,
const AT &  alpha 
)

Matrix-scalar multiplication.

This function computes the product of a matrix and a scalar.

Parameters:
AThe matrix.
alphaThe scalar.
Returns:
The product.

References fmatvec::Matrix< ST, AT >::cols(), and fmatvec::Matrix< ST, AT >::rows().

Matrix<General, double> fmatvec::operator* ( const Matrix< General, double > &  A,
const Matrix< General, double > &  B 
)

Matrix-matrix multiplication.

This function computes the product of two general matrices according to

\[\boldsymbol{A} \rightarrow \boldsymbol{A}\,\boldsymbol{B} \]

Parameters:
AA general matrix.
BA general matrix.
Returns:
A new general matrix containig the result.
template<class AT , class Type >
Matrix<Type, AT> fmatvec::operator* ( const AT &  alpha,
const Matrix< Type, AT > &  A 
)
SquareMatrix<double> fmatvec::operator* ( const SquareMatrix< double > &  A,
const SquareMatrix< double > &  B 
)

Matrix-matrix multiplication.

This function computes the product of two square matrices according to

\[\boldsymbol{A} \rightarrow \boldsymbol{A}\,\boldsymbol{B} \]

Parameters:
AA square matrix.
BA square matrix.
Returns:
A new square matrix containig the result.
Matrix<General, double> fmatvec::operator* ( const Matrix< General, double > &  A,
const Matrix< Symmetric, double > &  B 
)

Matrix-matrix multiplication.

This function computes the product of a general and a symmetric matrix. according to

\[\boldsymbol{A} \rightarrow \boldsymbol{A}\,\boldsymbol{B} \]

Parameters:
AA general matrix.
BA symmetric matrix.
Returns:
A new general matrix containig the result.
Matrix<General, double> fmatvec::operator* ( const Matrix< Symmetric, double > &  A,
const Matrix< General, double > &  B 
)
Matrix<General, double> fmatvec::operator* ( const Matrix< General, double > &  A,
const Matrix< Diagonal, double > &  B 
)

Matrix-matrix multiplication.

This function computes the product of a general and a diagonal matrix. according to

\[\boldsymbol{A} \rightarrow \boldsymbol{A}\,\boldsymbol{B} \]

Parameters:
AA general matrix.
BA diagonal matrix.
Returns:
A new general matrix containig the result.
Matrix<General, double> fmatvec::operator* ( const Matrix< Diagonal, double > &  B,
const Matrix< General, double > &  A 
)
template<class AT , class Type >
Vector<AT> fmatvec::operator* ( const Matrix< Type, AT > &  A,
const Vector< AT > &  x 
)

Matrix-vector multiplication.

This function computes the product of a matrix and a vector.

Returns:
The product.

References fmatvec::Matrix< ST, AT >::cols(), fmatvec::Matrix< ST, AT >::rows(), and fmatvec::Vector< AT >::size().

Vector<double> fmatvec::operator* ( const Vector< double > &  x,
double  alpha 
)

Vector-scalar multiplication.

This function computes the product of a vector and a scalar.

Parameters:
xA vector.
alphaA scalar.
Returns:
A new vector containig the result.
Vector<double> fmatvec::operator* ( double  alpha,
const Vector< double > &  x 
)

Scalar-vector multiplication.

See also:
operator*(const Vector<double> &x, double alpha)
template<class AT , class Type >
RowVector<AT> fmatvec::operator* ( const RowVector< AT > &  x,
const Matrix< Type, AT > &  A 
)

Vector-matrix multiplication.

This function computes the product of a vector and a matrix.

Returns:
The product.

References fmatvec::Matrix< ST, AT >::cols(), fmatvec::Matrix< ST, AT >::rows(), and fmatvec::RowVector< AT >::size().

template<class AT , class Type1 , class Type2 >
Matrix<General, AT> fmatvec::operator* ( const Matrix< Type1, AT > &  A,
const Matrix< Type2, AT > &  B 
)

Matrix-matrix multiplication.

This function computes the product of two matrices

Returns:
The product.

References fmatvec::Matrix< ST, AT >::cols(), and fmatvec::Matrix< ST, AT >::rows().

RowVector<double> fmatvec::operator* ( double  alpha,
const RowVector< double > &  x 
)

Vector-scalar multiplication.

This function computes the product of a vector and a scalar.

Parameters:
xA row vector.
alphaA scalar.
Returns:
A new row vector containig the result.
RowVector<double> fmatvec::operator* ( const RowVector< double > &  x,
double  alpha 
)

Scalar-vector multiplication.

See also:
operator*(const RowVector<double> &x, double alpha)
template<class AT >
Vector<AT> fmatvec::operator* ( const Matrix< Sparse, AT > &  A,
const Vector< AT > &  x 
)

Matrix-vector multiplication.

This function computes the product of a sparse matrix and a vector.

Returns:
The product.

References fmatvec::Matrix< Sparse, AT >::cols(), fmatvec::Matrix< Sparse, AT >::Ip(), fmatvec::Matrix< Sparse, AT >::Jp(), fmatvec::Matrix< Sparse, AT >::rows(), and fmatvec::Vector< AT >::size().

Vector<double> fmatvec::operator* ( const Matrix< General, double > &  A,
const Vector< double > &  x 
)

Matrix-vector multiplication.

This function computes the product of a general matrix and a vector according to

\[\boldsymbol{A}\,\boldsymbol{x} \]

Parameters:
AA general matrix.
xA vector.
Returns:
A new vector containig the result.
Vector<double> fmatvec::operator* ( const Matrix< Symmetric, double > &  A,
const Vector< double > &  x 
)

Matrix-vector multiplication.

This function computes the product of a symmetric matrix and a vector according to

\[\boldsymbol{A}\,\boldsymbol{x} \]

Parameters:
AA symmetric matrix.
xA vector.
Returns:
A new vector containig the result.
Vector<double> fmatvec::operator* ( const Matrix< Diagonal, double > &  A,
const Vector< double > &  x 
)

Matrix-vector multiplication.

This function computes the product of a diagonal matrix and a vector according to

\[\boldsymbol{A}\,\boldsymbol{x} \]

Parameters:
AA diagonal matrix.
xA vector.
Returns:
A new vector containig the result.
RowVector<double> fmatvec::operator* ( const RowVector< double > &  x,
const Matrix< General, double > &  A 
)

Vector-matrix multiplication.

This function computes the product of a row vector and a general matrix according to

\[\boldsymbol{x}\,\boldsymbol{A} \]

Parameters:
xA row vector.
AA general matrix.
Returns:
A new row vector containig the result.
RowVector<double> fmatvec::operator* ( const RowVector< double > &  x,
const Matrix< Symmetric, double > &  A 
)

Vector-matrix multiplication.

This function computes the product of a row vector and a symmetric matrix according to

\[\boldsymbol{x}\,\boldsymbol{A} \]

Parameters:
xA row vector.
AA symmetric matrix.
Returns:
A new row vector containig the result.
RowVector<double> fmatvec::operator* ( const RowVector< double > &  x,
const Matrix< Diagonal, double > &  A 
)

Vector-matrix multiplication.

This function computes the product of a row vector and a diagonal matrix according to

\[\boldsymbol{x}\,\boldsymbol{A} \]

Parameters:
xA row vector.
AA diagonal matrix.
Returns:
A new row vector containig the result.
double fmatvec::operator* ( const RowVector< double > &  x,
const Vector< double > &  y 
)

Vector-vector multiplication.

This function computes the product of a row vector and a vector according to

\[\boldsymbol{x}\,\boldsymbol{y} \]

Parameters:
xA row vector.
yA vector.
Returns:
A scalar containig the result.
Matrix<Diagonal, double >& fmatvec::operator*= ( const Matrix< Diagonal, double > &  A,
double  alpha 
)

Matrix-scalar multiplication.

This function multiplies a diagonal matrix by a scalar.

Parameters:
AA diagonal matrix.
alphaA scalar.
Returns:
A reference to the diagonal matrix.
SquareMatrix<double>& fmatvec::operator*= ( const SquareMatrix< double > &  A,
double  alpha 
)

Matrix-scalar multiplication.

This function multiplies a square matrix by a scalar.

Parameters:
AA square matrix.
alphaA scalar.
Returns:
A reference to the square matrix.
Matrix<General, double >& fmatvec::operator*= ( const Matrix< General, double > &  A,
const double &  alpha 
)

Matrix-scalar multiplication.

This function multiplies a general matrix by a scalar.

Parameters:
AA general matrix.
alphaA scalar.
Returns:
A reference to the general matrix.
Vector<double>& fmatvec::operator*= ( const Vector< double > &  x,
const double &  alpha 
)

Vector-scalar multiplication.

This function multiplies a vector by a scalar.

Parameters:
xA vector.
alphaA scalar.
Returns:
A reference to the vector.
RowVector<double>& fmatvec::operator*= ( const RowVector< double > &  x,
const double &  alpha 
)

vector-scalar multiplication.

This function multiplies a row vector by a scalar.

Parameters:
xA row vector.
alphaA scalar.
Returns:
A reference to the row vector.
Matrix<General, double > fmatvec::operator+ ( const Matrix< General, double > &  A,
const Matrix< General, double > &  B 
)

Matrix-matrix addition.

This function computes the sum of two general matrices.

Parameters:
AA general matrix.
BA general matrix.
Returns:
A new general matrix containig the result.
SquareMatrix<double> fmatvec::operator+ ( const SquareMatrix< double > &  A,
const SquareMatrix< double > &  B 
)

Matrix-matrix addition.

This function computes the sum of two square matrices.

Parameters:
AA square matrix.
BA square matrix.
Returns:
A new square matrix containig the result.
Matrix<Symmetric, double> fmatvec::operator+ ( const Matrix< Symmetric, double > &  A,
const Matrix< Symmetric, double > &  B 
)

Matrix-matrix addition.

This function computes the sum of two symmetric matrices.

Parameters:
AA symmetric matrix.
BA symmetric matrix.
Returns:
A new symmetric matrix containig the result.
template<class AT >
Vector<AT> fmatvec::operator+ ( const Vector< AT > &  x,
const Vector< AT > &  y 
)

Vector-vector addition.

This function computes the sum of two vectors

Returns:
The sum.

References fmatvec::Vector< AT >::size().

template<class AT , class Type1 , class Type2 >
Matrix<General, AT> fmatvec::operator+ ( const Matrix< Type1, AT > &  A,
const Matrix< Type2, AT > &  B 
)

Matrix-matrix addition.

This function computes the sum of two matrices

Returns:
The sum.

References fmatvec::Matrix< ST, AT >::cols(), and fmatvec::Matrix< ST, AT >::rows().

Vector<double> fmatvec::operator+ ( const Vector< double > &  x,
const Vector< double > &  y 
)

Vector-vector addition.

This function computes the sum of two vectors according to

\[\boldsymbol{x}+\boldsymbol{y} \]

Parameters:
xA vector.
yA vector.
Returns:
A new vector containig the result.
RowVector<double> fmatvec::operator+ ( const RowVector< double > &  x,
const RowVector< double > &  y 
)

Vector-vector addition.

This function computes the sum of two row vectors according to

\[\boldsymbol{x}+\boldsymbol{y} \]

Parameters:
xA row vector.
yA row vector.
Returns:
A new vector containig the result.
Matrix<Diagonal, double >& fmatvec::operator+= ( const Matrix< Diagonal, double > &  A,
const Matrix< Diagonal, double > &  B 
)

Matrix-matrix addition.

This function adds a diagonal matrix to a diagonal matrix. according to

\[\boldsymbol{A} \rightarrow \boldsymbol{A}+\boldsymbol{B} \]

Parameters:
AA diagonal matrix.
BA diagonal matrix.
Returns:
A reference to the first diagonal matrix.
Matrix<Symmetric, double>& fmatvec::operator+= ( const Matrix< Symmetric, double > &  A,
const Matrix< Symmetric, double > &  B 
)

Matrix-matrix addition.

This function adds a symmetric matrix to a symmetric matrix. according to

\[\boldsymbol{A} \rightarrow \boldsymbol{A}+\boldsymbol{B} \]

Parameters:
AA symmetric matrix.
BA symmetric matrix.
Returns:
A reference to the first matrix.
SquareMatrix<double>& fmatvec::operator+= ( const SquareMatrix< double > &  A,
const SquareMatrix< double > &  B 
)

Matrix-matrix addition.

This function adds a square matrix to a square matrix. according to

\[\boldsymbol{A} \rightarrow \boldsymbol{A}+\boldsymbol{B} \]

Parameters:
AA square matrix.
BA square matrix.
Returns:
A reference to the first matrix.
Matrix<General, double >& fmatvec::operator+= ( const Matrix< General, double > &  A,
const Matrix< General, double > &  B 
)

Matrix-matrix addition.

This function adds a general matrix to a general matrix. according to

\[\boldsymbol{A} \rightarrow \boldsymbol{A}+\boldsymbol{B} \]

Parameters:
AA general matrix.
BA general matrix.
Returns:
A reference to the first matrix.
Vector<double>& fmatvec::operator+= ( const Vector< double > &  x,
const Vector< double > &  y 
)

Vector-vector addition.

This function adds two vectors according to

\[\boldsymbol{x} \rightarrow \boldsymbol{x}+\boldsymbol{y} \]

Parameters:
xA vector.
yA vector.
Returns:
A reference to the first vector.
RowVector<double>& fmatvec::operator+= ( const RowVector< double > &  x,
const RowVector< double > &  y 
)

Vector-vector addition.

This function adds two row vectors according to

\[\boldsymbol{x} \rightarrow \boldsymbol{x}+\boldsymbol{y} \]

Parameters:
xA row vector.
yA row vector.
Returns:
A reference to the first row vector.
template<class AT >
Vector<AT> fmatvec::operator- ( const Vector< AT > &  x)

Negation.

This function computes the negation of a vector.

Returns:
The negation.

References fmatvec::Vector< AT >::size().

template<class AT >
RowVector<AT> fmatvec::operator- ( const RowVector< AT > &  a)

Negation.

This function computes the negation of a rowvector.

Returns:
The negation.

References fmatvec::RowVector< AT >::size().

Matrix<General, double> fmatvec::operator- ( const Matrix< General, double > &  A,
const Matrix< General, double > &  B 
)

Matrix-matrix subtraction.

This function computes the difference of two general matrices according to

\[\boldsymbol{A}-\boldsymbol{B} \]

Parameters:
AA general matrix.
BA general matrix.
Returns:
A new general matrix containig the result.
SquareMatrix<double> fmatvec::operator- ( const SquareMatrix< double > &  A,
const SquareMatrix< double > &  B 
)

Matrix-matrix subtraction.

This function computes the difference of two square matrices.

Parameters:
AA square matrix.
BA square matrix.
Returns:
A new square matrix containig the result.
Matrix<Symmetric, double> fmatvec::operator- ( const Matrix< Symmetric, double > &  A,
const Matrix< Symmetric, double > &  B 
)

Matrix-matrix subtraction.

This function computes the sum of two symmetric matrices.

Parameters:
AA symmetric matrix.
BA symmetric matrix.
Returns:
A new symmetric matrix containig the result.
template<class AT >
Vector<AT> fmatvec::operator- ( const Vector< AT > &  x,
const Vector< AT > &  y 
)

Vector-vector subtraction.

This function computes the difference of two vectors

Returns:
The difference.

References fmatvec::Vector< AT >::size().

template<class AT >
RowVector<AT> fmatvec::operator- ( const RowVector< AT > &  x,
const RowVector< AT > &  y 
)

Rowvector-rowvector subtraction.

This function computes the difference of two rowvectors

Returns:
The difference.

References fmatvec::RowVector< AT >::size().

template<class AT >
SquareMatrix<AT> fmatvec::operator- ( const SquareMatrix< AT > &  A)

Negation.

This function computes the negation of a vector.

Returns:
The negation.

References fmatvec::Matrix< General, AT >::cols(), fmatvec::Matrix< General, AT >::rows(), and fmatvec::SquareMatrix< AT >::size().

template<class AT , class Type >
Matrix<Type, AT> fmatvec::operator- ( const Matrix< Type, AT > &  A)

Negation.

This function computes the negation of a matrix

Returns:
The negation.

References fmatvec::Matrix< ST, AT >::cols(), and fmatvec::Matrix< ST, AT >::rows().

template<class AT , class Type1 , class Type2 >
Matrix<General, AT> fmatvec::operator- ( const Matrix< Type1, AT > &  A,
const Matrix< Type2, AT > &  B 
)

Matrix-matrix subtraction.

This function computes the difference of two matrices

Returns:
The difference.

References fmatvec::Matrix< ST, AT >::cols(), and fmatvec::Matrix< ST, AT >::rows().

Vector<double> fmatvec::operator- ( const Vector< double > &  x,
const Vector< double > &  y 
)

Vector-vector subtraction.

This function computes the difference of two vectors according to

\[\boldsymbol{x}-\boldsymbol{y} \]

Parameters:
xA vector.
yA vector.
Returns:
A new vector containig the result.
RowVector<double> fmatvec::operator- ( const RowVector< double > &  x,
const RowVector< double > &  y 
)

Vector-vector subtraction.

This function computes the difference of two row vectors according to

\[\boldsymbol{x}-\boldsymbol{y} \]

Parameters:
xA row vector.
yA row vector.
Returns:
A new vector containig the result.
Matrix<Diagonal, double >& fmatvec::operator-= ( const Matrix< Diagonal, double > &  A,
const Matrix< Diagonal, double > &  B 
)

Matrix-matrix subtraction.

This function subtracts a diagonal matrix from a diagonal matrix. according to

\[\boldsymbol{A} \rightarrow \boldsymbol{A}-\boldsymbol{B} \]

Parameters:
AA diagonal matrix.
BA diagonal matrix.
Returns:
A reference to the first matrix.
Matrix<Symmetric, double>& fmatvec::operator-= ( const Matrix< Symmetric, double > &  A,
const Matrix< Symmetric, double > &  B 
)

Matrix-matrix subtraction.

This function subtracts a symmetric matrix from a symmetric matrix. according to

\[\boldsymbol{A} \rightarrow \boldsymbol{A}-\boldsymbol{B} \]

Parameters:
AA symmetric matrix.
BA symmetric matrix.
Returns:
A reference to the first matrix.
SquareMatrix<double>& fmatvec::operator-= ( const SquareMatrix< double > &  A,
const SquareMatrix< double > &  B 
)

Matrix-matrix subtraction.

This function subtracts a square matrix from a square matrix. according to

\[\boldsymbol{A} \rightarrow \boldsymbol{A}-\boldsymbol{B} \]

Parameters:
AA square matrix.
BA square matrix.
Returns:
A reference to the first matrix.
Matrix<General, double >& fmatvec::operator-= ( const Matrix< General, double > &  A,
const Matrix< General, double > &  B 
)

Matrix-matrix subtraction.

This function subtracts a general matrix from a general matrix according to

\[\boldsymbol{A} \rightarrow \boldsymbol{A}-\boldsymbol{B} \]

Parameters:
AA general matrix.
BA general matrix.
Returns:
A reference to the first matrix.
Vector<double>& fmatvec::operator-= ( const Vector< double > &  x,
const Vector< double > &  y 
)

Vector-vector subtraction.

This function subtracts two vectors according to

\[\boldsymbol{x} \rightarrow \boldsymbol{x}-\boldsymbol{y} \]

Parameters:
xA vector.
yA vector.
Returns:
A reference to the first vector.
RowVector<double>& fmatvec::operator-= ( const RowVector< double > &  x,
const RowVector< double > &  y 
)

Vector-vector subtraction.

This function subtracts two row vectors according to

\[\boldsymbol{x} \rightarrow \boldsymbol{x}-\boldsymbol{y} \]

Parameters:
xA row vector.
yA row vector.
Returns:
A reference to the first row vector.
SquareMatrix<double> fmatvec::operator/ ( const SquareMatrix< double > &  A,
double  alpha 
)

Matrix-scalar division.

This function computes the division of a square matrix and a scalar.

Parameters:
AA square matrix.
alphaA scalar.
Returns:
A new square matrix containig the result.
Matrix<General, double> fmatvec::operator/ ( const Matrix< General, double > &  A,
double  alpha 
)

Matrix-scalar division.

This function computes the division of a general matrix and a scalar.

Parameters:
AA general matrix.
alphaA scalar.
Returns:
A new general matrix containig the result.
Matrix<Symmetric, double> fmatvec::operator/ ( const Matrix< Symmetric, double > &  A,
double  alpha 
)

Matrix-scalar division.

This function computes the division of a symmetric matrix and a scalar.

Parameters:
AA symmetric matrix.
alphaA scalar.
Returns:
A new symmetric matrix containig the result.
Matrix<Diagonal, double> fmatvec::operator/ ( const Matrix< Diagonal, double > &  A,
double  alpha 
)

Matrix-scalar division.

This function computes the division of a diagonal matrix and a scalar.

Parameters:
AA diagonal matrix.
alphaA scalar.
Returns:
A new diagonal matrix containig the result.
Vector<double> fmatvec::operator/ ( const Vector< double > &  x,
double  alpha 
)

Vector-scalar division.

This function computes the division of a vector and a scalar.

Parameters:
xA vector.
alphaA scalar.
Returns:
A new vector containig the result.
RowVector<double> fmatvec::operator/ ( const RowVector< double > &  x,
double  alpha 
)

Vector-scalar division.

This function computes the division of a row vector and a scalar.

Parameters:
xA row vector.
alphaA scalar.
Returns:
A new row vector containig the result.
Matrix<Diagonal, double >& fmatvec::operator/= ( const Matrix< Diagonal, double > &  A,
double  alpha 
)

Matrix-scalar division.

This function divides a diagonal matrix by a scalar.

Parameters:
AA diagonal matrix.
alphaA scalar.
Returns:
A reference to the diagonal matrix.
SquareMatrix<double>& fmatvec::operator/= ( const SquareMatrix< double > &  A,
double  alpha 
)

Matrix-scalar division.

This function divides a square matrix by a scalar.

Parameters:
AA square matrix.
alphaA scalar.
Returns:
A reference to the square matrix.
Matrix<General, double >& fmatvec::operator/= ( const Matrix< General, double > &  A,
const double &  alpha 
)

Matrix-scalar division.

This function divides a general matrix by a scalar.

Parameters:
AA general matrix.
alphaA scalar.
Returns:
A reference to the general matrix.
Vector<double>& fmatvec::operator/= ( const Vector< double > &  x,
const double &  alpha 
)

Vector-scalar division.

This function divides a vector by a scalar.

Parameters:
xA vector.
alphaA scalar.
Returns:
A reference to the vector.
RowVector<double>& fmatvec::operator/= ( const RowVector< double > &  x,
const double &  alpha 
)

Vector-scalar division.

This function divides a row vector by a scalar.

Parameters:
xA row vector.
alphaA scalar.
Returns:
A reference to the vector.
template<class ST , class AT >
std::ostream& fmatvec::operator<< ( std::ostream &  os,
const Matrix< ST, AT > &  A 
)

Matrix output.

This function writes a matrix into a stream.

Parameters:
osAn output stream.
AA matrix of any shape and type.
Returns:
A reference to the output stream.

Referenced by fmatvec::Matrix< Sparse, AT >::operator=(), fmatvec::Matrix< Diagonal, AT >::operator=(), fmatvec::Matrix< GeneralBand, AT >::operator=(), fmatvec::Matrix< General, AT >::operator=(), and fmatvec::Matrix< Symmetric, AT >::operator=().

bool fmatvec::operator== ( const Index &  I,
const Index &  J 
)

Equality operator for indices.

Checks for equality of two indices.

Returns:
true if two index objects are equal, false otherwise.
template<class AT , class Type1 , class Type2 >
bool fmatvec::operator== ( const Matrix< Type1, AT > &  A,
const Matrix< Type2, AT > &  B 
)

Matrix-matrix comparison.

This function compares two matrices

Returns:
True, if the matrices are identical, false otherwise.

References fmatvec::Matrix< ST, AT >::cols(), and fmatvec::Matrix< ST, AT >::rows().

template<class ST , class AT >
std::istream& fmatvec::operator>> ( std::istream &  is,
Matrix< ST, AT > &  A 
)

Matrix input.

This function loads a matrix from a stream.

Parameters:
isAn input stream.
AA matrix of any shape and type.
Returns:
A reference to the input stream.

References fmatvec::Matrix< ST, AT >::cols(), and fmatvec::Matrix< ST, AT >::rows().

Referenced by fmatvec::Matrix< Sparse, AT >::operator=(), fmatvec::Matrix< Diagonal, AT >::operator=(), fmatvec::Matrix< GeneralBand, AT >::operator=(), fmatvec::Matrix< General, AT >::operator=(), and fmatvec::Matrix< Symmetric, AT >::operator=().

template<class AT >
Matrix<General, AT> fmatvec::quickSortMedian ( const Matrix< General, AT > &  A_,
int  PivotCol 
)

Modified QuickSort Algorithm (unstable sorting Algorithm )

Values of rowvectors of Matrix A are sorted in ascending order unstabel but very quick sorting Algorithm Pivot Elements as 'Median of three'

Parameters:
A_Matrix to be sorted
PivotColColumn of A used as sorting index

References fmatvec::Matrix< General, AT >::copy(), quicksortmedian_intern(), and fmatvec::Matrix< General, AT >::rows().

template<class AT >
void fmatvec::quicksortmedian_intern ( Matrix< General, AT > &  A,
int  PivotCol,
RowVector< AT > &  tmp,
int  l,
int  r 
)

internal function of QuickSortMedian

References fmatvec::Matrix< General, AT >::row().

Referenced by quickSortMedian().

double fmatvec::rho ( const SquareMatrix< double > &  A)

Spectral radius.

This function computes the spectral radius of a square matrix.

Parameters:
AA square matrix.
Returns:
A scalar containig the result.
double fmatvec::rho ( const Matrix< Symmetric, double > &  A)

Spectral radius.

This function computes the spectral radius of a symmetric matrix.

Parameters:
AA symmetric matrix.
Returns:
A scalar containig the result.
template<class AT >
AT fmatvec::scalarProduct ( const Vector< AT > &  x,
const Vector< AT > &  y 
)

Scalar product.

This function computes the scalar product of two vectors.

Returns:
The scalar product.

References fmatvec::Vector< AT >::size().

Matrix<General, double> fmatvec::slvLL ( const Matrix< Symmetric, double > &  A,
const Matrix< General, double > &  B 
)

Systems of linear equations.

This function solves systems of linear equations according to

\[\boldsymbol{A}\,\boldsymbol{X}=\boldsymbol{B} \]

by a LL decompostion.

Parameters:
AA symmetric matrix.
BA general matrix containing the right hand sides.
Returns:
A general matrix containig the solution.
Vector<double> fmatvec::slvLL ( const Matrix< Symmetric, double > &  A,
const Vector< double > &  b 
)

System of linear equations.

This function solves a system of linear equations according to

\[\boldsymbol{A}\,\boldsymbol{x}=\boldsymbol{b} \]

by a LL decompostion.

Parameters:
AA symmetric matrix.
bA vector containing the right hand side.
Returns:
A vector containig the solution.
Matrix<General, double> fmatvec::slvLU ( const SquareMatrix< double > &  A,
const Matrix< General, double > &  B 
)

Systems of linear equations.

This function solves systems of linear equations according to

\[\boldsymbol{A}\,\boldsymbol{X}=\boldsymbol{B} \]

by a LU decompostion.

Parameters:
AA square matrix.
BA general matrix containing the right hand sides.
Returns:
A general matrix containig the solution.
Vector<double> fmatvec::slvLU ( const SquareMatrix< double > &  A,
const Vector< double > &  b 
)

System of linear equations.

This function solves a system of linear equations according to

\[\boldsymbol{A}\,\boldsymbol{x}=\boldsymbol{b} \]

by a LU decompostion.

Parameters:
AA square matrix.
bA vector containing the right hand side.
Returns:
A vector containig the solution.
Matrix<General, double> fmatvec::slvLUFac ( const SquareMatrix< double > &  A,
const Matrix< General, double > &  B,
const Vector< int > &  ipiv 
)

Systems of linear equations.

This function solves systems of linear equations according to

\[\boldsymbol{A}\,\boldsymbol{X}=\boldsymbol{B} \]

. The matrix is already decomposed by a LU decompostion.

Parameters:
AA square matrix decomposed by a LU decompostion.
BA general matrix containing the right hand sides.
ipivA vector of integers containing the pivot indices.
Returns:
A general matrix containig the solution.
Vector<double> fmatvec::slvLUFac ( const SquareMatrix< double > &  A,
const Vector< double > &  b,
const Vector< int > &  ipiv 
)

System of linear equations.

This function solves a system of linear equations according to

\[\boldsymbol{A}\,\boldsymbol{x}=\boldsymbol{b} \]

. The matrix is already decomposed by a LU decompostion.

Parameters:
AA square matrix decomposed by a LU decompostion.
bA vector containing the right hand side.
ipivA vector of integers containing the pivot indices.
Returns:
A vector containig the solution.
Matrix<General, double> fmatvec::slvQR ( const SquareMatrix< double > &  A,
const Matrix< General, double > &  B 
)

Systems of linear equations.

This function solves systems of linear equations according to

\[\boldsymbol{A}\,\boldsymbol{X}=\boldsymbol{B} \]

by a QR decompostion.

Parameters:
AA square matrix.
BA general matrix containing the right hand sides.
Returns:
A general matrix containig the solution.
Vector<double> fmatvec::slvQR ( const SquareMatrix< double > &  A,
const Vector< double > &  b 
)

System of linear equations.

This function solves a system of linear equations according to

\[\boldsymbol{A}\,\boldsymbol{x}=\boldsymbol{b} \]

by a QR decompostion.

Parameters:
AA symmetric matrix.
bA vector containing the right hand side.
Returns:
A vector containig the solution.
template<class AT >
SquareMatrix< AT > fmatvec::tilde ( const Vector< AT > &  x)

Tilde operator.

 Example:
@code 
tilde(x);
\endcode 

\[ x=\begin{pmatrix}x_1 \\ x_2 \\ x_3\end{pmatrix} \quad \Rightarrow \quad \tilde x = \begin{pmatrix} 0 & -x_3 & x_2 \\ x_3 & 0 & -x_1 \\ -x_2 & x_1 & 0\end{pmatrix} \]

References fmatvec::Vector< AT >::size().

template<class AT >
RowVector<AT> fmatvec::trans ( const Vector< AT > &  x)

Transpose of a vector.

This function computes the transpose of a vector. The result is a rowvector.

Returns:
The transpose.
template<class AT >
Vector<AT> fmatvec::trans ( const RowVector< AT > &  x)

Transpose of a rowvector.

This function computes the transpose of a rowvector. The result is a vector.

Parameters:
xA vector.
Returns:
The transpose.
template<class AT >
Matrix<General, AT> fmatvec::trans ( const Matrix< General, AT > &  A)

Transpose of a matrix.

This function computes the transpose of a matrix.

\[ \boldsymbol{A} \rightarrow \boldsymbol{A}^T \]

The result is a matrix.

Parameters:
AA general matrix.
Returns:
The transpose.
template<class AT >
SquareMatrix<AT> fmatvec::trans ( const SquareMatrix< AT > &  A)

Transpose of a matrix.

This function computes the transpose of a square matrix.

\[ \boldsymbol{A} \rightarrow \boldsymbol{A}^T \]

The result is a square matrix.

Parameters:
AA square matrix.
Returns:
The transpose.
template<class AT >
double fmatvec::tripleProduct ( const Vector< AT > &  a,
const Vector< AT > &  x,
const Vector< AT > &  y 
)

Triple product.

This function computes the triple product of three vectors.

Returns:
The triple product.

References fmatvec::Vector< AT >::size().