aimstil
5.0.5
|
A run-length encoded array. More...
#include <til/rle_array.h>
Classes | |
class | const_iterator |
class | const_sparse_iterator |
class | iterator |
class | Segment |
A Segment is composed of a value and a length. More... | |
class | sparse_iterator |
Public Types | |
typedef rle_array< T, TCount > | Self |
typedef T | value_type |
typedef const T & | const_reference |
typedef const T * | const_pointer |
typedef ValueProxy | reference |
typedef TCount | count_type |
Public Member Functions | |
rle_array () | |
Default constructor, yield a zero-size container. More... | |
rle_array (std::size_t i, T value=T()) | |
Standard constructor providing a size and an optional fill value. More... | |
const_iterator | begin () const |
const_iterator | end () const |
iterator | begin () |
iterator | end () |
const T & | operator[] (std::size_t i) const |
ValueProxy | operator[] (std::size_t i) |
void | set (std::pair< typename Data::iterator, TCount > &index, const T &value) |
template<typename XIterator > | |
const T & | get (std::pair< XIterator, TCount > &index) const |
std::size_t | size () const |
void | print () const |
A run-length encoded array.
Run-length encoding is a simple way to compress data. It stores data using two parameters: a value, and the number of time this value is repeated. The range of usefulness of this scheme is therefore limited to arrays where successive values have a very high probability to be strictly equal. This is generally true for smooth segmentation/label images, where this encoding is most useful. Due to the simplicity of its compression scheme, reading from an rle_array is fast, and extremely so when iterating; writing is a more complex operation, but still tractable.
Definition at line 24 of file rle_array.h.
typedef const T* til::rle_array< T, TCount >::const_pointer |
Definition at line 44 of file rle_array.h.
typedef const T& til::rle_array< T, TCount >::const_reference |
Definition at line 43 of file rle_array.h.
typedef TCount til::rle_array< T, TCount >::count_type |
Definition at line 46 of file rle_array.h.
typedef ValueProxy til::rle_array< T, TCount >::reference |
Definition at line 45 of file rle_array.h.
typedef rle_array<T,TCount> til::rle_array< T, TCount >::Self |
Definition at line 41 of file rle_array.h.
typedef T til::rle_array< T, TCount >::value_type |
Definition at line 42 of file rle_array.h.
|
inline |
Default constructor, yield a zero-size container.
Definition at line 51 of file rle_array.h.
|
inline |
Standard constructor providing a size and an optional fill value.
If not value is provided, the default value of type T is used.
Definition at line 58 of file rle_array.h.
|
inline |
Definition at line 65 of file rle_array.h.
|
inline |
Definition at line 69 of file rle_array.h.
|
inline |
Definition at line 67 of file rle_array.h.
|
inline |
Definition at line 71 of file rle_array.h.
References til::rle_array< T, TCount >::operator[]().
|
inline |
Definition at line 83 of file rle_array.h.
const T& til::rle_array< T, TCount >::operator[] | ( | std::size_t | i | ) | const |
Referenced by til::rle_array< T, TCount >::end().
ValueProxy til::rle_array< T, TCount >::operator[] | ( | std::size_t | i | ) |
|
inline |
Definition at line 89 of file rle_array.h.
void til::rle_array< T, TCount >::set | ( | std::pair< typename Data::iterator, TCount > & | index, |
const T & | value | ||
) |
|
inline |
Definition at line 86 of file rle_array.h.