linbox
JIT_Matrix< _Field, JIT_EntryGenerator > Class Template Reference

example of a blackbox that is space efficient, though not time efficient. More...

#include <jit-matrix.h>

Public Types

typedef _Field Field
 
typedef Field::Element Element
 
typedef MatrixCategories::BlackboxTag MatrixCategory
 

Public Member Functions

 JIT_Matrix (const _Field &F, const size_t m, const size_t n, const JIT_EntryGenerator &JIT)
 m by n matrix is constructed.
 
template<class OutVector, class InVector>
OutVector & apply (OutVector &y, const InVector &x) const
 
template<class OutVector, class InVector>
OutVector & applyTranspose (OutVector &y, const InVector &x) const
 
size_t rowdim (void) const
 
size_t coldim (void) const
 
const Fieldfield () const
 

Protected Attributes

const Field_field
 
size_t _m
 
size_t _n
 
JIT_EntryGenerator _gen
 

Detailed Description

template<class _Field, class JIT_EntryGenerator>
class LinBox::JIT_Matrix< _Field, JIT_EntryGenerator >

example of a blackbox that is space efficient, though not time efficient.

just in time matrix.

the matrix itself is not stored in memory. rather, an entrygenerator function is called to provide the entries. the entry generator is called once for each entry during an apply or applytranspose operation.

An toy example of its use is the Hilbert matrix, whose \(i,j\) entry is generated by the formula \(1/(i+j+2)\) in zero based indexing. The motivating examples were matrices also defined by formula, the Paley type matrices.

See also
{MSW07}% ISSAC 07 paper In that context block structured turned out to be essential and the JIT_Matrix class is primarily intended for block structured matrices, the JIT entries being matrix blocks.
Parameters
_Fieldonly need provide the init() and axpyin() functions.
JIT_EntryGeneratorgen() is a function object defining the matrix by providing gen(e, i, j) which sets field element e to the i,j entry of the matrix. Indexing is zero based.

Member Typedef Documentation

◆ Field

template<class _Field, class JIT_EntryGenerator>
typedef _Field Field

◆ Element

template<class _Field, class JIT_EntryGenerator>
typedef Field::Element Element

◆ MatrixCategory

template<class _Field, class JIT_EntryGenerator>
typedef MatrixCategories::BlackboxTag MatrixCategory

Constructor & Destructor Documentation

◆ JIT_Matrix()

template<class _Field, class JIT_EntryGenerator>
JIT_Matrix ( const _Field & F,
const size_t m,
const size_t n,
const JIT_EntryGenerator & JIT )
inline

m by n matrix is constructed.

JIT(Field::Element& e, size_t i, size_t j) is a function object which assigns the i,j entry to e (and returns a reference to e) and must be valid for 0 <= i < m, 0 <= j < n.

Member Function Documentation

◆ apply()

template<class Field, class JIT_EntryGenerator>
template<class OutVector, class InVector>
OutVector & apply ( OutVector & y,
const InVector & x ) const
inline

◆ applyTranspose()

template<class Field, class JIT_EntryGenerator>
template<class OutVector, class InVector>
OutVector & applyTranspose ( OutVector & y,
const InVector & x ) const
inline

◆ rowdim()

template<class _Field, class JIT_EntryGenerator>
size_t rowdim ( void ) const
inline

◆ coldim()

template<class _Field, class JIT_EntryGenerator>
size_t coldim ( void ) const
inline

◆ field()

template<class _Field, class JIT_EntryGenerator>
const Field & field ( ) const
inline

Field Documentation

◆ _field

template<class _Field, class JIT_EntryGenerator>
const Field* _field
protected

◆ _m

template<class _Field, class JIT_EntryGenerator>
size_t _m
protected

◆ _n

template<class _Field, class JIT_EntryGenerator>
size_t _n
protected

◆ _gen

template<class _Field, class JIT_EntryGenerator>
JIT_EntryGenerator _gen
protected

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