linbox

Time and space efficient representation of sparse {0,1}matrices. More...
#include <zo.h>
Data Structures  
class  IndexIterator 
IndexIterator. More...  
class  Iterator 
Raw iterator. More...  
Public Member Functions  
template<class OutVector , class InVector >  
OutVector &  apply (OutVector &y, const InVector &x) const 
apply. More...  
template<class OutVector , class InVector >  
OutVector &  applyTranspose (OutVector &y, const InVector &x) const 
applyTranspose. More...  
std::istream &  read (std::istream &is) 
Read the matrix from a stream in the JGD's SMS format. More...  
ZeroOne (Field &F, Index *rowP, Index *colP, Index rows, Index cols, Index NNz)  
The real constructor /todo give docs here assuming entries are sorted in lexicographic order by (row,col) pair.  
template<class OutVector , class InVector >  
OutVector &  apply (OutVector &y, const InVector &x) const 
Uses one of the three private utility functions. More...  
template<class OutVector , class InVector >  
OutVector &  applyTranspose (OutVector &y, const InVector &x) const 
Uses one of the three private utility functions, in the manner described above. More...  
std::istream &  read (std::istream &is) 
Read the matrix from a stream in the JGD's SMS format. More...  
Protected Member Functions  
void  rowSort () const 
Tells the number of nonzero entries. More...  
Time and space efficient representation of sparse {0,1}matrices.
A 01 matrix is a matrix with all 0's and 1's as entries. We're using a NAGsparse 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 nonzero (1's) entries, and an array of the column indices for the nonzero (1's) entries.
A {0, 1,1} matrix can be effecively represented as the Dif of two ZeroOne's.
A 01 matrix is a matrix with all 0's and 1's as entries. We're using a compcol or comprow format. That is we have an array of col indices and an array of pointers indicating where the col indices for each row begins within the col index array. (or vice versa if we have sorted by columns.
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 nonzero (1's) entries, and an array of the column indices for the nonzero (1's) entries.
A {0, 1,1} matrix can be effecively represented as the Dif of two ZeroOne's.

inline 
apply.
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

inline 
applyTranspose.
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.

inline 
Read the matrix from a stream in the JGD's SMS format.
is  Input stream from which to read the matrix 

protected 
Tells the number of nonzero entries.
Non blackbox function.
OutVector& apply  (  OutVector &  y, 
const InVector &  x  
)  const 
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 
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.

inline 
Read the matrix from a stream in the JGD's SMS format.
is  Input stream from which to read the matrix 