Class xlifepp::ColDenseStorage#

class ColDenseStorage : public xlifepp::DenseStorage#

Inheritence diagram for xlifepp::ColDenseStorage:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "1" [label="xlifepp::ColDenseStorage" tooltip="xlifepp::ColDenseStorage" fillcolor="#BFBFBF"] "2" [label="xlifepp::DenseStorage" tooltip="xlifepp::DenseStorage"] "3" [label="xlifepp::MatrixStorage" tooltip="xlifepp::MatrixStorage"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "2" -> "3" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::ColDenseStorage:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "5" [label="std::vector< T >" tooltip="std::vector< T >"] "4" [label="std::vector< xlifepp::MatrixStorage * >" tooltip="std::vector< xlifepp::MatrixStorage * >"] "1" [label="xlifepp::ColDenseStorage" tooltip="xlifepp::ColDenseStorage" fillcolor="#BFBFBF"] "2" [label="xlifepp::DenseStorage" tooltip="xlifepp::DenseStorage"] "3" [label="xlifepp::MatrixStorage" tooltip="xlifepp::MatrixStorage"] "4" -> "5" [dir=forward tooltip="template-instance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "3" -> "4" [dir=forward tooltip="usage"] }

handles dense storage of matrix stored column by column

Public Functions

ColDenseStorage(number_t, number_t, string_t id = "ColDenseStorage")#

constructor by access type, number of columns and rows

ColDenseStorage(number_t, string_t id = "ColDenseStorage")#

constructor by access type, number of columns and rows (square matrix)

ColDenseStorage(string_t id = "ColDenseStorage")#

default constructor

inline virtual ~ColDenseStorage()#

virtual destructor

template<typename M1, typename M2, typename R>
void addMatrixMatrix(const std::vector<M1>&, const std::vector<M2>&, std::vector<R>&) const#

templated row dense Matrix + Matrix

Add two matrices.

Parameters:
  • m1 – vector values_ of first matrix

  • m2 – vector values_ of second matrix

  • r – vector values_ of result matrix

inline virtual void addMatrixMatrix(const std::vector<real_t> &m, const std::vector<real_t> &v, std::vector<real_t> &rv) const#

Matrix+Matrix.

inline virtual ColDenseStorage *clone() const#

create a clone (virtual copy constructor, covariant)

inline virtual void diagonalMatrixVector(const std::vector<real_t> &m, const std::vector<real_t> &v, std::vector<real_t> &rv, SymType s) const#

diag Matrix * Vector (Scalar)

virtual std::vector<std::pair<number_t, number_t>> getCol(SymType s, number_t c, number_t r1 = 1, number_t r2 = 0) const#

get (row indices, adress) of col c in set [r1,r2]

virtual std::vector<std::pair<number_t, number_t>> getRow(SymType s, number_t r, number_t c1 = 1, number_t c2 = 0) const#

get (col indices, adress) of row r in set [c1,c2]

inline virtual void lowerD1MatrixVector(const std::vector<real_t> &m, const std::vector<real_t> &v, std::vector<real_t> &rv, SymType s) const#

lower Matrix diag 1 (Scalar) * Vector (Scalar)

inline virtual void lowerMatrixVector(const std::vector<real_t> &m, const std::vector<real_t> &v, std::vector<real_t> &rv, SymType s) const#

lower Matrix (Scalar) * Vector (Scalar)

template<typename M, typename V, typename R>
void multMatrixVector(const std::vector<M>&, const std::vector<V>&, std::vector<R>&) const#

templated col dense Matrix x Vector

template<typename M, typename V, typename R>
void multMatrixVector(const std::vector<M> &m, V *vp, R *rp) const#

templated col dense Matrix x Vector (pointer form)

inline virtual void multMatrixVector(const std::vector<Matrix<real_t>> &m, const std::vector<Vector<real_t>> &v, std::vector<Vector<real_t>> &rv, SymType sym) const#

Matrix (Matrix) * Vector (Vector)

inline virtual void multMatrixVector(const std::vector<real_t> &m, const std::vector<real_t> &v, std::vector<real_t> &rv, SymType) const#

Matrix (Scalar) * Vector (Scalar)

inline virtual void multMatrixVector(const std::vector<real_t> &m, real_t *vp, real_t *rp, SymType sym) const#

Matrix * Vector (pointer form)

template<typename M, typename V, typename R>
void multVectorMatrix(const std::vector<M>&, const std::vector<V>&, std::vector<R>&) const#

templated Vector x col dense Matrix

template<typename M, typename V, typename R>
void multVectorMatrix(const std::vector<M> &m, V *vp, R *rp) const#

templated Vector x col dense Matrix (pointer form)

inline virtual void multVectorMatrix(const std::vector<Matrix<real_t>> &m, const std::vector<Vector<real_t>> &v, std::vector<Vector<real_t>> &rv, SymType sym) const#

Matrix (Matrix) * Vector (Vector)

inline virtual void multVectorMatrix(const std::vector<real_t> &m, const std::vector<real_t> &v, std::vector<real_t> &rv, SymType) const#

Vector (Scalar) * Matrix (Scalar)

inline virtual void multVectorMatrix(const std::vector<real_t> &m, real_t *vp, real_t *rp, SymType sym) const#

Vector * Matrix (pointer form)

template<typename M, typename V, typename R>
void parallelMultMatrixVector(const std::vector<M>&, const std::vector<V>&, std::vector<R>&) const#

parallel templated col dense Matrix x Vector

virtual number_t pos(number_t i, number_t j, SymType s = _noSymmetry) const#

overloaded pos returns adress of entry (i,j)

inline virtual number_t pos_(number_t i, number_t j, SymType s = _noSymmetry) const#

overloaded pos fast returns adress of entry (i,j)

virtual void positions(const std::vector<number_t>&, const std::vector<number_t>&, std::vector<number_t>&, bool errorOn = true, SymType = _noSymmetry) const#

access to submatrix positions

virtual void printEntries(std::ostream&, const std::vector<complex_t>&, number_t vb = 0, const SymType sym = _noSymmetry) const#

output row dense matrix of complex scalars

virtual void printEntries(std::ostream&, const std::vector<Matrix<complex_t>>&, number_t vb = 0, const SymType sym = _noSymmetry) const#

output row dense matrix of complex matrices

virtual void printEntries(std::ostream&, const std::vector<Matrix<real_t>>&, number_t vb = 0, const SymType sym = _noSymmetry) const#

output row dense matrix of real matrices

virtual void printEntries(std::ostream&, const std::vector<real_t>&, number_t vb = 0, const SymType sym = _noSymmetry) const#

output row dense matrix of real scalars

void printEntries(std::ostream&, const std::vector<Vector<complex_t>>&, number_t vb = 0, const SymType sym = _noSymmetry) const#

output row dense matrix of complex vectors

void printEntries(std::ostream&, const std::vector<Vector<real_t>>&, number_t vb = 0, const SymType sym = _noSymmetry) const#

output row dense matrix of real vectors

inline virtual void setDiagValue(std::vector<real_t> &m, const real_t k)#

set value of diagonal

template<typename T>
void setDiagValueColDense(std::vector<T> &m, const T k)#

Set value of Diagonal.

virtual ColDenseStorage *toScalar(dimen_t, dimen_t)#

create a new scalar ColDense storage from current ColDense storage and submatrix sizes

template<typename M, typename OrdinalType>
void toUmfPack(const std::vector<M> &values, std::vector<OrdinalType> &colPointer, std::vector<OrdinalType> &rowIndex, std::vector<M> &mat) const#

conversion to umfpack format

template<typename M1, typename Idx>
void toUmfPack(const std::vector<M1> &m1, std::vector<Idx> &colPtUmf, std::vector<Idx> &rowIdxUmf, std::vector<M1> &resultUmf) const#

Extract and convert matrix storage to UMFPack format (Matlab sparse matrix)

Parameters:
  • m1 – vector values_ current matrix

  • colPtUmf – vector column Pointer of UMFPack format

  • rowIdxUmf – vector row Index of UMFPack format

  • resultUmf – vector values of UMFPack format

inline virtual void toUmfPack(const std::vector<real_t> &values, std::vector<int_t> &colPointer, std::vector<int_t> &rowIndex, std::vector<real_t> &mat, const SymType sym) const#

specialization of umfpack conversion

inline virtual MatrixStorage *transpose(const std::vector<real_t> &m, std::vector<real_t> &mt) const#

transpose matrix

template<typename T>
MatrixStorage *transpose(const std::vector<T> &m, std::vector<T> &mt) const#

transpose matrix

inline virtual void upperD1MatrixVector(const std::vector<real_t> &m, const std::vector<real_t> &v, std::vector<real_t> &rv, SymType s) const#

upper Matrix diag 1 (Scalar) * Vector (Scalar)

inline virtual void upperMatrixVector(const std::vector<real_t> &m, const std::vector<real_t> &v, std::vector<real_t> &rv, SymType s) const#

upper Matrix (Scalar) * Vector (Scalar)