42 #ifndef COO_MATRIX_CLASS_H
43 #define COO_MATRIX_CLASS_H
48 #include "AbstractLinAlgPack_Types.hpp"
49 #include "MiRefCount.h"
51 namespace AbstractLinAlgPack {
172 typedef MemMngPack::RefCount<
173 std::valarray<indice_type> > va_indice_ref_type;
175 typedef std::valarray<value_type> va_value_type;
177 typedef std::valarray<indice_type> va_indice_type;
186 va_indice_ref_type ivect_ref_,
218 return &
const_cast<va_value_type&
>(val_)[0];
221 return &(ivect_ref_.obj())[0];
227 return &
const_cast<va_indice_type&
>(ivect_ref_.const_obj())[0];
230 return &jvect_ref_.obj()[0];
236 return &
const_cast<va_indice_type&
>(jvect_ref_.const_obj())[0];
241 #endif // COO_MATRIX_CLASS_H
AbstractLinAlgPack::size_type size_type
value_type * val()
Return pointer to raw storage array (length #nz()#) for the values of the non-zero elements...
const indice_type * const_jvect() const
void resize(size_type rows, size_type cols, size_type nz)
Resize for a rows# by cols# sparse matrix with #nz# elements.
COOMatrix()
Consturct with no storage allocated.
AbstractLinAlgPack::value_type value_type
COOMatrix & operator=(const COOMatrix &coom)
Assignment operator.
AbstractLinAlgPack::indice_type indice_type
Sparse Coordinate Matrix abstraction storage class.
size_type cols() const
Returns the number of columns in the column access view.
const value_type * const_val() const
const indice_type * const_ivect() const
indice_type * jvect()
Return pointer to raw storage array (length #nz()#) for the column indices of the non-zero elements...
void initialize(std::istream &istrm)
Initialize from an input stream.
size_type rows() const
Return the number of rows in the row access view.