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 | increment (SizeType start, SizeType end, ValueType value) |
ValueType | get_sum (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 IntervalSumArray< ValueType >::SizeType [private] |
ValueType IntervalSumArray< ValueType >::get_sum | ( | SizeType | start, |
SizeType | end | ||
) | [inline] |
get sum of interval [start, end)
void IntervalSumArray< ValueType >::increment | ( | SizeType | start, |
SizeType | end, | ||
ValueType | value | ||
) | [inline] |
increment interval [start, end)
void IntervalSumArray< ValueType >::initialize | ( | SizeType | size | ) | [inline] |
Initialize whole array
std::vector<ValueType> IntervalSumArray< ValueType >::data [private] |