Class xlifepp::ColCsStorage#

class ColCsStorage : public xlifepp::CsStorage#

Inheritence diagram for xlifepp::ColCsStorage:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "1" [label="xlifepp::ColCsStorage" tooltip="xlifepp::ColCsStorage" fillcolor="#BFBFBF"] "2" [label="xlifepp::CsStorage" tooltip="xlifepp::CsStorage"] "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::ColCsStorage:

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 >"] "6" [label="std::vector< number_t >" tooltip="std::vector< number_t >"] "4" [label="std::vector< xlifepp::MatrixStorage * >" tooltip="std::vector< xlifepp::MatrixStorage * >"] "1" [label="xlifepp::ColCsStorage" tooltip="xlifepp::ColCsStorage" fillcolor="#BFBFBF"] "2" [label="xlifepp::CsStorage" tooltip="xlifepp::CsStorage"] "3" [label="xlifepp::MatrixStorage" tooltip="xlifepp::MatrixStorage"] "6" -> "5" [dir=forward tooltip="template-instance"] "4" -> "5" [dir=forward tooltip="template-instance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "6" [dir=forward tooltip="usage"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "3" -> "4" [dir=forward tooltip="usage"] }

child class of col compressed sparse storage

Public Functions

ColCsStorage(number_t nr = 0, number_t nc = 0, string_t id = "ColCsStorage")#

default constructor

template<class L>
ColCsStorage(number_t, number_t, const std::vector<L>&, string_t id = "ColCsStorage")#

constructor by the list of row index by cols

move matrix from from current storage (_csCol) to an other one (only csCol for the moment), return false if not available

inline ~ColCsStorage()#

destructor constructor by a pair of global numbering vectors

virtual void addCol(number_t, const std::set<number_t>&, MatrixPart = _all)#

add col-rows (r,c1), (r,c2), … given by a rows set (r,c>=1)

virtual void addIndices(const std::vector<number_t>&, const std::vector<number_t>&)#

add indexes (i,j) given by rows (i) and columns (j) (i,j >= 1)

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.

virtual void addSubMatrixIndices(const std::vector<number_t>&, const std::vector<number_t>&)#

add dense submatrix indices to storage

inline virtual void clear()#

clear storage vectors

inline virtual ColCsStorage *clone() const#

create a clone (virtual copy constructor, covariant)

inline std::vector<number_t> &colPointer()#

vector of positions of beginning of cols

inline const std::vector<number_t> &colPointer() const#

vector of positions of beginning of cols

inline virtual void deleteCols(number_t c1, number_t c2, std::vector<complex_t> &v, SymType s)#

delete cols c1,…, c2 (may be expansive for some storage)

inline virtual void deleteCols(number_t c1, number_t c2, std::vector<Matrix<complex_t>> &v, SymType s)#

delete cols c1,…, c2 (may be expansive for some storage)

inline virtual void deleteCols(number_t c1, number_t c2, std::vector<Matrix<real_t>> &v, SymType s)#

delete cols c1,…, c2 (may be expansive for some storage)

inline virtual void deleteCols(number_t c1, number_t c2, std::vector<real_t> &v, SymType s)#

delete rows c1,…, c2 (may be expansive for some storage)

inline virtual void deleteRows(number_t r1, number_t r2, std::vector<complex_t> &v, SymType s)#

delete rows r1,…, r2 (may be expansive for some storage)

inline virtual void deleteRows(number_t r1, number_t r2, std::vector<Matrix<complex_t>> &v, SymType s)#

delete rows r1,…, r2 (may be expansive for some storage)

inline virtual void deleteRows(number_t r1, number_t r2, std::vector<Matrix<real_t>> &v, SymType s)#

delete rows r1,…, r2 (may be expansive for some storage)

inline virtual void deleteRows(number_t r1, number_t r2, std::vector<real_t> &v, SymType s)#

delete rows r1,…, r2 (may be expansive for some storage)

inline virtual void fillSkylineValues(const std::vector<complex_t> &csval, std::vector<complex_t> &skyval, SymType sym, MatrixStorage *skysto) const#

fill complex values of current storage as a skyline storage

inline virtual void fillSkylineValues(const std::vector<Matrix<complex_t>> &csval, std::vector<Matrix<complex_t>> &skyval, SymType sym, MatrixStorage *skysto) const#

fill values of current storage as a skyline storage

move matrix from from current storage to an other one, return false if not available

inline virtual void fillSkylineValues(const std::vector<Matrix<real_t>> &csval, std::vector<Matrix<real_t>> &skyval, SymType sym, MatrixStorage *skysto) const#

fill values of current storage as a skyline storage

inline virtual void fillSkylineValues(const std::vector<real_t> &csval, std::vector<real_t> &skyval, SymType sym, MatrixStorage *skysto) const#

fill real values of current storage as a skyline storage

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]

virtual std::set<number_t> getRows(number_t c, number_t r1 = 1, number_t r2 = 0) const#

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

get row indices of col c in range [r1,r2], specific CsCol algorithm (no getCols, use generic algorithm)

virtual void getRowsV(std::vector<number_t>&, number_t&, number_t c, number_t r1 = 1, number_t r2 = 0) const#

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

get row indices of col c in range [r1,r2], specific CsCol algorithm (no getCols, use generic algorithm)

template<typename M>
void ilu(std::vector<M> &m, std::vector<M> &fa) const#

Incomplete matrix factorization with ILU.

inline virtual void ilu(std::vector<real_t> &m, std::vector<real_t> &fa, const SymType sym = _noSymmetry) const#

specializations of template ILU

inline virtual void loadFromFileCoo(std::istream &ifs, std::vector<complex_t> &mat, SymType sym, bool rAsC)#

load a complex coordinate matrix

inline virtual void loadFromFileCoo(std::istream &ifs, std::vector<real_t> &mat, SymType sym, bool rAsC)#

load a real coordinate matrix

inline virtual void loadFromFileDense(std::istream &ifs, std::vector<complex_t> &mat, SymType sym, bool rAsC)#

load a complex dense matrix from file

inline virtual void loadFromFileDense(std::istream &ifs, std::vector<real_t> &mat, SymType sym, bool rAsC)#

load a real dense matrix from file

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

templated col cs Matrix x Vector

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

templated Vector x col cs Matrix (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)

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 cs Matrix

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

templated Vector x col cs 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#

Vector (Vector) * Matrix (Matrix)

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)

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

access to submatrix positions

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 s = _noSymmetry) const#

access to submatrix positions

inline virtual void print(PrintStream &os) const#

visualize storage on ostream

virtual void print(std::ostream&) const#

print storage pointers

void printCooMatrix(std::ostream&, const std::vector<complex_t>&, SymType s = _noSymmetry) const#

output matrix of real scalars in coordinate form

void printCooMatrix(std::ostream&, const std::vector<Matrix<complex_t>>&, SymType s = _noSymmetry) const#

output matrix of complex scalars in coordinate form

void printCooMatrix(std::ostream&, const std::vector<Matrix<real_t>>&, SymType s = _noSymmetry) const#

output matrix of real scalars in coordinate form

void printCooMatrix(std::ostream&, const std::vector<real_t>&, SymType s = _noSymmetry) const#

output matrix of real scalars in coordinate form

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

print complex scalar matrix

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

print matrix of complex matrices

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

print matrix of real matrices

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

print real scalar matrix

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

print matrix of complex vectors (not available)

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

print matrix of real vectors (not available)

inline std::vector<number_t> &rowIndex()#

vector of row index of non zero value

inline const std::vector<number_t> &rowIndex() const#

vector of row index of non zero value

virtual bool sameStorage(const MatrixStorage&) const#

check if two storages have the same structures

inline virtual number_t size() const#

number of non zero elements stored

virtual std::vector<number_t> skylineColPointer() const#

return skyline col pointer from current ColCsStorage

virtual std::vector<number_t> skylineRowPointer() const#

return skyline row pointer from current ColCsStorage

virtual ColCsStorage *toScalar(dimen_t, dimen_t)#

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

template<typename T>
bool toStorageT(const MatrixStorage &newsto, std::vector<T> &newval, const std::vector<T> &oldval) const#

move from current storage to newstorage, return false if not available

move matrix from from current storage to an other one, return false if not available

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> &colPt, std::vector<Idx> &rowIdx, std::vector<M1> &result) const#

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

Parameters:
  • m1 – vector values_ current matrix

  • colPt – vector column Pointer of UMFPack format

  • rowIdx – vector row Index of UMFPack format

  • result – 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#

conversion to umfpack format