Effective implementation of algorithms (Master Thesis)
Effective and error-free implementation of algorithms
|
#include <interval_array.h>
Public Member Functions | |
void | initialize (SizeType size) |
void | set (SizeType start, SizeType end, ValueType value) |
void | update (SizeType start, SizeType end, ValueType value) |
ValueType | get_max (SizeType start, SizeType end) |
Private Types | |
typedef std::vector< ValueType > ::size_type | SizeType |
Private Attributes | |
std::vector< ValueType > | data |
Interval-tree-like implementation done in a simple array.
typedef std::vector<ValueType>::size_type IntervalMaxArray< ValueType >::SizeType [private] |
ValueType IntervalMaxArray< ValueType >::get_max | ( | SizeType | start, |
SizeType | end | ||
) | [inline] |
get maximum of interval [start, end)
void IntervalMaxArray< ValueType >::initialize | ( | SizeType | size | ) | [inline] |
void IntervalMaxArray< ValueType >::set | ( | SizeType | start, |
SizeType | end, | ||
ValueType | value | ||
) | [inline] |
sets value on whole interval [start, end)
void IntervalMaxArray< ValueType >::update | ( | SizeType | start, |
SizeType | end, | ||
ValueType | value | ||
) | [inline] |
update interval with new max [start, end)
std::vector<ValueType> IntervalMaxArray< ValueType >::data [private] |