linbox
ZOQuad< _Field > Class Template Reference

A class of striped or block-decomposed zero-one matrices. More...

#include <quad-matrix.h>

Public Types

typedef _Field Field
 
typedef Field::Element Element
 
typedef size_t Index
 
typedef std::vector< IndexIndexVector
 
typedef std::vector< IndexVector::iterator > PointerVector
 

Public Member Functions

 ZOQuad ()
 
 ZOQuad (const SideBySide< Field > &A)
 
 ZOQuad (const OverUnder< Field > &A)
 
 ZOQuad (const ZeroOne< Field > &A)
 
int init (const ZeroOne< Field > &A)
 
std::istream & read (std::istream &is)
 
std::ostream & write (std::ostream &out) const
 
 ~ZOQuad ()
 
template<typename InVector, typename OutVector>
OutVector & apply (OutVector &y, const InVector &x) const
 
template<typename InVector, typename OutVector>
OutVector & applyTranspose (OutVector &y, const InVector &x) const
 
size_t rowdim () const
 
size_t coldim () const
 
const Fieldfield () const
 

Protected Types

enum  BBtype { zo , sbs , ou }
 

Protected Attributes

const void * _BBp
 
BBtype _tag
 
size_t _r
 
size_t _c
 
const Field_field
 

Static Protected Attributes

static const unsigned int smallThreshold = 60000
 

Detailed Description

template<typename _Field>
class LinBox::ZOQuad< _Field >

A class of striped or block-decomposed zero-one matrices.

Right now we implement only side-by-side blocks, which is done to improve cache performance. This class works especially well on quite sparse matrices whose entries are rather randomly positioned. The idea is that the vector to be multiplied by each block fits in cache. It is being more or less randomly accessed, so cache misses are avoided for these random accesses.

The possibility exists to set the stripe(block) width by a configure-time parameter. Also this approach should be used on sparse matrices which are not zero-one.

This ZOQuad class is like a tagged union of several BB types. Then SideBySide does not have it's two part types as template parameters. Instead the parts are always ZOQuads.

Bug
needs read for test-blackbox.h

Member Typedef Documentation

◆ Field

template<typename _Field>
typedef _Field Field

◆ Element

template<typename _Field>
typedef Field::Element Element

◆ Index

template<typename _Field>
typedef size_t Index

◆ IndexVector

template<typename _Field>
typedef std::vector<Index> IndexVector

◆ PointerVector

template<typename _Field>
typedef std::vector<IndexVector::iterator> PointerVector

Member Enumeration Documentation

◆ BBtype

template<typename _Field>
enum BBtype
protected
Enumerator
zo 
sbs 
ou 

Constructor & Destructor Documentation

◆ ZOQuad() [1/4]

template<typename _Field>
ZOQuad ( )
inline

◆ ZOQuad() [2/4]

template<typename _Field>
ZOQuad ( const SideBySide< Field > & A)
inline

◆ ZOQuad() [3/4]

template<typename _Field>
ZOQuad ( const OverUnder< Field > & A)
inline

◆ ZOQuad() [4/4]

template<typename _Field>
ZOQuad ( const ZeroOne< Field > & A)
inline

◆ ~ZOQuad()

template<typename _Field>
~ZOQuad ( )
inline

Member Function Documentation

◆ init()

template<typename _Field>
int init ( const ZeroOne< Field > & A)
inline

◆ read()

template<typename _Field>
std::istream & read ( std::istream & is)
inline

◆ write()

template<typename _Field>
std::ostream & write ( std::ostream & out) const
inline

◆ apply()

template<typename _Field>
template<typename InVector, typename OutVector>
OutVector & apply ( OutVector & y,
const InVector & x ) const
inline

◆ applyTranspose()

template<typename _Field>
template<typename InVector, typename OutVector>
OutVector & applyTranspose ( OutVector & y,
const InVector & x ) const
inline

◆ rowdim()

template<typename _Field>
size_t rowdim ( ) const
inline

◆ coldim()

template<typename _Field>
size_t coldim ( ) const
inline

◆ field()

template<typename _Field>
const Field & field ( ) const
inline

Field Documentation

◆ _BBp

template<typename _Field>
const void* _BBp
protected

◆ _tag

template<typename _Field>
BBtype _tag
protected

◆ _r

template<typename _Field>
size_t _r
protected

◆ _c

template<typename _Field>
size_t _c
protected

◆ smallThreshold

template<typename _Field>
const unsigned int smallThreshold = 60000
staticprotected

◆ _field

template<typename _Field>
const Field* _field
protected

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