TNT::Sparse_Matrix< T > Class Template Reference

#include <tnt_sparse_matrix.h>

List of all members.

Public Member Functions

 Sparse_Matrix (Subscript M, Subscript N)
 Sparse_Matrix (Subscript M, Subscript N, Subscript nz, const T *val, const Subscript *r, const Subscript *c)
int is_closed ()
void insert (const T &val, Subscript i, Subscript j)
void insert (Subscript nz, const T *val, const Subscript *i, const Subscript *j)
void insert_base_one (const T &val, Subscript i, Subscript j)
void insert_base_one (Subscript nz, const T *val, const Subscript *i, const Subscript *j)
void close ()
int num_rows () const
int num_cols () const
int num_columns () const
int num_nonzeros () const
Vector< T > diag () const
Vector< T > mult (const Vector< T > &x) const
double norm () const
std::ostream & print (std::ostream &s) const
std::ostream & print_base_one (std::ostream &s) const


Detailed Description

template<class T>
class TNT::Sparse_Matrix< T >

Read-only view of a sparse matrix in compressed-row storage format. Neither array elements (nonzeros) nor sparsity structure can be modified. If modifications are required, create a new view.

Index values begin at 0.

Storage requirements: An (m x n) matrix with nz nonzeros requires no more than ((T+2I)*nz) bytes, where T is the size of data elements and I is the size of integer subscripts.


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

Generated on Fri Sep 17 08:35:22 2010 by  doxygen 1.5.9