LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | List of all members
loos::Math::SparseArray< T > Class Template Reference

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)
 
Toperator[] (const ulong i)
 
const Toperator[] (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)
 

Detailed Description

template<class T>
class loos::Math::SparseArray< T >

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


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