ConicBundle
Classes | Namespaces | Functions
sparssym.hxx File Reference

Header declaring the class CH_Matrix_Classes::Sparsesym for sparse symmetric matrices with Real elements. More...

#include "sparsmat.hxx"

Go to the source code of this file.

Classes

class  CH_Matrix_Classes::Sparsesym
 Matrix class of symmetric matrices with real values of type Real More...
 

Namespaces

 CH_Matrix_Classes
 Matrix Classes and Linear Algebra. See Matrix Classes (namespace CH_Matrix_Classes) for a quick introduction.
 

Functions

Matrix CH_Matrix_Classes::diag (const Sparsesym &A)
 returns the diagonal of A as a dense Matrix vector
 
Sparsesym CH_Matrix_Classes::sparseDiag (const Matrix &A, Real tol=SPARSE_ZERO_TOL)
 forms a sparse symmetrix matrix having vector A on its diagonal
 
void CH_Matrix_Classes::swap (Sparsesym &A, Sparsesym &B)
 swap the content of the two sparse matrices A and B (involves no copying)
 
Sparsesym & CH_Matrix_Classes::xeyapzb (Sparsesym &x, const Sparsesym &y, const Sparsesym &z, Real alpha=1., Real beta=1.)
 returns x= alpha*y+beta*z; x is initialized to the correct size
 
Sparsesym & CH_Matrix_Classes::support_rankadd (const Matrix &A, Sparsesym &C, Real alpha=1., Real beta=0., int trans=0)
 returns C=beta*C+alpha*AA^T (or A^TA), but only on the current support of C
 
Real CH_Matrix_Classes::ip (const Symmatrix &A, const Sparsesym &B)
 returns the usual inner product of A and B, i.e., the sum of A(i,j)*B(i,j) over all i,j
 
Sparsesym CH_Matrix_Classes::abs (const Sparsesym &A)
 returns a Sparsesym with elements abs((*this)(i,j)) for all i,j
 
Real CH_Matrix_Classes::trace (const Sparsesym &A)
 returns the sum of the diagonal elements A(i,i) over all i
 
Real CH_Matrix_Classes::ip (const Sparsesym &A, const Sparsesym &B)
 returns the usual inner product of A and B, i.e., the sum of A(i,j)*B(i,j) over all i,j
 
Real CH_Matrix_Classes::ip (const Matrix &A, const Sparsesym &B)
 returns the usual inner product of A and B, i.e., the sum of A(i,j)*B(i,j) over all i,j
 
Real CH_Matrix_Classes::norm2 (const Sparsesym &A)
 returns the Frobenius norm of A, i.e., the square root of the sum of A(i,j)*A(i,j) over all i,j
 
Matrix CH_Matrix_Classes::sumrows (const Sparsesym &A)
 returns a row vector holding the sum over all rows, i.e., (1 1 ... 1)*A
 
Real CH_Matrix_Classes::sum (const Sparsesym &A)
 returns the sum over all elements of A, i.e., (1 1 ... 1)*A*(1 1 ... 1)^T
 
std::ostream & CH_Matrix_Classes::operator<< (std::ostream &o, const Sparsesym &v)
 output format (lower triangle): nr nz \n i1 j1 val1\n i2 j2 val2\n ... inz jnz valnz\n
 
std::istream & CH_Matrix_Classes::operator>> (std::istream &i, Sparsesym &v)
 input format (lower triangle): nr nz \n i1 j1 val1\n i2 j2 val2\n ... inz jnz valnz\n
 
Sparsesym & CH_Matrix_Classes::xbpeya (Sparsesym &x, const Sparsesym &y, Real alpha=1., Real beta=0.)
 returns x= alpha*y+beta*x; if beta==0. then x is initialized to the correct size
 
Sparsesym CH_Matrix_Classes::operator+ (const Sparsesym &A, const Sparsesym &B)
 returns a Sparsesym that equals A+B
 
Sparsesym CH_Matrix_Classes::operator- (const Sparsesym &A, const Sparsesym &B)
 returns a Sparsesym that equals A-B
 
Sparsesym CH_Matrix_Classes::operator* (const Sparsesym &A, Real d)
 returns a Sparsesym that equals A*d
 
Sparsesym CH_Matrix_Classes::operator* (Real d, const Sparsesym &A)
 returns a Sparsesym that equals A*d
 
Sparsesym CH_Matrix_Classes::operator/ (const Sparsesym &A, Real d)
 returns a Sparsesym that equals A/d; ATTENTION: no check for devision by zero More...
 
Matrix CH_Matrix_Classes::operator* (const Sparsesym &A, const Matrix &B)
 returns a Matrix that equals A*B
 
Matrix CH_Matrix_Classes::operator* (const Matrix &A, const Sparsesym &B)
 returns a Matrix that equals A*B
 
Matrix CH_Matrix_Classes::operator+ (const Matrix &A, const Sparsesym &B)
 returns a Matrix that equals A+B
 
Matrix CH_Matrix_Classes::operator+ (const Sparsesym &A, const Matrix &B)
 returns a Matrix that equals A+B
 
Matrix CH_Matrix_Classes::operator- (const Matrix &A, const Sparsesym &B)
 returns a Matrix that equals A-B
 
Matrix CH_Matrix_Classes::operator- (const Sparsesym &A, const Matrix &B)
 returns a Matrix that equals A-B
 
Real CH_Matrix_Classes::ip (const Sparsesym &A, const Matrix &B)
 returns the usual inner product of A and B, i.e., the sum of A(i,j)*B(i,j) over all i,j
 
Sparsesym CH_Matrix_Classes::transpose (const Sparsesym &A)
 returns a copy of A (drop it or use a constructor instead) More...
 
Matrix CH_Matrix_Classes::sumcols (const Sparsesym &A)
 returns a column vector holding the sum over all columns, i.e., A*(1 1 ... 1)^T
 
Symmatrix CH_Matrix_Classes::operator+ (const Sparsesym &A, const Symmatrix &B)
 returns a Symmatrix that equals A+B
 
Symmatrix CH_Matrix_Classes::operator+ (const Symmatrix &A, const Sparsesym &B)
 returns a Symmatrix that equals A+B
 
Symmatrix CH_Matrix_Classes::operator- (const Sparsesym &A, const Symmatrix &B)
 returns a Symmatrix that equals A-B
 
Symmatrix CH_Matrix_Classes::operator- (const Symmatrix &A, const Sparsesym &B)
 returns a Symmatrix that equals A-B
 
Real CH_Matrix_Classes::ip (const Sparsesym &A, const Symmatrix &B)
 returns the usual inner product of A and B, i.e., the sum of A(i,j)*B(i,j) over all i,j
 
Matrix CH_Matrix_Classes::operator* (const Sparsesym &A, const Sparsemat &B)
 returns a Matrix that equals A*B
 
Matrix CH_Matrix_Classes::operator* (const Sparsemat &A, const Sparsesym &B)
 returns a Matrix that equals A*B
 
Matrix CH_Matrix_Classes::operator* (const Symmatrix &A, const Sparsemat &B)
 returns a Matrix that equals A*B
 
Matrix CH_Matrix_Classes::operator* (const Sparsemat &A, const Symmatrix &B)
 returns a Matrix that equals A*B
 
Equal (Members)
int CH_Matrix_Classes::equal (const Sparsesym &A, const Sparsesym &B, Real eqtol=1e-10)
 returns 1 if both matrices are identical, 0 otherwise
 

Detailed Description

Header declaring the class CH_Matrix_Classes::Sparsesym for sparse symmetric matrices with Real elements.

Version
1.0
Date
2005-03-01
Author
Christoph Helmberg