Effective implementation of algorithms (Master Thesis)
Effective and error-free implementation of algorithms
IntervalSumArray< ValueType > Class Template Reference

#include <interval_array.h>

List of all members.

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

Detailed Description

template<typename ValueType>
class IntervalSumArray< ValueType >

Interval-tree-like implementation done in a simple array.

Warning:
This class is inefficient, use only for testing!

Member Typedef Documentation

template<typename ValueType >
typedef std::vector<ValueType>::size_type IntervalSumArray< ValueType >::SizeType [private]

Member Function Documentation

template<typename ValueType >
ValueType IntervalSumArray< ValueType >::get_sum ( SizeType  start,
SizeType  end 
) [inline]

get sum of interval [start, end)

template<typename ValueType >
void IntervalSumArray< ValueType >::increment ( SizeType  start,
SizeType  end,
ValueType  value 
) [inline]

increment interval [start, end)

template<typename ValueType >
void IntervalSumArray< ValueType >::initialize ( SizeType  size) [inline]

Initialize whole array


Member Data Documentation

template<typename ValueType >
std::vector<ValueType> IntervalSumArray< ValueType >::data [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines