linbox
Public Member Functions
Diagonal< _Field, VectorCategories::DenseVectorTag > Class Template Referenceabstract

Specialization of Diagonal for application to dense vectors. More...

#include <diagonal.h>

Inherits FIBB< Ring >.

Public Member Functions

 Diagonal (const Field &F)
 cstor ready for a read.
 
 Diagonal (const BlasVector< Field > &v)
 cstor from vector of elements.
 
 Diagonal (const Field &F, const size_t n, bool nonsing=true)
 random Diagonal matrix. More...
 
void random ()
 creates a random Diagonal matrix
 
void randomNonsingular ()
 creates a random non singular Diagonal matrix
 
const Field & field () const
 the field of the entries
 
Element & getEntry (Element &x, size_t i, size_t j) const
 Get an entry and store it in the given value. More...
 
void setEntry (size_t i, size_t j, const Element &x)
 (i,i) entry is set to x. More...
 
virtual Matrix & solveRight (Matrix &Y, const Matrix &X) const =0
 Y: AY = X, for this A. More...
 
virtual Matrix & solveLeft (Matrix &Y, const Matrix &X) const =0
 Y: YA = X, for this A.
 
virtual Matrix & nullspaceRandomRight (Matrix &N) const =0
 N: AN = 0, each col random.
 
virtual Matrix & nullspaceRandomLeft (Matrix &N) const =0
 N: NA = 0, each row random.
 
virtual ResizableMatrix & nullspaceBasisRight (ResizableMatrix &B) const =0
 B: columns are a right nullspace basis for this A. More...
 
virtual ResizableMatrix & nullspaceBasisLeft (ResizableMatrix &B) const =0
 BA= 0 and xA = 0 => exists y: x = yB and B full rank.
 

Detailed Description

template<class _Field>
class LinBox::Diagonal< _Field, VectorCategories::DenseVectorTag >

Specialization of Diagonal for application to dense vectors.

Constructor & Destructor Documentation

Diagonal ( const Field &  F,
const size_t  n,
bool  nonsing = true 
)
inline

random Diagonal matrix.

Parameters
Fthe field
nsize
nonsingnon-singular matrix ? (no zero on diagonal ?)

Member Function Documentation

Element& getEntry ( Element &  x,
size_t  i,
size_t  j 
) const
inline

Get an entry and store it in the given value.

This form is more in the LinBox style and is provided for interface compatibility with other parts of the library

Parameters
xElement in which to store result
iRow index
jColumn index
Returns
Reference to x
void setEntry ( size_t  i,
size_t  j,
const Element &  x 
)
inline

(i,i) entry is set to x.

could throw error if j != i, but now j is ignored.

virtual Matrix& solveRight ( Matrix &  Y,
const Matrix &  X 
) const
pure virtualinherited

Y: AY = X, for this A.

Solve nonsingular or consistent singular system. If it is consistent singular, an arbitrary solution is provided. X and Y must have identical shape.

Note that Y+Z is a random sample of the solution space after {solveRight(Y, X); nullspaceRandomRight(Z);}.

Behaviour is unspecified for inconsistent systems (see solveMP).

virtual ResizableMatrix& nullspaceBasisRight ( ResizableMatrix &  B) const
pure virtualinherited

B: columns are a right nullspace basis for this A.

B is resized and filled so that: (1) AB = 0, (2) Ax = 0 => exists y: x = By, and (3) B has full rank.


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