CLA3P v0.3.1
Compact Linear Algebra Parallel Portable Package
Loading...
Searching...
No Matches
cla3p::LapackBase< T_Matrix > Class Template Reference

The abstract linear solver base for dense matrices. More...

Inheritance diagram for cla3p::LapackBase< T_Matrix >:

Public Member Functions

void reserve (int_t n)
 Allocates internal buffers.
void clear ()
 Clears the solver internal data.
void decompose (const T_Matrix &mat)
 Performs matrix decomposition.
void idecompose (T_Matrix &mat)
 Performs in-place matrix decomposition.
void solve (T_Matrix &rhs) const
 Performs in-place matrix solution.
void solve (T_Vector &rhs) const
 Performs in-place vector solution.

Detailed Description

template<typename T_Matrix>
class cla3p::LapackBase< T_Matrix >

The abstract linear solver base for dense matrices.

Provides a base class for linear solvers that use LAPACK decomposition methods.

Template Parameters
T_MatrixThe matrix type (e.g., dns::XxMatrix<T_Scalar>).

Member Function Documentation

◆ reserve()

template<typename T_Matrix>
void cla3p::LapackBase< T_Matrix >::reserve ( int_t n)

Allocates internal buffers.

Preallocates internal storage to avoid dynamic allocation during decomposition.

Parameters
[in]nThe maximum dimension for the buffers.

◆ clear()

template<typename T_Matrix>
void cla3p::LapackBase< T_Matrix >::clear ( )

Clears the solver internal data.

Clears the solver internal data and resets all settings.

◆ decompose()

template<typename T_Matrix>
void cla3p::LapackBase< T_Matrix >::decompose ( const T_Matrix & mat)

Performs matrix decomposition.

Computes the matrix factorization without modifying the input matrix.

Parameters
[in]matThe matrix to be decomposed.
Examples
ex05a_solving_linear_systems_lu.cpp, ex05b_solving_linear_systems_ldlt.cpp, and ex05c_solving_linear_systems_auto.cpp.

◆ idecompose()

template<typename T_Matrix>
void cla3p::LapackBase< T_Matrix >::idecompose ( T_Matrix & mat)

Performs in-place matrix decomposition.

Computes the matrix factorization by overwriting the input matrix.

Parameters
[in,out]matThe matrix to be decomposed, destroyed after the operation.

◆ solve() [1/2]

template<typename T_Matrix>
void cla3p::LapackBase< T_Matrix >::solve ( T_Matrix & rhs) const

Performs in-place matrix solution.

Solves the linear system using the precomputed factorization.

Parameters
[in,out]rhsOn input, the right hand side matrix, on exit is overwritten with the solution.
Examples
ex05a_solving_linear_systems_lu.cpp, ex05b_solving_linear_systems_ldlt.cpp, and ex05c_solving_linear_systems_auto.cpp.

◆ solve() [2/2]

template<typename T_Matrix>
void cla3p::LapackBase< T_Matrix >::solve ( T_Vector & rhs) const

Performs in-place vector solution.

Solves the linear system using the precomputed factorization.

Parameters
[in,out]rhsOn input, the right hand side vector, on exit is overwritten with the solution.