Jive reference manual
List of all members | Classes | Public Types | Public Member Functions | Static Public Attributes
jem::util::SparseArray< T, N, Alloc > Class Template Reference

#include <jem/util/SparseArray.h>

Classes

class  Element
 

Public Types

typedef Tuple< idx_t, N > Index
 
typedef Tuple< idx_t, N > Shape
 
typedef HashTableNode< ElementNode
 
typedef Alloc Allocator
 
typedef HashTableIterator< ElementIterator
 
typedef HashTableIterator< Element, const Element &, const Element * > ConstIterator
 

Public Member Functions

 SparseArray ()
 
 SparseArray (const T &zero)
 
 SparseArray (const SparseArray &rhs)
 
 ~SparseArray ()
 
Iterator begin ()
 
ConstIterator begin () const
 
Iterator end ()
 
ConstIterator end () const
 
SparseArrayoperator= (const SparseArray &rhs)
 
SparseArrayoperator= (T rhs)
 
void swap (SparseArray &rhs)
 
T & operator[] (const Index &i)
 
operator[] (const Index &i) const
 
T & operator[] (idx_t i)
 
operator[] (idx_t i) const
 
T & operator() (idx_t i, idx_t j)
 
operator() (idx_t i, idx_t j) const
 
T & operator() (idx_t i, idx_t j, idx_t k)
 
operator() (idx_t i, idx_t j, idx_t k) const
 
T & operator() (idx_t i, idx_t j, idx_t k, idx_t l)
 
operator() (idx_t i, idx_t j, idx_t k, idx_t l) const
 
T & operator() (idx_t i, idx_t j, idx_t k, idx_t l, idx_t p)
 
operator() (idx_t i, idx_t j, idx_t k, idx_t l, idx_t p) const
 
T & operator() (idx_t i, idx_t j, idx_t k, idx_t l, idx_t p, idx_t q)
 
operator() (idx_t i, idx_t j, idx_t k, idx_t l, idx_t p, idx_t q) const
 
T * find (const Index &i)
 
const T * find (const Index &i) const
 
T * find (idx_t i)
 
const T * find (idx_t i) const
 
T * find (idx_t i, idx_t j)
 
const T * find (idx_t i, idx_t j) const
 
T * find (idx_t i, idx_t j, idx_t k)
 
const T * find (idx_t i, idx_t j, idx_t k) const
 
T * find (idx_t i, idx_t j, idx_t k, idx_t l)
 
const T * find (idx_t i, idx_t j, idx_t k, idx_t l) const
 
T * find (idx_t i, idx_t j, idx_t k, idx_t l, idx_t p)
 
const T * find (idx_t i, idx_t j, idx_t k, idx_t l, idx_t p) const
 
T * find (idx_t i, idx_t j, idx_t k, idx_t l, idx_t p, idx_t q)
 
const T * find (idx_t i, idx_t j, idx_t k, idx_t l, idx_t p, idx_t q) const
 
bool erase (const Index &i)
 
bool erase (idx_t i)
 
bool erase (idx_t i, idx_t j)
 
bool erase (idx_t i, idx_t j, idx_t k)
 
bool erase (idx_t i, idx_t j, idx_t k, idx_t l)
 
bool erase (idx_t i, idx_t j, idx_t k, idx_t l, idx_t p)
 
bool erase (idx_t i, idx_t j, idx_t k, idx_t l, idx_t p, idx_t q)
 
void clear ()
 
void reserve (idx_t cap)
 
void trimToSize ()
 
idx_t capacity () const
 
void reshape ()
 
void reshape (const Shape &sh)
 
void reshape (idx_t m)
 
void reshape (idx_t m, idx_t n)
 
void reshape (idx_t m, idx_t n, idx_t p)
 
void reshape (idx_t m, idx_t n, idx_t p, idx_t q)
 
void reshape (idx_t m, idx_t n, idx_t p, idx_t q, idx_t r)
 
void reshape (idx_t m, idx_t n, idx_t p, idx_t q, idx_t r, idx_t s)
 
const Shapeshape () const
 
idx_t size () const
 
idx_t size (int idim) const
 
const T & getZero () const
 
void setZero (const T &zero)
 
idx_t nonZeroCount () const
 
template<class Output >
void printStats (Output &out) const
 

Static Public Attributes

static const idx_t RANK = N
 

Member Typedef Documentation

template<class T , int N = 1, class Alloc = FastAllocator>
typedef Tuple<idx_t,N> jem::util::SparseArray< T, N, Alloc >::Index
template<class T , int N = 1, class Alloc = FastAllocator>
typedef Tuple<idx_t,N> jem::util::SparseArray< T, N, Alloc >::Shape
template<class T , int N = 1, class Alloc = FastAllocator>
typedef HashTableNode<Element> jem::util::SparseArray< T, N, Alloc >::Node
template<class T , int N = 1, class Alloc = FastAllocator>
typedef Alloc jem::util::SparseArray< T, N, Alloc >::Allocator
template<class T , int N = 1, class Alloc = FastAllocator>
typedef HashTableIterator< Element > jem::util::SparseArray< T, N, Alloc >::Iterator
template<class T , int N = 1, class Alloc = FastAllocator>
typedef HashTableIterator< Element, const Element&, const Element* > jem::util::SparseArray< T, N, Alloc >::ConstIterator

Constructor & Destructor Documentation

template<class T , int N = 1, class Alloc = FastAllocator>
jem::util::SparseArray< T, N, Alloc >::SparseArray ( )
template<class T , int N = 1, class Alloc = FastAllocator>
jem::util::SparseArray< T, N, Alloc >::SparseArray ( const T &  zero)
template<class T , int N = 1, class Alloc = FastAllocator>
jem::util::SparseArray< T, N, Alloc >::SparseArray ( const SparseArray< T, N, Alloc > &  rhs)
template<class T , int N = 1, class Alloc = FastAllocator>
jem::util::SparseArray< T, N, Alloc >::~SparseArray ( )

Member Function Documentation

template<class T , int N = 1, class Alloc = FastAllocator>
Iterator jem::util::SparseArray< T, N, Alloc >::begin ( )
template<class T , int N = 1, class Alloc = FastAllocator>
ConstIterator jem::util::SparseArray< T, N, Alloc >::begin ( ) const
template<class T , int N = 1, class Alloc = FastAllocator>
Iterator jem::util::SparseArray< T, N, Alloc >::end ( )
template<class T , int N = 1, class Alloc = FastAllocator>
ConstIterator jem::util::SparseArray< T, N, Alloc >::end ( ) const
template<class T , int N = 1, class Alloc = FastAllocator>
SparseArray& jem::util::SparseArray< T, N, Alloc >::operator= ( const SparseArray< T, N, Alloc > &  rhs)
template<class T , int N = 1, class Alloc = FastAllocator>
SparseArray& jem::util::SparseArray< T, N, Alloc >::operator= ( rhs)
template<class T , int N = 1, class Alloc = FastAllocator>
void jem::util::SparseArray< T, N, Alloc >::swap ( SparseArray< T, N, Alloc > &  rhs)
template<class T , int N = 1, class Alloc = FastAllocator>
T& jem::util::SparseArray< T, N, Alloc >::operator[] ( const Index i)
template<class T , int N = 1, class Alloc = FastAllocator>
T jem::util::SparseArray< T, N, Alloc >::operator[] ( const Index i) const
template<class T , int N = 1, class Alloc = FastAllocator>
T& jem::util::SparseArray< T, N, Alloc >::operator[] ( idx_t  i)
template<class T , int N = 1, class Alloc = FastAllocator>
T jem::util::SparseArray< T, N, Alloc >::operator[] ( idx_t  i) const
template<class T , int N = 1, class Alloc = FastAllocator>
T& jem::util::SparseArray< T, N, Alloc >::operator() ( idx_t  i,
idx_t  j 
)
template<class T , int N = 1, class Alloc = FastAllocator>
T jem::util::SparseArray< T, N, Alloc >::operator() ( idx_t  i,
idx_t  j 
) const
template<class T , int N = 1, class Alloc = FastAllocator>
T& jem::util::SparseArray< T, N, Alloc >::operator() ( idx_t  i,
idx_t  j,
idx_t  k 
)
template<class T , int N = 1, class Alloc = FastAllocator>
T jem::util::SparseArray< T, N, Alloc >::operator() ( idx_t  i,
idx_t  j,
idx_t  k 
) const
template<class T , int N = 1, class Alloc = FastAllocator>
T& jem::util::SparseArray< T, N, Alloc >::operator() ( idx_t  i,
idx_t  j,
idx_t  k,
idx_t  l 
)
template<class T , int N = 1, class Alloc = FastAllocator>
T jem::util::SparseArray< T, N, Alloc >::operator() ( idx_t  i,
idx_t  j,
idx_t  k,
idx_t  l 
) const
template<class T , int N = 1, class Alloc = FastAllocator>
T& jem::util::SparseArray< T, N, Alloc >::operator() ( idx_t  i,
idx_t  j,
idx_t  k,
idx_t  l,
idx_t  p 
)
template<class T , int N = 1, class Alloc = FastAllocator>
T jem::util::SparseArray< T, N, Alloc >::operator() ( idx_t  i,
idx_t  j,
idx_t  k,
idx_t  l,
idx_t  p 
) const
template<class T , int N = 1, class Alloc = FastAllocator>
T& jem::util::SparseArray< T, N, Alloc >::operator() ( idx_t  i,
idx_t  j,
idx_t  k,
idx_t  l,
idx_t  p,
idx_t  q 
)
template<class T , int N = 1, class Alloc = FastAllocator>
T jem::util::SparseArray< T, N, Alloc >::operator() ( idx_t  i,
idx_t  j,
idx_t  k,
idx_t  l,
idx_t  p,
idx_t  q 
) const
template<class T , int N = 1, class Alloc = FastAllocator>
T* jem::util::SparseArray< T, N, Alloc >::find ( const Index i)
template<class T , int N = 1, class Alloc = FastAllocator>
const T* jem::util::SparseArray< T, N, Alloc >::find ( const Index i) const
template<class T , int N = 1, class Alloc = FastAllocator>
T* jem::util::SparseArray< T, N, Alloc >::find ( idx_t  i)
template<class T , int N = 1, class Alloc = FastAllocator>
const T* jem::util::SparseArray< T, N, Alloc >::find ( idx_t  i) const
template<class T , int N = 1, class Alloc = FastAllocator>
T* jem::util::SparseArray< T, N, Alloc >::find ( idx_t  i,
idx_t  j 
)
template<class T , int N = 1, class Alloc = FastAllocator>
const T* jem::util::SparseArray< T, N, Alloc >::find ( idx_t  i,
idx_t  j 
) const
template<class T , int N = 1, class Alloc = FastAllocator>
T* jem::util::SparseArray< T, N, Alloc >::find ( idx_t  i,
idx_t  j,
idx_t  k 
)
template<class T , int N = 1, class Alloc = FastAllocator>
const T* jem::util::SparseArray< T, N, Alloc >::find ( idx_t  i,
idx_t  j,
idx_t  k 
) const
template<class T , int N = 1, class Alloc = FastAllocator>
T* jem::util::SparseArray< T, N, Alloc >::find ( idx_t  i,
idx_t  j,
idx_t  k,
idx_t  l 
)
template<class T , int N = 1, class Alloc = FastAllocator>
const T* jem::util::SparseArray< T, N, Alloc >::find ( idx_t  i,
idx_t  j,
idx_t  k,
idx_t  l 
) const
template<class T , int N = 1, class Alloc = FastAllocator>
T* jem::util::SparseArray< T, N, Alloc >::find ( idx_t  i,
idx_t  j,
idx_t  k,
idx_t  l,
idx_t  p 
)
template<class T , int N = 1, class Alloc = FastAllocator>
const T* jem::util::SparseArray< T, N, Alloc >::find ( idx_t  i,
idx_t  j,
idx_t  k,
idx_t  l,
idx_t  p 
) const
template<class T , int N = 1, class Alloc = FastAllocator>
T* jem::util::SparseArray< T, N, Alloc >::find ( idx_t  i,
idx_t  j,
idx_t  k,
idx_t  l,
idx_t  p,
idx_t  q 
)
template<class T , int N = 1, class Alloc = FastAllocator>
const T* jem::util::SparseArray< T, N, Alloc >::find ( idx_t  i,
idx_t  j,
idx_t  k,
idx_t  l,
idx_t  p,
idx_t  q 
) const
template<class T , int N = 1, class Alloc = FastAllocator>
bool jem::util::SparseArray< T, N, Alloc >::erase ( const Index i)
template<class T , int N = 1, class Alloc = FastAllocator>
bool jem::util::SparseArray< T, N, Alloc >::erase ( idx_t  i)
template<class T , int N = 1, class Alloc = FastAllocator>
bool jem::util::SparseArray< T, N, Alloc >::erase ( idx_t  i,
idx_t  j 
)
template<class T , int N = 1, class Alloc = FastAllocator>
bool jem::util::SparseArray< T, N, Alloc >::erase ( idx_t  i,
idx_t  j,
idx_t  k 
)
template<class T , int N = 1, class Alloc = FastAllocator>
bool jem::util::SparseArray< T, N, Alloc >::erase ( idx_t  i,
idx_t  j,
idx_t  k,
idx_t  l 
)
template<class T , int N = 1, class Alloc = FastAllocator>
bool jem::util::SparseArray< T, N, Alloc >::erase ( idx_t  i,
idx_t  j,
idx_t  k,
idx_t  l,
idx_t  p 
)
template<class T , int N = 1, class Alloc = FastAllocator>
bool jem::util::SparseArray< T, N, Alloc >::erase ( idx_t  i,
idx_t  j,
idx_t  k,
idx_t  l,
idx_t  p,
idx_t  q 
)
template<class T , int N = 1, class Alloc = FastAllocator>
void jem::util::SparseArray< T, N, Alloc >::clear ( )
template<class T , int N = 1, class Alloc = FastAllocator>
void jem::util::SparseArray< T, N, Alloc >::reserve ( idx_t  cap)
template<class T , int N = 1, class Alloc = FastAllocator>
void jem::util::SparseArray< T, N, Alloc >::trimToSize ( )
template<class T , int N = 1, class Alloc = FastAllocator>
idx_t jem::util::SparseArray< T, N, Alloc >::capacity ( ) const
template<class T , int N = 1, class Alloc = FastAllocator>
void jem::util::SparseArray< T, N, Alloc >::reshape ( )
template<class T , int N = 1, class Alloc = FastAllocator>
void jem::util::SparseArray< T, N, Alloc >::reshape ( const Shape sh)
template<class T , int N = 1, class Alloc = FastAllocator>
void jem::util::SparseArray< T, N, Alloc >::reshape ( idx_t  m)
template<class T , int N = 1, class Alloc = FastAllocator>
void jem::util::SparseArray< T, N, Alloc >::reshape ( idx_t  m,
idx_t  n 
)
template<class T , int N = 1, class Alloc = FastAllocator>
void jem::util::SparseArray< T, N, Alloc >::reshape ( idx_t  m,
idx_t  n,
idx_t  p 
)
template<class T , int N = 1, class Alloc = FastAllocator>
void jem::util::SparseArray< T, N, Alloc >::reshape ( idx_t  m,
idx_t  n,
idx_t  p,
idx_t  q 
)
template<class T , int N = 1, class Alloc = FastAllocator>
void jem::util::SparseArray< T, N, Alloc >::reshape ( idx_t  m,
idx_t  n,
idx_t  p,
idx_t  q,
idx_t  r 
)
template<class T , int N = 1, class Alloc = FastAllocator>
void jem::util::SparseArray< T, N, Alloc >::reshape ( idx_t  m,
idx_t  n,
idx_t  p,
idx_t  q,
idx_t  r,
idx_t  s 
)
template<class T , int N = 1, class Alloc = FastAllocator>
const Shape& jem::util::SparseArray< T, N, Alloc >::shape ( ) const
template<class T , int N = 1, class Alloc = FastAllocator>
idx_t jem::util::SparseArray< T, N, Alloc >::size ( ) const
template<class T , int N = 1, class Alloc = FastAllocator>
idx_t jem::util::SparseArray< T, N, Alloc >::size ( int  idim) const
template<class T , int N = 1, class Alloc = FastAllocator>
const T& jem::util::SparseArray< T, N, Alloc >::getZero ( ) const
template<class T , int N = 1, class Alloc = FastAllocator>
void jem::util::SparseArray< T, N, Alloc >::setZero ( const T &  zero)
template<class T , int N = 1, class Alloc = FastAllocator>
idx_t jem::util::SparseArray< T, N, Alloc >::nonZeroCount ( ) const
template<class T , int N = 1, class Alloc = FastAllocator>
template<class Output >
void jem::util::SparseArray< T, N, Alloc >::printStats ( Output &  out) const

Member Data Documentation

template<class T , int N = 1, class Alloc = FastAllocator>
const idx_t jem::util::SparseArray< T, N, Alloc >::RANK = N
static