#include <cross.hpp>
Inheritance diagram for Cross:
Class find skeleton decomposition of real mxn matrix A by adaptive Cross approximation method with intermidiate 1-rank approximation. Implementation based on the algorithm described in "A Parallel Implementation of the Matrix Cross Approximation Method" D. A. Zheltkov and E. E. Tyrtyshnikov, 2015, https://www.mathnet.ru/vmp548.
Definition at line 30 of file cross.hpp.
Public Types | |
enum | mv_mode { normal, transpose } |
Matrix for which operations be used: matrix itself or its transpose. More... | |
Public Member Functions | |
Cross (const Matrix &M) | |
Initialize Cross approximation for matrix M. | |
void | Approximate (double _eps) |
Find Cross approximation with tolerance paramater eps. | |
double | GetEps () const |
Get last used tolerance eps. | |
unsigned | GetNumRows () const |
Get number of rows. | |
unsigned | GetNumCols () const |
Get number of columns. | |
double | elem (unsigned i, unsigned j) const |
Get element in position i,j. | |
const Matrix & | GetM () const |
Get the original matrix. | |
const Matrix & | GetU () const |
Return U factor of skeleton decomposition. | |
const Matrix & | GetV () const |
Return V factor of skeleton decomposition. | |
~Cross () | |
The destructor. | |
unsigned | GetRank () const |
Get rank of matrix. | |
void | MatvecF (double alpha, const double *vec, double *res, double *calc, mv_mode mode=normal) const |
Matvec with Full part of matrix. | |
void | MatvecUT (double alpha, const double *vec, double *res, mv_mode mode=normal) const |
Matvec with Upper Triangular part of matrix. | |
void | MatvecLT (double alpha, const double *vec, double *res, mv_mode mode=normal) const |
Matvec with Lower Triangular part of matrix. | |
Row | GetRow (unsigned i) const |
Get view of i row of matrix. | |
Column | GetCol (unsigned j) const |
Get view of j column of matrix. | |
Protected Attributes | |
unsigned | rank |
|
Matrix for which operations be used: matrix itself or its transpose.
Definition at line 37 of file skeleton.hpp. |
|
Initialize Cross approximation for matrix M.
|
|
The destructor.
|
|
Find Cross approximation with tolerance paramater eps.
Definition at line 110 of file cross.cpp. References IndexList::AddIndex(), ReallocatableMatrix::elem(), MatrixSub::elem(), Matrix::GetCol(), IndexList::GetFirstNotListed(), GetNumCols(), GetNumRows(), Matrix::GetRow(), and ReallocatableMatrix::Resize(). |
|
Get last used tolerance eps.
|
|
Get number of rows.
Implements Matrix. Definition at line 26 of file cross.cpp. References Matrix::GetNumRows(). Referenced by Approximate(), and elem(). |
|
Get number of columns.
Implements Matrix. Definition at line 31 of file cross.cpp. References Matrix::GetNumCols(). Referenced by Approximate(), and elem(). |
|
Get element in position i,j.
Implements Matrix. Definition at line 42 of file cross.cpp. References GetNumCols(), and GetNumRows(). |
|
Get the original matrix.
Implements Skeleton. |
|
Return U factor of skeleton decomposition.
Implements Skeleton. |
|
Return V factor of skeleton decomposition.
Implements Skeleton. |
|
|
Matvec with Full part of matrix. Calculate res = alpha * A * vec, where A is mxn matrix (A equal M or M.T) with rank r.
Definition at line 16 of file skeleton.cpp. References Matrix::elem(), Matrix::GetNumCols(), Matrix::GetNumRows(), Skeleton::GetU(), Skeleton::GetV(), Skeleton::normal, and Skeleton::rank. Referenced by SmoluchowskiCalcFast::calc_L5(). |
|
Matvec with Upper Triangular part of matrix. Calculate res = alpha * upper_triangular_part(A) * vec, where A is mxn matrix (A equal M or M.T), upper_triangular_part(A) is a mxn matrix which upper triangular part equal to A.
Definition at line 41 of file skeleton.cpp. References Matrix::elem(), Matrix::GetNumCols(), Matrix::GetNumRows(), Skeleton::GetU(), Skeleton::GetV(), Skeleton::normal, and Skeleton::rank. Referenced by SmoluchowskiCalcFast::calc_L4(). |
|
Matvec with Lower Triangular part of matrix. Calculate res = alpha * lower_triangular_part(A) * vec, where A is mxn matrix (A equal M or M.T), lower_triangular_part(A) is a mxn matrix which lower triangular part equal to A.
Definition at line 67 of file skeleton.cpp. References Matrix::elem(), Matrix::GetNumCols(), Matrix::GetNumRows(), Skeleton::GetU(), Skeleton::GetV(), Skeleton::normal, and Skeleton::rank. Referenced by SmoluchowskiCalcFast::calc_L3(). |
|
Get view of i row of matrix.
Definition at line 19 of file matrix.cpp. Referenced by Approximate(). |
|
Get view of j column of matrix.
Definition at line 39 of file matrix.cpp. Referenced by Approximate(). |
|
Definition at line 24 of file skeleton.hpp. Referenced by Skeleton::GetRank(), Skeleton::MatvecF(), Skeleton::MatvecLT(), and Skeleton::MatvecUT(). |