| 
    SparseLibrary
    Version 1.6.0
    
   | 
 
Bi-directional Incremental Compressed Row Storage scheme. More...
#include <BICRS.hpp>


Public Member Functions | |
| virtual | ~BICRS () | 
| Base deconstructor.  More... | |
| BICRS () | |
| Base constructor.  More... | |
| BICRS (std::string file, _t_value zero=0) | |
| Base constructor.  More... | |
| BICRS (_i_value *row, _i_value *col, _t_value *val, ULI m, ULI n, ULI nz, _t_value zero) | |
| Base constructor.  More... | |
| BICRS (std::vector< Triplet< _t_value > > &input, ULI m, ULI n, _t_value zero=0) | |
| Base constructor.  More... | |
| virtual void | load (std::vector< Triplet< _t_value > > &input, ULI m, ULI n, _t_value zero) | 
| This function will rewrite the std::vector< Triplet > structure to one suitable for the other load function.  More... | |
| void | load (_i_value *row, _i_value *col, _t_value *val, ULI m, ULI n, ULI nz, _t_value zero) | 
| virtual void | getFirstIndexPair (ULI &row, ULI &col) | 
| Returns the first nonzero index, per reference.  More... | |
| virtual void | zxa (const _t_value *__restrict__ x_p, _t_value *__restrict__ y_p) | 
| Calculates y=xA, but does not allocate y itself.  More... | |
| virtual void | zax (const _t_value *__restrict__ x_p, _t_value *__restrict__ y_p) | 
| Calculates y=Ax, but does not allocate y itself.  More... | |
| virtual void | zax_fb (_t_value *__restrict__ x_f, _t_value *__restrict__ y_f) | 
| Calculates y=Ax, but does not allocate y itself.  More... | |
| virtual size_t | bytesUsed () | 
| Function to query the amount of storage required by this sparse matrix.  More... | |
  Public Member Functions inherited from SparseMatrix< _t_value, ULI > | |
| SparseMatrix () | |
| Base constructor.  More... | |
| SparseMatrix (const ULInzs, const ULInr, const ULInc, const _t_valuezero) | |
| Base constructor.  More... | |
| virtual | ~SparseMatrix () | 
| Base deconstructor.  More... | |
| void | loadFromFile (const std::string file, const _t_valuezero=0) | 
| Function which loads a matrix from a matrix market file.  More... | |
| virtual unsigned long int | m () | 
| Queries the number of rows this matrix contains.  More... | |
| virtual unsigned long int | n () | 
| Queries the number of columns this matrix contains.  More... | |
| virtual unsigned long int | nzs () | 
| Queries the number of nonzeroes stored in this matrix.  More... | |
| virtual _t_value * | mv (const _t_value *x) | 
| Calculates and returns z=Ax.  More... | |
  Public Member Functions inherited from Matrix< _t_value > | |
| Matrix () | |
| Base constructor.  More... | |
| virtual | ~Matrix () | 
| Base deconstructor.  More... | |
| virtual void | zax (const _t_value *__restrict__ x, _t_value *__restrict__ z, const size_t k, const clockid_t clock_id=0, double *elapsed_time=NULL) | 
| Wrapper function to call the zax kernel multiple times successively, while timing the duration of the operation.  More... | |
| void | ZaX (const _t_value *__restrict__ const *__restrict__ const X, _t_value *__restrict__ const *__restrict__ const Z) | 
| In-place Z=AX function, where A is m x n, Z = m x k, and X is n x k.  More... | |
| virtual void | zxa (const _t_value *__restrict__ x, _t_value *__restrict__ z, const unsigned long int repeat, const clockid_t clock_id=0, double *elapsed_time=NULL) | 
| Wrapper function to call the zxa kernel multiple times successively, while timing the operation duration.  More... | |
| void | ZXa (const _t_value *__restrict__ const *__restrict__ const X, _t_value *__restrict__ const *__restrict__ const Z) | 
| In-place Z=XA function, where A is m x n, Z = k x n, and X is k x m.  More... | |
Protected Attributes | |
| ULI | r_start | 
| Stores the row start position.  More... | |
| ULI | c_start | 
| Stores the column start position.  More... | |
| ULI | r_end | 
| Stores the row end position.  More... | |
| ULI | c_end | 
| Stores the column end position.  More... | |
| ULI | jumps | 
| Stores the number of row jumps.  More... | |
| _i_value * | r_inc | 
| Stores the row jumps; size is at maximum the number of nonzeros.  More... | |
| _i_value * | c_inc | 
| Stores the column jumps; size is exactly the number of nonzeros.  More... | |
| _t_value * | vals | 
| Stores the values of the individual nonzeros.  More... | |
| _i_value | ntt | 
| Caches n times two.  More... | |
  Protected Attributes inherited from SparseMatrix< _t_value, ULI > | |
| ULI | nor | 
| Number of rows.  More... | |
| ULI | noc | 
| Number of columns.  | |
| ULI | nnz | 
| Number of non-zeros.  More... | |
Additional Inherited Members | |
  Public Attributes inherited from SparseMatrix< _t_value, ULI > | |
| _t_value | zero_element | 
| The element considered to be zero.  More... | |
Bi-directional Incremental Compressed Row Storage scheme.
Supports jumping back and forward within columns. Supports jumping back and forward between rows. Main storage direction in column-wise. Storage requirements are 2nz plus the number of row jumps required. Many row jumps are disadvantageous to storage as well as speed.
| _t_value | The type of the nonzeros in the matrix. | 
Warning: this class uses assertions! For optimal performance, define the NDEBUG flag (e.g., pass -DNDEBUG as a compiler flag).
      
  | 
  inlinevirtual | 
Base deconstructor.
References BICRS< _t_value, _i_value >::c_inc, BICRS< _t_value, _i_value >::r_inc, and BICRS< _t_value, _i_value >::vals.
Base constructor.
      
  | 
  inline | 
Base constructor.
Will read in from Matrix Market file.
References SparseMatrix< _t_value, ULI >::loadFromFile().
      
  | 
  inline | 
Base constructor.
Stores triplets in exactly the same order as passed to this constructor.
| row | The row numbers of the individual nonzeros. | 
| col | The column numbers of the individual nonzeros. | 
| val | The values of the nonzeros. | 
| m | Number of matrix rows. | 
| n | Number of matrix columns. | 
| nz | Number of nonzeros. | 
| zero | Which value is to be regarded zero here. | 
References BICRS< _t_value, _i_value >::load().
      
  | 
  inline | 
Base constructor.
References BICRS< _t_value, _i_value >::load().
      
  | 
  inlinevirtual | 
Function to query the amount of storage required by this sparse matrix.
Implements Matrix< _t_value >.
References BICRS< _t_value, _i_value >::jumps, and SparseMatrix< _t_value, ULI >::nnz.
      
  | 
  inlinevirtual | 
Returns the first nonzero index, per reference.
Implements SparseMatrix< _t_value, ULI >.
References BICRS< _t_value, _i_value >::c_start, and BICRS< _t_value, _i_value >::r_start.
      
  | 
  inlinevirtual | 
This function will rewrite the std::vector< Triplet > structure to one suitable for the other load function.
Implements SparseMatrix< _t_value, ULI >.
References BICRS< _t_value, _i_value >::vals.
Referenced by BICRS< _t_value, _i_value >::BICRS().
      
  | 
  inline | 
References BICRS< _t_value, _i_value >::c_end, BICRS< _t_value, _i_value >::c_inc, BICRS< _t_value, _i_value >::c_start, BICRS< _t_value, _i_value >::jumps, SparseMatrix< _t_value, ULI >::m(), SparseMatrix< _t_value, ULI >::n(), SparseMatrix< _t_value, ULI >::nnz, SparseMatrix< _t_value, ULI >::noc, SparseMatrix< _t_value, ULI >::nor, BICRS< _t_value, _i_value >::ntt, BICRS< _t_value, _i_value >::r_end, BICRS< _t_value, _i_value >::r_inc, BICRS< _t_value, _i_value >::r_start, BICRS< _t_value, _i_value >::vals, and SparseMatrix< _t_value, ULI >::zero_element.
      
  | 
  inlinevirtual | 
Calculates y=Ax, but does not allocate y itself.
| x_p | The input vector should be initialised and of correct measurements. | 
| y_p | The output vector should be preallocated and of size m. Furthermore, y[i]=0 for all i, 0<=i<m. | 
Implements SparseMatrix< _t_value, ULI >.
References BICRS< _t_value, _i_value >::c_inc, BICRS< _t_value, _i_value >::c_start, SparseMatrix< _t_value, ULI >::nnz, SparseMatrix< _t_value, ULI >::noc, SparseMatrix< _t_value, ULI >::nor, BICRS< _t_value, _i_value >::ntt, BICRS< _t_value, _i_value >::r_inc, BICRS< _t_value, _i_value >::r_start, and BICRS< _t_value, _i_value >::vals.
      
  | 
  inlinevirtual | 
Calculates y=Ax, but does not allocate y itself.
Does a front-to-back Hilbert traversal.
| x_f | The input vector should be initialised and of correct measurements. | 
| y_f | The output vector should be preallocated and of size m. Furthermore, y[i]=0 for all i, 0<=i<m. | 
References BICRS< _t_value, _i_value >::c_end, BICRS< _t_value, _i_value >::c_inc, BICRS< _t_value, _i_value >::c_start, BICRS< _t_value, _i_value >::jumps, SparseMatrix< _t_value, ULI >::nnz, SparseMatrix< _t_value, ULI >::noc, SparseMatrix< _t_value, ULI >::nor, BICRS< _t_value, _i_value >::ntt, BICRS< _t_value, _i_value >::r_end, BICRS< _t_value, _i_value >::r_inc, BICRS< _t_value, _i_value >::r_start, and BICRS< _t_value, _i_value >::vals.
      
  | 
  inlinevirtual | 
Calculates y=xA, but does not allocate y itself.
| x_p | The input vector should be initialised and of correct measurements. | 
| y_p | The output vector should be preallocated and of size m. Furthermore, y[i]=0 for all i, 0<=i<m. | 
Implements SparseMatrix< _t_value, ULI >.
References BICRS< _t_value, _i_value >::c_inc, BICRS< _t_value, _i_value >::c_start, SparseMatrix< _t_value, ULI >::nnz, SparseMatrix< _t_value, ULI >::noc, SparseMatrix< _t_value, ULI >::nor, BICRS< _t_value, _i_value >::ntt, BICRS< _t_value, _i_value >::r_inc, BICRS< _t_value, _i_value >::r_start, and BICRS< _t_value, _i_value >::vals.
      
  | 
  protected | 
Stores the column end position.
Referenced by BICRS< _t_value, _i_value >::load(), and BICRS< _t_value, _i_value >::zax_fb().
      
  | 
  protected | 
Stores the column jumps; size is exactly the number of nonzeros.
Referenced by BICRS< _t_value, _i_value >::load(), BICRS< _t_value, _i_value >::zax(), BICRS< _t_value, _i_value >::zax_fb(), BICRS< _t_value, _i_value >::zxa(), and BICRS< _t_value, _i_value >::~BICRS().
      
  | 
  protected | 
Stores the column start position.
Referenced by BICRS< _t_value, _i_value >::getFirstIndexPair(), BICRS< _t_value, _i_value >::load(), BICRS< _t_value, _i_value >::zax(), BICRS< _t_value, _i_value >::zax_fb(), and BICRS< _t_value, _i_value >::zxa().
      
  | 
  protected | 
Stores the number of row jumps.
Referenced by BICRS< _t_value, _i_value >::bytesUsed(), BICRS< _t_value, _i_value >::load(), and BICRS< _t_value, _i_value >::zax_fb().
      
  | 
  protected | 
Caches n times two.
Referenced by BICRS< _t_value, _i_value >::load(), BICRS< _t_value, _i_value >::zax(), BICRS< _t_value, _i_value >::zax_fb(), and BICRS< _t_value, _i_value >::zxa().
      
  | 
  protected | 
Stores the row end position.
Referenced by BICRS< _t_value, _i_value >::load(), and BICRS< _t_value, _i_value >::zax_fb().
      
  | 
  protected | 
Stores the row jumps; size is at maximum the number of nonzeros.
Referenced by BICRS< _t_value, _i_value >::load(), BICRS< _t_value, _i_value >::zax(), BICRS< _t_value, _i_value >::zax_fb(), BICRS< _t_value, _i_value >::zxa(), and BICRS< _t_value, _i_value >::~BICRS().
      
  | 
  protected | 
Stores the row start position.
Referenced by BICRS< _t_value, _i_value >::getFirstIndexPair(), BICRS< _t_value, _i_value >::load(), BICRS< _t_value, _i_value >::zax(), BICRS< _t_value, _i_value >::zax_fb(), and BICRS< _t_value, _i_value >::zxa().
      
  | 
  protected | 
Stores the values of the individual nonzeros.
Size is exactly the number of nonzeros.
Referenced by BICRS< _t_value, _i_value >::load(), BICRS< _t_value, _i_value >::zax(), BICRS< _t_value, _i_value >::zax_fb(), BICRS< _t_value, _i_value >::zxa(), and BICRS< _t_value, _i_value >::~BICRS().
 1.8.7