Public Member Functions
fmatvec::Matrix< Sparse, Ref, Ref, AT > Class Template Reference

This is a matrix class for sparse quadratic matrices. More...

#include <sparse_matrix.h>

List of all members.

Public Member Functions

 Matrix ()
 Standard constructor.
 Matrix (int m_, int n_, int k_, Noinit)
 Matrix (int m_, int n_, int k_, Init ini=INIT, const AT &a=0)
 Matrix (int n_, Noinit)
 Matrix (int n_, Init ini=INIT, const AT &a=0)
 Matrix (int m_, int n_, Noinit)
 Matrix (int m_, int n_, Init ini=INIT, const AT &a=0)
 Matrix (const Matrix< Sparse, Ref, Ref, AT > &A)
 Copy Constructor.
 ~Matrix ()
 Destructor.
Matrix< Sparse, Ref, Ref, AT > & resize ()
Matrix< Sparse, Ref, Ref, AT > & resize (int n_, int k_, Noinit)
Matrix< Sparse, Ref, Ref, AT > & resize (int n, int k, Init ini=INIT, const AT &a=0)
Matrix< Sparse, Ref, Ref, AT > & operator<< (const Matrix< Sparse, Ref, Ref, AT > &A)
 Copy operator.
Matrix< Sparse, Ref, Ref, AT > & operator>> (const Matrix< Sparse, Ref, Ref, AT > &A)
 Reference operator.
Matrix< Sparse, Ref, Ref, AT > & operator<< (const SquareMatrix< Ref, AT > &A)
 Element operator.
Matrix< Sparse, Ref, Ref, AT > & operator<< (const Matrix< Symmetric, Var, Var, AT > &A)
 Element operator.
Matrix< Sparse, Ref, Ref, AT > & operator= (const Matrix< Sparse, Ref, Ref, AT > &A)
 Assignment operator.
const AT * operator() () const
 Pointer operator.
AT * operator() ()
 Pointer operator.
const int * Ip () const
 Pointer operator.
int * Ip ()
 Pointer operator.
const int * Jp () const
 Pointer operator.
int * Jp ()
 Pointer operator.
int rows () const
 Number of rows.
int cols () const
 Number of columns.
Matrix< Sparse, Ref, Ref, AT > copy () const
 Matrix duplicating.
Matrix< Sparse, Ref, Ref, AT > & init (const AT &a)
 Initialization.
Matrix< Sparse, Ref, Ref, AT > & init (Init, const AT &a=0)
Matrix< Sparse, Ref, Ref, AT > & init (Noinit, const AT &a=0)

Detailed Description

template<class AT>
class fmatvec::Matrix< Sparse, Ref, Ref, AT >

This is a matrix class for sparse quadratic matrices.

Template class Matrix with shape type Sparse and atomic type AT. The matrix ist stored in compressed row-wise skyline format, BUT the diagonal elements are ALWAYS stored (even if they are zero) as the FIRST entry of each row. The template parameter AT defines the atomic type of the matrix. Valid types are int, float, double, complex<float> and complex<double>


Constructor & Destructor Documentation

template<class AT >
fmatvec::Matrix< Sparse, Ref, Ref, AT >::Matrix ( ) [inline]

Standard constructor.

Constructs a matrix with no size.

template<class AT >
fmatvec::Matrix< Sparse, Ref, Ref, AT >::Matrix ( const Matrix< Sparse, Ref, Ref, AT > &  A) [inline]

Copy Constructor.

Constructs a reference to the matrix A.

Attention:
The physical memory of the matrix A will not be copied, only referenced.
Parameters:
AThe matrix that will be referenced.

Member Function Documentation

template<class AT >
int fmatvec::Matrix< Sparse, Ref, Ref, AT >::cols ( ) const [inline]

Number of columns.

Returns:
The number of columns of the matrix
template<class AT >
Matrix< Sparse, Ref, Ref, AT > fmatvec::Matrix< Sparse, Ref, Ref, AT >::copy ( ) const

Matrix duplicating.

The calling matrix returns a deep copy of itself.

Returns:
The duplicate.
template<class AT >
Matrix< Sparse, Ref, Ref, AT > & fmatvec::Matrix< Sparse, Ref, Ref, AT >::init ( const AT &  a)

Initialization.

Initializes all elements of the calling matrix with the value given by a.

Parameters:
aValue all elements will be initialized with.
Returns:
A reference to the calling matrix.
template<class AT >
const int* fmatvec::Matrix< Sparse, Ref, Ref, AT >::Ip ( ) const [inline]

Pointer operator.

See Ip()

template<class AT >
int* fmatvec::Matrix< Sparse, Ref, Ref, AT >::Ip ( ) [inline]

Pointer operator.

Todo:
Docu
template<class AT >
const int* fmatvec::Matrix< Sparse, Ref, Ref, AT >::Jp ( ) const [inline]

Pointer operator.

See Jp()

template<class AT >
int* fmatvec::Matrix< Sparse, Ref, Ref, AT >::Jp ( ) [inline]

Pointer operator.

Todo:
Docu
template<class AT >
const AT* fmatvec::Matrix< Sparse, Ref, Ref, AT >::operator() ( ) const [inline]

Pointer operator.

See operator()()

template<class AT >
AT* fmatvec::Matrix< Sparse, Ref, Ref, AT >::operator() ( ) [inline]

Pointer operator.

Returns the pointer to the first element.

Returns:
The pointer to the first element.
template<class AT >
Matrix< Sparse, Ref, Ref, AT > & fmatvec::Matrix< Sparse, Ref, Ref, AT >::operator<< ( const Matrix< Sparse, Ref, Ref, AT > &  A) [inline]

Copy operator.

Copies the sparse matrix given by A.

Parameters:
AThe matrix to be copied.
Returns:
A reference to the calling matrix.
template<class AT >
Matrix< Sparse, Ref, Ref, AT > & fmatvec::Matrix< Sparse, Ref, Ref, AT >::operator<< ( const SquareMatrix< Ref, AT > &  A) [inline]

Element operator.

See operator<<(const Matrix<Sparse,Ref,Ref,T>&)

References fmatvec::Matrix< General, Ref, Ref, AT >::cols(), fmatvec::countElements(), and fmatvec::Matrix< General, Ref, Ref, AT >::rows().

template<class AT >
Matrix< Sparse, Ref, Ref, AT > & fmatvec::Matrix< Sparse, Ref, Ref, AT >::operator<< ( const Matrix< Symmetric, Var, Var, AT > &  A) [inline]

Element operator.

See operator<<(const Matrix<Sparse,Ref,Ref,T>&)

References fmatvec::Matrix< Symmetric, Var, Var, AT >::cols(), fmatvec::countElementsLT(), and fmatvec::Matrix< Symmetric, Var, Var, AT >::rows().

template<class AT >
Matrix< Sparse, Ref, Ref, AT > & fmatvec::Matrix< Sparse, Ref, Ref, AT >::operator= ( const Matrix< Sparse, Ref, Ref, AT > &  A) [inline]

Assignment operator.

Copies the sparse matrix given by A by calling operator<<().

Parameters:
AThe matrix to be assigned.
Returns:
A reference to the calling matrix.
Remarks:
To call operator>>() by default, define FMATVEC_NO_DEEP_ASSIGNMENT
See also:
operator<<(), operator>>()
template<class AT >
Matrix< Sparse, Ref, Ref, AT > & fmatvec::Matrix< Sparse, Ref, Ref, AT >::operator>> ( const Matrix< Sparse, Ref, Ref, AT > &  A) [inline]

Reference operator.

References the sparse matrix given by A.

Parameters:
AThe matrix to be referenced.
Returns:
A reference to the calling matrix.
template<class AT >
int fmatvec::Matrix< Sparse, Ref, Ref, AT >::rows ( ) const [inline]

Number of rows.

Returns:
The number of rows of the matrix

The documentation for this class was generated from the following file: