LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
|
Storage policy for a sparse matrix (see important note in the detailed documentation). More...
#include <MatrixStorage.hpp>
Public Types | |
typedef boost::unordered_map< ulong, T >::const_iterator | const_iterator |
typedef boost::unordered_map< ulong, T >::iterator | iterator |
Public Member Functions | |
SparseArray (const ulong n) | |
T & | operator[] (const ulong i) |
const T & | operator[] (const ulong i) const |
ulong | actualSize (void) const |
The actual size (# of elements) set. | |
iterator | begin (void) |
iterator | end (void) |
const_iterator | begin (void) const |
const_iterator | end (void) const |
double | density (void) const |
Degree of sparseness... | |
Protected Member Functions | |
void | set (const SparseArray< T > &s) |
void | copyData (const SparseArray< T > &s) |
void | resize (const ulong n) |
void | reset (void) |
Storage policy for a sparse matrix (see important note in the detailed documentation).
This policy implements a sparse matrix via a hash.
There are apparently some issues using the tr1::unordered_map using gcc-4.0.1. If you're using gcc-4.0.1, LOOS will switch to using the GNU provided hash_map instead. Caveat programmer...