NiHu  2.0
ACA Class Reference

class performing Adaptive Cross Approximation More...

#include <aca.hpp>

Public Member Functions

template<class Matrix , class RowArray , class ColumnArray , class BlockArray , class Input , class Output , class Ranks >
void multiply (Matrix const &M, Eigen::DenseBase< RowArray > const &rowClusters, Eigen::DenseBase< ColumnArray > const &colClusters, Eigen::DenseBase< BlockArray > const &blocks, Input const &input, Output &output, double eps, int maxRank, Ranks &outRanks)
 Compute matrix-vector product with multilevel low rank approximation. More...
 
int get_nEval (void) const
 return number of matrix evaluations
 
int get_matrixSize (void) const
 number of matrix elements in processed blocks
 
double get_sizeCompression (void) const
 return the size compression ratio
 

Static Public Member Functions

template<class Matrix , class Result >
static int low_rank_approx (Matrix const &M, int nRows, int nCols, double eps, int R, Eigen::DenseBase< Result > &U, Eigen::DenseBase< Result > &V)
 compute low rank approximation of a matrix with a prescribed accuracy and maximum rank More...
 
template<class Matrix , class RowArray , class ColumnArray , class BlockArray >
static std::vector< LowRank< typename Matrix::Scalar > > decompose (Matrix const &M, Eigen::DenseBase< RowArray > const &rowClusters, Eigen::DenseBase< ColumnArray > const &colClusters, Eigen::DenseBase< BlockArray > const &blocks, double eps, int maxRank)
 decompose a matrix into ACA low rank decomposition More...
 

Detailed Description

class performing Adaptive Cross Approximation

Definition at line 71 of file aca.hpp.

Member Function Documentation

◆ decompose()

template<class Matrix , class RowArray , class ColumnArray , class BlockArray >
static std::vector<LowRank<typename Matrix::Scalar> > ACA::decompose ( Matrix const &  M,
Eigen::DenseBase< RowArray > const &  rowClusters,
Eigen::DenseBase< ColumnArray > const &  colClusters,
Eigen::DenseBase< BlockArray > const &  blocks,
double  eps,
int  maxRank 
)
inlinestatic

decompose a matrix into ACA low rank decomposition

Template Parameters
Matrix
RowArray
ColumnArray
BlockArray
Parameters
[in]Mthe matrix to decompose
[in]rowClustersthe matrix of row clusters
[in]colClusterthe matrix of column clusters
[in]blocksthe matrix of block indices
Returns
a std::vector of LowRank objects representing the LRA

Definition at line 285 of file aca.hpp.

◆ low_rank_approx()

template<class Matrix , class Result >
static int ACA::low_rank_approx ( Matrix const &  M,
int  nRows,
int  nCols,
double  eps,
int  R,
Eigen::DenseBase< Result > &  U,
Eigen::DenseBase< Result > &  V 
)
inlinestatic

compute low rank approximation of a matrix with a prescribed accuracy and maximum rank

The low rank approximation is of the form M = U * V.transpose()

Template Parameters
Matrixthe matrix class
Resultthe type of the result (Eigen matrix)
Parameters
[in]Mthe matrix to approximate
[in]nRowsthe number of matrix rows
[in]nColsthe number of matrix cols
[in]epsthe prescribed approximation accuracy
[in]Rthe maximum rank (number of iterations)
[out]Ulhs term of the approximation
[out]Vrhs term of the approximation
Returns
the actual rank of the approximation ( <= R )

Definition at line 135 of file aca.hpp.

◆ multiply()

template<class Matrix , class RowArray , class ColumnArray , class BlockArray , class Input , class Output , class Ranks >
void ACA::multiply ( Matrix const &  M,
Eigen::DenseBase< RowArray > const &  rowClusters,
Eigen::DenseBase< ColumnArray > const &  colClusters,
Eigen::DenseBase< BlockArray > const &  blocks,
Input const &  input,
Output &  output,
double  eps,
int  maxRank,
Ranks &  outRanks 
)
inline

Compute matrix-vector product with multilevel low rank approximation.

Template Parameters
Matrixthe matrix class
RowArraytype of the array storing the row cluster tree
ColumnArraytype of the array storing the column cluster tree
BlockArraytype of the array storing the block tree
Inputtype of the input vector
Outputtype of the output vector
Parameters
[in]rowClustersthe row cluster tree as Eigen matrix
[in]colClustersthe column cluster tree as Eigen matrix
[in]blocksthe block tree as Eigen matrix
[in]inputthe input vector
[out]outputthe output vector
[in]epsthe ACA approximation error
[in]maxRankthe maximal ACA approximation rank

Definition at line 217 of file aca.hpp.


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