|
casacore
|
Public Types | |
| typedef value_t * | iterator |
| typedef const value_t * | const_iterator |
Public Member Functions | |
| Dictionary () | |
| Dictionary (size_t size) | |
| void | reserve (size_t size) |
| void | resize (size_t size) |
| const_iterator | lower_bound (value_t val) const |
| Returns an iterator pointing to the first element in the dictionary that is not less than (i.e. | |
| const_iterator | lower_bound_fast (value_t val) const |
| Returns an iterator pointing to the first element in the dictionary that is not less than (i.e. | |
| const_iterator | lower_bound_slow (value_t val) const |
| Below is the first failed result of an attempt to beat the STL in performance. | |
| iterator | begin () |
| const_iterator | begin () const |
| const_iterator | end () const |
| symbol_t | symbol (const_iterator iter) const |
| symbol_t | largest_symbol () const |
| value_t | value (const_iterator iter) const |
| value_t | value (symbol_t sym) const |
| value_t | largest_value () const |
| value_t | smallest_value () const |
| size_t | size () const |
| size_t | capacity (size_t) const |
Private Attributes | |
| aocommon::UVector< value_t > | _values |
Definition at line 152 of file stochasticencoder.h.
| typedef const value_t* dyscostman::StochasticEncoder< ValueType >::Dictionary::const_iterator |
Definition at line 155 of file stochasticencoder.h.
| typedef value_t* dyscostman::StochasticEncoder< ValueType >::Dictionary::iterator |
Definition at line 154 of file stochasticencoder.h.
|
inline |
Definition at line 157 of file stochasticencoder.h.
References _values.
|
inlineexplicit |
Definition at line 159 of file stochasticencoder.h.
|
inline |
|
inline |
Definition at line 233 of file stochasticencoder.h.
References _values.
|
inline |
Definition at line 242 of file stochasticencoder.h.
References _values.
|
inline |
Definition at line 234 of file stochasticencoder.h.
References _values.
|
inline |
Definition at line 236 of file stochasticencoder.h.
References _values.
|
inline |
Definition at line 239 of file stochasticencoder.h.
References _values.
|
inline |
Returns an iterator pointing to the first element in the dictionary that is not less than (i.e.
greater or equal to) value.
This implementation is like lower_bound_fast(), but additionally assumes the dictionary has at least two elements, avoiding one comparison.
Definition at line 173 of file stochasticencoder.h.
References _values.
|
inline |
Returns an iterator pointing to the first element in the dictionary that is not less than (i.e.
greater or equal to) value.
This implementation turns out to be slightly faster than the STL implementation. It performs 10.7 MB/s, vs. 9.0 MB/s for the STL. 18% faster. Using "unsigned" instead of "size_t" is 5% slower. (It's not a fair STL comparison, because this implementation does not check for empty vector).
Definition at line 200 of file stochasticencoder.h.
References _values.
|
inline |
Below is the first failed result of an attempt to beat the STL in performance.
It turns out to be 13% slower for larger dictionaries, compared to the STL implementation that is used in the class above. It performs 7.9 MB/s. 26% compared to the 'fastest' lower_bound.
This is a bit inefficient, but (p + q)/2 was not allowed, because operator+(ptr,ptr) is not allowed.
Definition at line 218 of file stochasticencoder.h.
References _values.
|
inline |
Definition at line 161 of file stochasticencoder.h.
|
inline |
Definition at line 163 of file stochasticencoder.h.
|
inline |
Definition at line 241 of file stochasticencoder.h.
References _values.
Referenced by Dictionary(), reserve(), and resize().
|
inline |
Definition at line 240 of file stochasticencoder.h.
References _values.
|
inline |
Definition at line 235 of file stochasticencoder.h.
References begin().
|
inline |
Definition at line 237 of file stochasticencoder.h.
|
inline |
Definition at line 238 of file stochasticencoder.h.
References _values.
|
private |
Definition at line 245 of file stochasticencoder.h.
Referenced by begin(), begin(), capacity(), Dictionary(), Dictionary(), end(), largest_symbol(), largest_value(), lower_bound(), lower_bound_fast(), lower_bound_slow(), reserve(), resize(), size(), smallest_value(), and value().