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

ZeroOne Class Template Reference
[linbox/blackbox]

#include <zero-one.h>

Inheritance diagram for ZeroOne:

BlackboxInterface List of all members.

Detailed Description

template<class Field>
class LinBox::ZeroOne< Field >

Time and space efficient representation of sparse {0,1}-matrices.

A 0-1 matrix is a matrix with all 0's and 1's as entries. We're using a NAG-sparse format. Applies can be performed fast, using only additions. When initalizing this class, you only need to build 2 arrays of equal length: an array of the row indices for the non-zero (1's) entries, and an array of the column indices for the non-zero (1's) entries.

A {0, 1,-1} matrix can be effecively represented as the Dif of two ZeroOne's.


Public Methods

 ZeroOne ()
 ZeroOne (Field F, Index *rowP, Index *colP, Index rows, Index cols, Index NNz, bool rowSort=false, bool colSort=false)
 ~ZeroOne ()
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 () const
size_t coldim () const
RawIterator rawBegin ()
RawIterator rawEnd ()
const RawIterator rawBegin () const
const RawIterator rawEnd () const
RawIndexIterator indexBegin ()
const RawIndexIterator indexBegin () const
RawIndexIterator indexEnd ()
const RawIndexIterator indexEnd () const
std::ostream & write (std::ostream &out=std::cout)
const Fieldfield () const

Protected Types

typedef Field::Element Element
typedef size_t Index
typedef LinBox::uint32 uint32
typedef LinBox::uint64 uint64

Protected Methods

size_t nnz () const
void rowSort () const
void colSort () const
void _qsort (size_t start, size_t endp1, int &mode) const
size_t _part (size_t start, size_t endp1, int &mode) const

Protected Attributes

Field _F
Element _tmp
Index _rows
Index _cols
Index _nnz
Index_rowP
Index_colP
bool _rowSort
bool _colSort
bool dynamic


Member Typedef Documentation

typedef Field::Element Element [protected]
 

typedef size_t Index [protected]
 

typedef LinBox::uint32 uint32 [protected]
 

typedef LinBox::uint64 uint64 [protected]
 


Constructor & Destructor Documentation

ZeroOne  
 

ZeroOne Field    F,
Index   rowP,
Index   colP,
Index    rows,
Index    cols,
Index    NNz,
bool    rowSort = false,
bool    colSort = false
 

~ZeroOne  
 


Member Function Documentation

size_t _part size_t    start,
size_t    endp1,
int &    mode
const [protected]
 

void _qsort size_t    start,
size_t    endp1,
int &    mode
const [protected]
 

OutVector& apply OutVector &    y,
const InVector &    x
const [inline]
 

Uses one of the three private utility functions. It calls the generalized utility function _apply if there is no special ordering, _fyapply if there is C_ordering or _fxapply if there is fortran_ordering

OutVector& applyTranspose OutVector &    y,
const InVector &    x
const [inline]
 

Uses one of the three private utility functions, in the manner described above. Worthy of note is the fact that applyTranspose works by passing the column positions to the _apply functions as if they were rows, and row positions as if they were columns, as if the matrix had been transposed.

size_t coldim void    const [inline]
 

void colSort   [protected]
 

const Field& field   const [inline]
 

const ZeroOne< Field >::RawIndexIterator indexBegin  
 

ZeroOne< Field >::RawIndexIterator indexBegin  
 

const ZeroOne< Field >::RawIndexIterator indexEnd  
 

ZeroOne< Field >::RawIndexIterator indexEnd  
 

size_t nnz   const [inline, protected]
 

const ZeroOne< Field >::RawIterator rawBegin  
 

ZeroOne< Field >::RawIterator rawBegin  
 

const ZeroOne< Field >::RawIterator rawEnd  
 

ZeroOne< Field >::RawIterator rawEnd  
 

size_t rowdim void    const [inline]
 

void rowSort   [protected]
 

std::ostream& write std::ostream &    out = std::cout [inline]
 


Member Data Documentation

Index * _colP [protected]
 

Index _cols [protected]
 

bool _colSort [protected]
 

Field _F [protected]
 

Index _nnz [protected]
 

Index* _rowP [protected]
 

Index _rows [protected]
 

bool _rowSort [protected]
 

Element _tmp [protected]
 

bool dynamic [protected]
 


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