linbox
MGBlockLanczosSolver< Field, Matrix > Class Template Reference

Block Lanczos iteration. More...

#include <mg-block-lanczos.h>

Public Types

typedef Field::Element Element
 

Public Member Functions

 MGBlockLanczosSolver (const Field &F, const Method::BlockLanczos &traits)
 Constructor.
 
 MGBlockLanczosSolver (const Field &F, const Method::BlockLanczos &traits, typename Field::RandIter r)
 Constructor with a random iterator.
 
template<class Blackbox, class Vector>
bool solve (const Blackbox &A, Vector &x, const Vector &b)
 Solve the linear system Ax = b.
 
template<class Blackbox, class Matrix1>
unsigned int sampleNullspace (const Blackbox &A, Matrix1 &x)
 Sample uniformly from the (right) nullspace of A.
 
bool runSelfCheck () const
 

Protected Member Functions

template<class Matrix1>
bool isAlmostIdentity (const Matrix1 &M) const
 
bool test_compute_Winv_S_mul (int n) const
 
bool test_compute_Winv_S_mulin (int n) const
 
bool test_mul_SST (int n) const
 
bool test_mul_ABSST (int n) const
 
bool test_mulTranspose (int m, int n) const
 
bool test_mulTranspose_ABSST (int n) const
 
bool test_mulin_ABSST (int n) const
 
bool test_addin_ABSST (int n) const
 

Detailed Description

template<class Field, class Matrix = BlasMatrix<Field,typename RawVector<typename Field::Element >::Dense>>
class LinBox::MGBlockLanczosSolver< Field, Matrix >

Block Lanczos iteration.

This is a blocked version of the iteration given in LanczosSolver. The essential difference is that, rather than applying the black box $A$ to a single vector \(v\) during each iteration, the block box \(A\) is applied to an \(n\times N\) matrix \(V\) or, equivalently, to $N$ vectors \(v_1, \ldots, v_N\) Scalars in the original iteration become \(N\times N\) matrices in the blocked version. The resulting iteration is a natural extension of the basic theory of the original Lanczos iteration, c.f. (Montgomery 1995). This has the advantage of more flexible parallelization, and does not break down as often when used over small fields.

Currently, only dense vectors are supported for this iteration, and it is unlikely any other vector archetypes will be supported in the future.

Member Typedef Documentation

◆ Element

template<class Field, class Matrix = BlasMatrix<Field,typename RawVector<typename Field::Element >::Dense>>
typedef Field::Element Element

Constructor & Destructor Documentation

◆ MGBlockLanczosSolver() [1/2]

template<class Field, class Matrix = BlasMatrix<Field,typename RawVector<typename Field::Element >::Dense>>
MGBlockLanczosSolver ( const Field & F,
const Method::BlockLanczos & traits )
inline

Constructor.

Parameters
FField over which to operate
traitsSolverTraits structure describing user options for the solver

◆ MGBlockLanczosSolver() [2/2]

template<class Field, class Matrix = BlasMatrix<Field,typename RawVector<typename Field::Element >::Dense>>
MGBlockLanczosSolver ( const Field & F,
const Method::BlockLanczos & traits,
typename Field::RandIter r )
inline

Constructor with a random iterator.

Parameters
FField over which to operate
traitsSolverTraits structure describing user options for the solver
rRandom iterator to use for randomization

Member Function Documentation

◆ solve()

template<class Field, class Matrix>
template<class Blackbox, class Vector>
bool solve ( const Blackbox & A,
Vector & x,
const Vector & b )
inline

Solve the linear system Ax = b.

If the system is nonsingular, this method computes the unique solution to the system Ax = b. If the system is singular, it computes a random solution.

If the matrix A is nonsymmetric, this method preconditions the matrix A with the preconditioner D_1 A^T D_2 A D_1, where D_1 and D_2 are random nonsingular diagonal matrices. If the matrix A is symmetric, this method preconditions the system with A D, where D is a random diagonal matrix.

Parameters
ABlack box for the matrix A
xVector in which to store solution
bRight-hand side of system
Returns
true on success and false on failure

◆ sampleNullspace()

template<class Field, class Matrix>
template<class Blackbox, class Matrix1>
unsigned int sampleNullspace ( const Blackbox & A,
Matrix1 & x )
inline

Sample uniformly from the (right) nullspace of A.

Parameters
ABlack box for the matrix A
xMatrix into whose columns to store nullspace elements
Returns
Number of nullspace vectors found

◆ isAlmostIdentity()

template<class Field, class Matrix>
template<class Matrix1>
bool isAlmostIdentity ( const Matrix1 & M) const
inlineprotected

◆ test_compute_Winv_S_mul()

template<class Field, class Matrix>
bool test_compute_Winv_S_mul ( int n) const
inlineprotected

◆ test_compute_Winv_S_mulin()

template<class Field, class Matrix>
bool test_compute_Winv_S_mulin ( int n) const
inlineprotected

◆ test_mul_SST()

template<class Field, class Matrix>
bool test_mul_SST ( int n) const
inlineprotected

◆ test_mul_ABSST()

template<class Field, class Matrix>
bool test_mul_ABSST ( int n) const
inlineprotected

◆ test_mulTranspose()

template<class Field, class Matrix>
bool test_mulTranspose ( int m,
int n ) const
inlineprotected

◆ test_mulTranspose_ABSST()

template<class Field, class Matrix>
bool test_mulTranspose_ABSST ( int n) const
inlineprotected

◆ test_mulin_ABSST()

template<class Field, class Matrix>
bool test_mulin_ABSST ( int n) const
inlineprotected

◆ test_addin_ABSST()

template<class Field, class Matrix>
bool test_addin_ABSST ( int n) const
inlineprotected

◆ runSelfCheck()

template<class Field, class Matrix>
bool runSelfCheck ( ) const
inline

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