Classes | |
| class | ClusterTree |
| The cluster tree, or partition tree that represents the partitioning of the rows or columns of a hierarchical matrix. More... | |
| class | StructuredMatrix |
| Class to represent a structured matrix. This is the abstract base class for several types of structured matrices. More... | |
| class | StructuredOptions |
| Class containing several options for the StructuredMatrix code and data-structures. More... | |
Typedefs | |
| template<typename scalar_t > | |
| using | extract_t = std::function< scalar_t(std::size_t i, std::size_t j)> |
| template<typename scalar_t > | |
| using | extract_block_t = std::function< void(const std::vector< std::size_t > &I, const std::vector< std::size_t > &J, DenseMatrix< scalar_t > &B)> |
| template<typename scalar_t > | |
| using | mult_t = std::function< void(Trans op, const DenseMatrix< scalar_t > &R, DenseMatrix< scalar_t > &S)> |
| template<typename scalar_t > | |
| using | extract_dist_block_t = std::function< void(const std::vector< std::size_t > &I, const std::vector< std::size_t > &J, DistributedMatrix< scalar_t > &B)> |
| template<typename scalar_t > | |
| using | mult_2d_t = std::function< void(Trans op, const DistributedMatrix< scalar_t > &R, DistributedMatrix< scalar_t > &S)> |
| template<typename scalar_t > | |
| using | mult_1d_t = std::function< void(Trans op, const DenseMatrix< scalar_t > &R, DenseMatrix< scalar_t > &S, const std::vector< int > &rdist, const std::vector< int > &cdist)> |
| using | admissibility_t = DenseMatrix< bool > |
Enumerations | |
| enum class | Type : int { HSS = 0 , BLR , HODLR , HODBF , BUTTERFLY , LR , LOSSY , LOSSLESS } |
Functions | |
| template<typename scalar_t > | |
| std::unique_ptr< StructuredMatrix< scalar_t > > | construct_from_dense (const DenseMatrix< scalar_t > &A, const StructuredOptions< scalar_t > &opts, const structured::ClusterTree *row_tree=nullptr, const structured::ClusterTree *col_tree=nullptr) |
| template<typename scalar_t > | |
| std::unique_ptr< StructuredMatrix< scalar_t > > | construct_from_dense (int rows, int cols, const scalar_t *A, int ldA, const StructuredOptions< scalar_t > &opts, const structured::ClusterTree *row_tree=nullptr, const structured::ClusterTree *col_tree=nullptr) |
| template<typename scalar_t > | |
| std::unique_ptr< StructuredMatrix< scalar_t > > | construct_from_elements (int rows, int cols, const extract_t< scalar_t > &A, const StructuredOptions< scalar_t > &opts, const structured::ClusterTree *row_tree=nullptr, const structured::ClusterTree *col_tree=nullptr) |
| template<typename scalar_t > | |
| std::unique_ptr< StructuredMatrix< scalar_t > > | construct_from_elements (int rows, int cols, const extract_block_t< scalar_t > &A, const StructuredOptions< scalar_t > &opts, const structured::ClusterTree *row_tree=nullptr, const structured::ClusterTree *col_tree=nullptr) |
| template<typename scalar_t > | |
| std::unique_ptr< StructuredMatrix< scalar_t > > | construct_matrix_free (int rows, int cols, const mult_t< scalar_t > &Amult, const StructuredOptions< scalar_t > &opts, const structured::ClusterTree *row_tree=nullptr, const structured::ClusterTree *col_tree=nullptr) |
| template<typename scalar_t > | |
| std::unique_ptr< StructuredMatrix< scalar_t > > | construct_partially_matrix_free (int rows, int cols, const mult_t< scalar_t > &Amult, const extract_block_t< scalar_t > &Aelem, const StructuredOptions< scalar_t > &opts, const structured::ClusterTree *row_tree=nullptr, const structured::ClusterTree *col_tree=nullptr) |
| template<typename scalar_t > | |
| std::unique_ptr< StructuredMatrix< scalar_t > > | construct_partially_matrix_free (int rows, int cols, const mult_t< scalar_t > &Amult, const extract_t< scalar_t > &Aelem, const StructuredOptions< scalar_t > &opts, const structured::ClusterTree *row_tree=nullptr, const structured::ClusterTree *col_tree=nullptr) |
| template<typename scalar_t > | |
| std::unique_ptr< StructuredMatrix< scalar_t > > | construct_from_dense (const DistributedMatrix< scalar_t > &A, const StructuredOptions< scalar_t > &opts, const structured::ClusterTree *row_tree=nullptr, const structured::ClusterTree *col_tree=nullptr) |
| template<typename scalar_t > | |
| std::unique_ptr< StructuredMatrix< scalar_t > > | construct_from_elements (const MPIComm &comm, int rows, int cols, const extract_t< scalar_t > &A, const StructuredOptions< scalar_t > &opts, const structured::ClusterTree *row_tree=nullptr, const structured::ClusterTree *col_tree=nullptr) |
| template<typename scalar_t > | |
| std::unique_ptr< StructuredMatrix< scalar_t > > | construct_from_elements (const MPIComm &comm, int rows, int cols, const extract_dist_block_t< scalar_t > &A, const StructuredOptions< scalar_t > &opts, const structured::ClusterTree *row_tree=nullptr, const structured::ClusterTree *col_tree=nullptr) |
| template<typename scalar_t > | |
| std::unique_ptr< StructuredMatrix< scalar_t > > | construct_matrix_free (const MPIComm &comm, const BLACSGrid *g, int rows, int cols, const mult_2d_t< scalar_t > &Amult, const StructuredOptions< scalar_t > &opts, const structured::ClusterTree *row_tree=nullptr, const structured::ClusterTree *col_tree=nullptr) |
| template<typename scalar_t > | |
| std::unique_ptr< StructuredMatrix< scalar_t > > | construct_matrix_free (const MPIComm &comm, int rows, int cols, const mult_1d_t< scalar_t > &Amult, const StructuredOptions< scalar_t > &opts, const structured::ClusterTree *row_tree=nullptr, const structured::ClusterTree *col_tree=nullptr) |
| template<typename real_t > | |
| real_t | default_structured_rel_tol () |
| template<typename real_t > | |
| real_t | default_structured_abs_tol () |
| template<> | |
| float | default_structured_rel_tol () |
| template<> | |
| float | default_structured_abs_tol () |
| std::string | get_name (Type a) |
Namespace containing the StructuredMatrix class, a general abstract interface to several other rank-structured matrix representations.
| using strumpack::structured::admissibility_t = typedef DenseMatrix<bool> |
Type to specify admissibility of individual sub-blocks.
| using strumpack::structured::extract_block_t = typedef std::function <void(const std::vector<std::size_t>& I, const std::vector<std::size_t>& J, DenseMatrix<scalar_t>& B)> |
Type for block element extraction routine. This can be implemented as a lambda function, a functor or a funtion pointer.
| I | vector of row indices |
| J | vector of column indices |
| B | submatrix (I, J) to be computed by user code |
| using strumpack::structured::extract_dist_block_t = typedef std::function <void(const std::vector<std::size_t>& I, const std::vector<std::size_t>& J, DistributedMatrix<scalar_t>& B)> |
Type for block element extraction routine. This can be implemented as a lambda function, a functor or a funtion pointer. The sub-matrix should be put into a 2d block cyclicly distributed matrix.
| I | vector of row indices |
| J | vector of column indices |
| B | 2d block cyclic matrix, submatrix (I, J) to be computed by user code |
| using strumpack::structured::extract_t = typedef std::function <scalar_t(std::size_t i, std::size_t j)> |
Type for element extraction routine. This can be implemented as a lambda function, a functor or a funtion pointer.
| i | vector of row indices |
| j | vector of column indices |
| using strumpack::structured::mult_1d_t = typedef std::function <void(Trans op, const DenseMatrix<scalar_t>& R, DenseMatrix<scalar_t>& S, const std::vector<int>& rdist, const std::vector<int>& cdist)> |
Type for matrix multiplication routine with 1D block row distribution. The block row/column distribution of the matrix is given by the rdist and cdist vectors, with processor p owning rows [rdist[p],rdist[p+1]). cdist is only needed for non-square matrices. S is distributed according to rdist if t==Trans::N, else cdist. R is distributed according to cdist of t==Trans::N, else rdist.
| op | whether to compute the transposed/conjugate product |
| R | random matrix passed to user code |
| S | sample matrix to be computed by user code: S = A*R if op is Trans::N S = A*T*R if op is Trans::T S = A^C*R if op is Trans::C |
| rdist | Matrix row distribution, same on all ranks |
| cdist | Matrix column distribution, same on all ranks |
| using strumpack::structured::mult_2d_t = typedef std::function <void(Trans op, const DistributedMatrix<scalar_t>& R, DistributedMatrix<scalar_t>& S)> |
Type for matrix multiplication routine with 2D block cyclic distribution. This can be implemented as a lambda function, a functor or a funtion pointer.
| using strumpack::structured::mult_t = typedef std::function <void(Trans op, const DenseMatrix<scalar_t>& R, DenseMatrix<scalar_t>& S)> |
Type for matrix multiplication routine. This can be implemented as a lambda function, a functor or a funtion pointer.
|
strong |
Enumeration of possible structured matrix types.
| Enumerator | |
|---|---|
| HSS | Hierarchically Semi-Separable, see HSS::HSSMatrix and HSS::HSSMatrixMPI |
| BLR | Block Low Rank, see BLR::BLRMatrix and BLR::BLRMatrixMPI |
| HODLR | Hierarchically Off-Diagonal Low Rank, see HODLR::HODLRMatrix. Does not support float or std::complex<float>. |
| HODBF | Hierarchically Off-Diagonal Butterfly, implemented as HODLR::HODLRMatrix. Does not support float or std::complex<float>. |
| BUTTERFLY | Butterfly matrix, implemented as HODLR::ButterflyMatrix. Does not support float or std::complex<float>. |
| LR | Low rank matrix, implemented as HODLR::ButterflyMatrix. Does not support float or std::complex<float>. |
| LOSSY | Lossy compression matrix |
| LOSSLESS | Lossless compressed matrix |
| std::unique_ptr<StructuredMatrix<scalar_t> > strumpack::structured::construct_from_dense | ( | const DenseMatrix< scalar_t > & | A, |
| const StructuredOptions< scalar_t > & | opts, | ||
| const structured::ClusterTree * | row_tree = nullptr, |
||
| const structured::ClusterTree * | col_tree = nullptr |
||
| ) |
Construct a StructuredMatrix from a DenseMatrix<scalar_t>. This construction, taking a dense matrix should be valid for all StructuredMatrix types (see StructuredMatrix::Type). However, faster and more memory efficient methods of constructing StructuredMatrix representations are available, see StructuredMatrix::construct_from_elements, StructuredMatrix::construct_matrix_free and StructuredMatrix::construct_partially_matrix_free.
| scalar_t | precision of input matrix, and of constructed StructuredMatrix. Note that not all types support every all precisions. See StructuredMatrix::Type. |
| A | Input dense matrix, will not be modified |
| opts | Options object |
| row_tree | optional clustertree for the rows, see also strumpack::binary_tree_clustering |
| col_tree | optional clustertree for the columns. If the matrix is square, this does not need to be specified. |
| std::invalid_argument | If the operatation is not supported for the type of structured::StructuredMatrix, if the type requires a square matrix and the input is not square, if the structured::StructuredMatrix type requires MPI. |
| std::logic_error | If the operation is not implemented yet |
| std::runtime_error | If the operation requires a third party library which was not enabled when configuring STRUMPACK. |
| std::unique_ptr<StructuredMatrix<scalar_t> > strumpack::structured::construct_from_dense | ( | const DistributedMatrix< scalar_t > & | A, |
| const StructuredOptions< scalar_t > & | opts, | ||
| const structured::ClusterTree * | row_tree = nullptr, |
||
| const structured::ClusterTree * | col_tree = nullptr |
||
| ) |
Construct a StructuredMatrix from a 2D block-cyclicly distributed matrix (ScaLAPACK layout).
| scalar_t | precision of input matrix, and of constructed StructuredMatrix. Note that not all types support every all precisions. See StructuredMatrix::Type. |
| A | 2D block cyclic distributed matrix (ScaLAPACK layout). |
| opts | Options object |
| row_tree | optional clustertree for the rows, see also strumpack::binary_tree_clustering |
| col_tree | optional clustertree for the columns. If the matrix is square, this does not need to be specified. |
| std::invalid_argument | If the operatation is not supported for the type of structured::StructuredMatrix, if the type requires a square matrix and the input is not square, if the structured::StructuredMatrix type requires MPI. |
| std::logic_error | If the operation is not implemented yet |
| std::runtime_error | If the operation requires a third party library which was not enabled when configuring STRUMPACK. |
| std::unique_ptr<StructuredMatrix<scalar_t> > strumpack::structured::construct_from_dense | ( | int | rows, |
| int | cols, | ||
| const scalar_t * | A, | ||
| int | ldA, | ||
| const StructuredOptions< scalar_t > & | opts, | ||
| const structured::ClusterTree * | row_tree = nullptr, |
||
| const structured::ClusterTree * | col_tree = nullptr |
||
| ) |
Construct a StructuredMatrix from a DenseMatrix<scalar_t>. This construction, taking a dense matrix should be valid for all StructuredMatrix types (see StructuredMatrix::Type). However, faster and more memory efficient methods of constructing StructuredMatrix representations are available, see StructuredMatrix::construct_from_elements, StructuredMatrix::construct_matrix_free and StructuredMatrix::construct_partially_matrix_free.
| scalar_t | precision of input matrix, and of constructed StructuredMatrix. Note that not all types support every all precisions. See StructuredMatrix::Type. |
| rows | number of rows in matrix to be constructed |
| cols | number of columnss in matrix to be constructed |
| A | pointer to matrix A data |
| ldA | leading dimension of A |
| opts | Options object |
| row_tree | optional clustertree for the rows, see also strumpack::binary_tree_clustering |
| col_tree | optional clustertree for the columns. If the matrix is square, this does not need to be specified. |
| std::invalid_argument | If the operatation is not supported for the type of structured::StructuredMatrix, if the type requires a square matrix and the input is not square, if the structured::StructuredMatrix type requires MPI. |
| std::logic_error | If the operation is not implemented yet |
| std::runtime_error | If the operation requires a third party library which was not enabled when configuring STRUMPACK. |
| std::unique_ptr<StructuredMatrix<scalar_t> > strumpack::structured::construct_from_elements | ( | const MPIComm & | comm, |
| int | rows, | ||
| int | cols, | ||
| const extract_dist_block_t< scalar_t > & | A, | ||
| const StructuredOptions< scalar_t > & | opts, | ||
| const structured::ClusterTree * | row_tree = nullptr, |
||
| const structured::ClusterTree * | col_tree = nullptr |
||
| ) |
Construct a StructuredMatrix using a routine to extract a matrix sub-block.
| scalar_t | precision of input matrix, and of constructed StructuredMatrix. Note that not all types support every all precisions. See StructuredMatrix::Type. |
| comm | MPI communicator (wrapper class) |
| rows | Number of rows of matrix to be constructed. |
| cols | Number of columns of matrix to be constructed. |
| A | Matrix sub-block extraction routine. |
| opts | Options object |
| row_tree | optional clustertree for the rows, see also strumpack::binary_tree_clustering |
| col_tree | optional clustertree for the columns. If the matrix is square, this does not need to be specified. |
| std::invalid_argument | If the operatation is not supported for the type of structured::StructuredMatrix, if the type requires a square matrix and the input is not square, if the structured::StructuredMatrix type requires MPI. |
| std::logic_error | If the operation is not implemented yet |
| std::runtime_error | If the operation requires a third party library which was not enabled when configuring STRUMPACK. |
| std::unique_ptr<StructuredMatrix<scalar_t> > strumpack::structured::construct_from_elements | ( | const MPIComm & | comm, |
| int | rows, | ||
| int | cols, | ||
| const extract_t< scalar_t > & | A, | ||
| const StructuredOptions< scalar_t > & | opts, | ||
| const structured::ClusterTree * | row_tree = nullptr, |
||
| const structured::ClusterTree * | col_tree = nullptr |
||
| ) |
Construct a StructuredMatrix using an element extraction routine.
| scalar_t | precision of input matrix, and of constructed StructuredMatrix. Note that not all types support every all precisions. See StructuredMatrix::Type. |
| comm | MPI communicator (wrapper class) |
| rows | Number of rows of matrix to be constructed. |
| cols | Number of columns of matrix to be constructed. |
| A | Matrix element extraction routine. |
| opts | Options object |
| row_tree | optional clustertree for the rows, see also strumpack::binary_tree_clustering |
| col_tree | optional clustertree for the columns. If the matrix is square, this does not need to be specified. |
| std::invalid_argument | If the operatation is not supported for the type of structured::StructuredMatrix, if the type requires a square matrix and the input is not square, if the structured::StructuredMatrix type requires MPI. |
| std::logic_error | If the operation is not implemented yet |
| std::runtime_error | If the operation requires a third party library which was not enabled when configuring STRUMPACK. |
| std::unique_ptr<StructuredMatrix<scalar_t> > strumpack::structured::construct_from_elements | ( | int | rows, |
| int | cols, | ||
| const extract_block_t< scalar_t > & | A, | ||
| const StructuredOptions< scalar_t > & | opts, | ||
| const structured::ClusterTree * | row_tree = nullptr, |
||
| const structured::ClusterTree * | col_tree = nullptr |
||
| ) |
Construct a StructuredMatrix using a routine to extract a sub-block from the matrix.
| scalar_t | precision of input matrix, and of constructed StructuredMatrix. Note that not all types support every all precisions. See StructuredMatrix::Type. |
| rows | Number of rows of matrix to be constructed. |
| cols | Number of columns of matrix to be constructed. |
| A | Matrix block extraction routine. |
| opts | Options object |
| row_tree | optional clustertree for the rows, see also strumpack::binary_tree_clustering |
| col_tree | optional clustertree for the columns. If the matrix is square, this does not need to be specified. |
| std::invalid_argument | If the operatation is not supported for the type of structured::StructuredMatrix, if the type requires a square matrix and the input is not square, if the structured::StructuredMatrix type requires MPI. |
| std::logic_error | If the operation is not implemented yet |
| std::runtime_error | If the operation requires a third party library which was not enabled when configuring STRUMPACK. |
| std::unique_ptr<StructuredMatrix<scalar_t> > strumpack::structured::construct_from_elements | ( | int | rows, |
| int | cols, | ||
| const extract_t< scalar_t > & | A, | ||
| const StructuredOptions< scalar_t > & | opts, | ||
| const structured::ClusterTree * | row_tree = nullptr, |
||
| const structured::ClusterTree * | col_tree = nullptr |
||
| ) |
Construct a StructuredMatrix using a routine, provided by the user, to extract elements from the matrix.
| scalar_t | precision of input matrix, and of constructed StructuredMatrix. Note that not all types support every all precisions. See StructuredMatrix::Type. |
| rows | number of rows in matrix to be constructed |
| cols | number of columnss in matrix to be constructed |
| A | element extraction routine |
| opts | Options object |
| row_tree | optional clustertree for the rows, see also strumpack::binary_tree_clustering |
| col_tree | optional clustertree for the columns. If the matrix is square, this does not need to be specified. |
| std::invalid_argument | If the operatation is not supported for the type of structured::StructuredMatrix, if the type requires a square matrix and the input is not square, if the structured::StructuredMatrix type requires MPI. |
| std::logic_error | If the operation is not implemented yet |
| std::runtime_error | If the operation requires a third party library which was not enabled when configuring STRUMPACK. |
| std::unique_ptr<StructuredMatrix<scalar_t> > strumpack::structured::construct_matrix_free | ( | const MPIComm & | comm, |
| const BLACSGrid * | g, | ||
| int | rows, | ||
| int | cols, | ||
| const mult_2d_t< scalar_t > & | Amult, | ||
| const StructuredOptions< scalar_t > & | opts, | ||
| const structured::ClusterTree * | row_tree = nullptr, |
||
| const structured::ClusterTree * | col_tree = nullptr |
||
| ) |
Construct a StructuredMatrix using only a matrix-vector multiplication routine.
| comm | MPI communicator (wrapper class) |
| rows | Number of rows of matrix to be constructed. |
| cols | Number of columns of matrix to be constructed. |
| A | Matrix-(multi)vector multiplication routine (using 2d block cyclic layout for vectors). |
| opts | Options object |
| row_tree | optional clustertree for the rows, see also strumpack::binary_tree_clustering |
| col_tree | optional clustertree for the columns. If the matrix is square, this does not need to be specified. |
| std::invalid_argument | If the operatation is not supported for the type of structured::StructuredMatrix, if the type requires a square matrix and the input is not square, if the structured::StructuredMatrix type requires MPI. |
| std::logic_error | If the operation is not implemented yet |
| std::runtime_error | If the operation requires a third party library which was not enabled when configuring STRUMPACK. |
| std::unique_ptr<StructuredMatrix<scalar_t> > strumpack::structured::construct_matrix_free | ( | const MPIComm & | comm, |
| int | rows, | ||
| int | cols, | ||
| const mult_1d_t< scalar_t > & | Amult, | ||
| const StructuredOptions< scalar_t > & | opts, | ||
| const structured::ClusterTree * | row_tree = nullptr, |
||
| const structured::ClusterTree * | col_tree = nullptr |
||
| ) |
Construct a StructuredMatrix using only a matrix-vector multiplication routine.
| comm | MPI communicator (wrapper class) |
| rows | Number of rows of matrix to be constructed. |
| cols | Number of columns of matrix to be constructed. |
| A | Matrix-(multi)vector multiplication routine (using 1d block row distribution for vectors). |
| opts | Options object |
| row_tree | optional clustertree for the rows, see also strumpack::binary_tree_clustering |
| col_tree | optional clustertree for the columns. If the matrix is square, this does not need to be specified. |
| std::invalid_argument | If the operatation is not supported for the type of structured::StructuredMatrix, if the type requires a square matrix and the input is not square, if the structured::StructuredMatrix type requires MPI. |
| std::logic_error | If the operation is not implemented yet |
| std::runtime_error | If the operation requires a third party library which was not enabled when configuring STRUMPACK. |
| std::unique_ptr<StructuredMatrix<scalar_t> > strumpack::structured::construct_matrix_free | ( | int | rows, |
| int | cols, | ||
| const mult_t< scalar_t > & | Amult, | ||
| const StructuredOptions< scalar_t > & | opts, | ||
| const structured::ClusterTree * | row_tree = nullptr, |
||
| const structured::ClusterTree * | col_tree = nullptr |
||
| ) |
Construct a StructuredMatrix using only a matrix-vector multiplication routine.
| scalar_t | precision of input matrix, and of constructed StructuredMatrix. Note that not all types support every all precisions. See StructuredMatrix::Type. |
| rows | Number of rows of matrix to be constructed. |
| cols | Number of columns of matrix to be constructed. |
| Amult | Matrix-(multi)vector multiplication routine. |
| opts | Options object |
| row_tree | optional clustertree for the rows, see also strumpack::binary_tree_clustering |
| col_tree | optional clustertree for the columns. If the matrix is square, this does not need to be specified. |
| std::invalid_argument | If the operatation is not supported for the type of structured::StructuredMatrix, if the type requires a square matrix and the input is not square, if the structured::StructuredMatrix type requires MPI. |
| std::logic_error | If the operation is not implemented yet |
| std::runtime_error | If the operation requires a third party library which was not enabled when configuring STRUMPACK. |
| std::unique_ptr<StructuredMatrix<scalar_t> > strumpack::structured::construct_partially_matrix_free | ( | int | rows, |
| int | cols, | ||
| const mult_t< scalar_t > & | Amult, | ||
| const extract_block_t< scalar_t > & | Aelem, | ||
| const StructuredOptions< scalar_t > & | opts, | ||
| const structured::ClusterTree * | row_tree = nullptr, |
||
| const structured::ClusterTree * | col_tree = nullptr |
||
| ) |
Construct a StructuredMatrix using both a matrix-vector multiplication routine and a routine to extract a matrix sub-block.
| scalar_t | precision of input matrix, and of constructed StructuredMatrix. Note that not all types support every all precisions. See StructuredMatrix::Type. |
| rows | Number of rows of matrix to be constructed. |
| cols | Number of columns of matrix to be constructed. |
| Amult | Matrix-(multi)vector multiplication routine. |
| Aelem | Matrix block extraction routine. |
| opts | Options object |
| row_tree | optional clustertree for the rows, see also strumpack::binary_tree_clustering |
| col_tree | optional clustertree for the columns. If the matrix is square, this does not need to be specified. |
| std::invalid_argument | If the operatation is not supported for the type of structured::StructuredMatrix, if the type requires a square matrix and the input is not square, if the structured::StructuredMatrix type requires MPI. |
| std::logic_error | If the operation is not implemented yet |
| std::runtime_error | If the operation requires a third party library which was not enabled when configuring STRUMPACK. |
| std::unique_ptr<StructuredMatrix<scalar_t> > strumpack::structured::construct_partially_matrix_free | ( | int | rows, |
| int | cols, | ||
| const mult_t< scalar_t > & | Amult, | ||
| const extract_t< scalar_t > & | Aelem, | ||
| const StructuredOptions< scalar_t > & | opts, | ||
| const structured::ClusterTree * | row_tree = nullptr, |
||
| const structured::ClusterTree * | col_tree = nullptr |
||
| ) |
Construct a StructuredMatrix using both a matrix-vector multiplication routine and a routine to extract individual matrix elements.
| scalar_t | precision of input matrix, and of constructed StructuredMatrix. Note that not all types support every all precisions. See StructuredMatrix::Type. |
| rows | Number of rows of matrix to be constructed. |
| cols | Number of columns of matrix to be constructed. |
| Amult | Matrix-(multi)vector multiplication routine. |
| Aelem | Matrix element extraction routine. |
| opts | Options object |
| row_tree | optional clustertree for the rows, see also strumpack::binary_tree_clustering |
| col_tree | optional clustertree for the columns. If the matrix is square, this does not need to be specified. |
| std::invalid_argument | If the operatation is not supported for the type of structured::StructuredMatrix, if the type requires a square matrix and the input is not square, if the structured::StructuredMatrix type requires MPI. |
| std::logic_error | If the operation is not implemented yet |
| std::runtime_error | If the operation requires a third party library which was not enabled when configuring STRUMPACK. |