Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

linbox/solutions


Detailed Description

These are problem oriented drivers providing simple interfaces to the linear algebra algorithms. The arguments to each are discussed in detail in the documentation of each function. The optional method parameter is discussed in general terms just below the list.

The algorithms are actively under development, and there is an algorithm choice to be made for each function. The choice is determined by an optional argument to the function which is a method object. The class of the method object determines the approach used and data in the object may help determine algorithm variants at run time. This makes it easy to try out and compare several approaches for a given matrix.

The first method classes to consider are the Blackbox, Elimination, and Hybrid classes. Blackbox and Elimination methods may be used for virtually every solution function.

The Elimination class provides access to algorithms based on dense or sparse elimination and the algorithms take advantage of the numeric BLAS routines when the underlying field or ring is the integers or a prime field of appropriate cardinality.

The Blackbox class provides functions which are space efficient and are particularly effective for very large and very sparse systems. They are also fast and useful for structured systems such as Toeplitz, Hankel, Vandermonde, etc. Currently in LinBox the superfast methods for structured matrices are not implemented.

The Hybrid class chooses Blackbox, Elimination, or a mix of them based on matrix properties checked at runtime. It is the default method. Thus for each problem (e.g. rank) the function call without a method, rank(r, A), is equivalent to a call using the default Hybrid object, rank(r, A, Method::Hybrid()).

Hybrid algorithms are under development and not in final form. The method used under the Hybrid designation may be a sophisticated hybrid algorithm, a very basic one, or simply our guess of the most widely useful of the available algorithms. The basic hybrid method is to use the elimination approach if the matrix is small or in a dense representation, and a blackbox method otherwise. A dense representation is one which inherits from DenseMatrix or BlasMatrix. Small means both row and column dimensions are less than 103. The threshold values can be changed in the hybrid method object. For instance Hybrid h; h.setSmallThreshold(5000); rank(r, A, h).

Additional method classes exist to focus in greater detail on the method. For instance, in the Blackbox situation there are the Wiedemann, BlockWiedemann, Lanczos, and BlockLanczos approaches, to name a few. Actually, For each solution function, the Blackbox class simply chooses from among these the best one as currently implemented. They may be used specifically to override that default. Thus rank(r, A, Blackbox()) uses the Wiedemann method. But rank(r, A, BlockLanczos()) could be called as well.

Also choice of preconditioner may be possible either at runtime by putting an indicator in the method object or at compile time by using a more special class of method such as BlockWiedemannButterfly.

Other method classes focus on algorithms attuned to specific matrix properties. For instance, there may be HybridSymmetric, EliminationSymmetric, and BlackboxSymmetric. Using these method choices, several functions are about twice as fast as those where the symmetry is unspecified. To get the same effect as a runtime choice, objects of the basic method classes may contain an indicator of symmetry, Method::Elimination e; e.setSymmetric(); rank(r, A, e).

Not every implemented algorithm is available through solution functions and their methods, but this is a good starting point. See linbox/algorithms for the other possibilities.

If the status parameter is given, it is used for output of side information. For instance the solve function will set it's isConsistent() property indicating whether or not the system was found to be consistent. Also an upper bound on the probability of error is given by errorBound(). In the future, it may even provide consistency certificates and cofactors for normal forms.

Functions

template<class Blackbox, class MyMethod> Blackbox::Field::Elementdet (typename Blackbox::Field::Element &d, const Blackbox &A, const MyMethod &M)
template<class Field> Field::Elementdetin (typename Field::Element &d, BlasBlackbox< Field > &A)
 A will be modified.

template<class Blackbox> unsigned long & rank (unsigned long &r, const Blackbox &A)
template<class Blackbox, class Method> unsigned long & rank (unsigned long &r, const Blackbox &A, const Method &M)
template<class Blackbox, class MyMethod> BOUTPUT & SOLUTION (BOUTPUT &r, const Blackbox &A, const MyMethod &M)


Function Documentation

Blackbox::Field::Element& det typename Blackbox::Field::Element   d,
const Blackbox   A,
const MyMethod &    M
 

Compute the determinant of A

The determinant of a linear operator A, represented as a black box, is computed over the ring or field of A.

Parameters:
d  Field element into which to store the result
A  Black box of which to compute the determinant
M  may be a Method::BlasElimination (default) or a Method::Wiedemann.

Field::Element& detin typename Field::Element   d,
BlasBlackbox< Field > &    A
 

A will be modified.

Todo:
This should work for a DenseMatrix.
Returns:
d determinant of A.
Parameters:
A  this BlasBlackbox matrix will be modified in place in the process.

unsigned long& rank unsigned long &    r,
const Blackbox   A,
const Method   M
 

Compute the rank of a linear transform A over a field.

The default method is Wiedemann(), using diagonal preconditioning and the minpoly. For small or dense matrices BlasElimination will be faster.

Returns:
r rank of A.
Parameters:
A  linear transform, member of any blackbox class.

unsigned long& rank unsigned long &    r,
const Blackbox   A
 

Compute the rank of a linear transform A over a field.

The default method is Wiedemann(), using diagonal preconditioning and the minpoly. For small or dense matrices BlasElimination will be faster.

Returns:
r rank of A.
Parameters:
A  linear transform, member of any blackbox class.

BOUTPUT& SOLUTION BOUTPUT &    r,
const Blackbox   A,
const MyMethod &    M
 

Compute the SOLUTION of A

The SOLUTION of a linear operator A, represented as a black box, is computed over the ring or field of A.

Parameters:
r  OUTPUT instance into which to store the result r
A  Black box of which to compute the SOLUTION
M  may be a Method::Hybrid (default), Method::Blackbox, Method::Elimination, or of other method type.


Generated on Mon Jun 20 09:16:51 2005 for linbox by doxygen1.2.18