2 #ifndef vbl_sparse_array_3d_h_ 3 #define vbl_sparse_array_3d_h_ 25 # include <vcl_msvc_warnings.h> 39 bool put(
unsigned i,
unsigned j,
unsigned k,
const T& t)
57 const T&
operator () (
unsigned i,
unsigned j,
unsigned k)
const 65 bool fullp(
unsigned i,
unsigned j,
unsigned k)
const 73 T*
get_addr(
unsigned i,
unsigned j,
unsigned k)
81 std::ostream&
print(std::ostream&)
const;
86 inline std::ostream&
operator <<
93 #ifndef VBL_SPARSE_ARRAY_BASE_INSTANTIATE 94 #define VBL_SPARSE_ARRAY_BASE_INSTANTIATE(T) \ 95 extern "please include vbl/vbl_sparse_array_base.hxx instead" 96 #endif // VBL_SPARSE_ARRAY_BASE_INSTANTIATE 97 #define VBL_SPARSE_ARRAY_3D_INSTANTIATE(T) \ 98 extern "please include vbl/vbl_sparse_array_3d.hxx instead" 100 #endif // vbl_sparse_array_3d_h_ T * get_addr(unsigned i, unsigned j, unsigned k)
Return the address of location (i,j,k). 0 if not yet filled.
vbl_triple< T1, T2, T3 > vbl_make_triple(T1 const &x, T2 const &y, T3 const &z)
std::ostream & print(std::ostream &) const
Print the Array to a stream in "(i,j,k): value" format.
bool put(unsigned i, unsigned j, unsigned k, const T &t)
Put a value into location (i,j,k).
base class for sparse arrays.
T & operator()(unsigned i, unsigned j, unsigned k)
Return contents of location (i,j,k).
Sparse 3d array allowing space efficient access.
A fully featured sparse array which devolves indexing to its templated type.
bool fullp(unsigned i, unsigned j, unsigned k) const
Return true if location (i,j,k) has been filled.