Sparse 3D array. More...
#include <vxl_config.h>#include <vcl_functional.h>#include <vcl_map.h>#include <vcl_iosfwd.h>Go to the source code of this file.
Classes | |
| class | vbl_big_sparse_array_3d< T > |
Defines | |
| #define | VBL_BIG_SPARSE_ARRAY_3D_INSTANTIATE(T) extern "Please #include <vbl/vbl_big_sparse_array_3d.txx> instead" |
Functions | |
| template<class T > | |
| vcl_ostream & | operator<< (vcl_ostream &s, vbl_big_sparse_array_3d< T >const &a) |
Sparse 3D array.
vbl_big_sparse_array_3d is a sparse 3D array allowing space efficient access of the form s(300,700,900) = 2; It uses the 64-bit integer type "long long" (whenever supported by the compiler) to store the 3D index: 21 bits per dimension. Hence the largest possible coordinate in each dimension is 2^21-1 = 2097151. On platforms that do not have 64-bit integers, the maximum is 2^10-1 = 1023. (Actually, for some dimensions, it could be a factor 2 higher.)
Example usage:
vbl_big_sparse_array_3d<double> x; x(1,2,3) = 1.23; x(100,200,3) = 100.2003; x.put(200,300,4, 200.3004); vcl_cout << "123 = " << x(1,2,3) << vcl_endl << "222 = " << x(2,2,2) << vcl_endl << "333 is full? " << x.fullp(3,3,3) << vcl_endl << x;
Modifications
180497 AWF - Moved to Basics
261001 Peter Vanroose - documentation added about implementation
261001 Peter Vanroose - bug fixed in bigencode - had 11,22 instead of 21,42.
271001 Peter Vanroose - ported to vxl from BigSparseArray3; removed n1,n2,n3
Definition in file vbl_big_sparse_array_3d.h.
| #define VBL_BIG_SPARSE_ARRAY_3D_INSTANTIATE | ( | T | ) | extern "Please #include <vbl/vbl_big_sparse_array_3d.txx> instead" |
Definition at line 99 of file vbl_big_sparse_array_3d.h.
| vcl_ostream& operator<< | ( | vcl_ostream & | s, |
| vbl_big_sparse_array_3d< T >const & | a | ||
| ) | [inline] |
Definition at line 94 of file vbl_big_sparse_array_3d.h.
1.7.5.1