#include <yat/utility/SegmentTree.h>
Public Types | |
typedef Container::key_type | key_type |
key type | |
typedef Container::value_type | value_type |
value type | |
typedef key_type::value_type | element_type |
element type | |
typedef Container::key_compare | key_compare |
key compare | |
typedef Container::value_compare | value_compare |
calue compare | |
typedef Compare | element_compare |
element compare | |
typedef Container::pointer | pointer |
pointer | |
typedef Container::reference | reference |
reference | |
typedef Container::const_reference | const_reference |
const reference | |
typedef Container::size_type | size_type |
size_type | |
typedef Container::difference_type | difference_type |
difference_type | |
typedef Container::iterator | iterator |
iterator | |
typedef Container::const_iterator | const_iterator |
const_iterator | |
Public Member Functions | |
SegmentTree (void) | |
creates a container with no segments | |
virtual | ~SegmentTree (void) |
Destructor. | |
const_iterator | begin (void) const |
iterator | begin (void) |
void | clear (void) |
erases all segments | |
size_type | count (const element_type &element) const |
bool | empty (void) const |
const_iterator | end (void) const |
iterator | end (void) |
const_iterator | find (const element_type &vt) const |
std::pair< iterator, bool > | insert (const value_type &segment) |
insert value | |
key_compare | key_comp (void) const |
iterator | lower_bound (const element_type &element) |
const_iterator | lower_bound (const element_type &element) const |
size_type | size (void) const |
iterator | upper_bound (const element_type &element) |
const_iterator | upper_bound (const element_type &element) const |
value_compare | value_comp (void) const |
Protected Member Functions | |
std::pair< iterator, iterator > | overlap_range (const key_type &segment) |
Protected Attributes | |
Container | container_ |
underlying container |
const_reference
to key_type
(or const&
) iterator theplu::yat::utility::SegmentTree< Container, Compare, Value2Key >::begin | ( | void | ) | [inline] |
const_iterator theplu::yat::utility::SegmentTree< Container, Compare, Value2Key >::begin | ( | void | ) | const [inline] |
SegmentTree< Container, Compare, Value2Key >::size_type theplu::yat::utility::SegmentTree< Container, Compare, Value2Key >::count | ( | const element_type & | element | ) | const [inline] |
bool theplu::yat::utility::SegmentTree< Container, Compare, Value2Key >::empty | ( | void | ) | const [inline] |
true
iterator theplu::yat::utility::SegmentTree< Container, Compare, Value2Key >::end | ( | void | ) | [inline] |
const_iterator theplu::yat::utility::SegmentTree< Container, Compare, Value2Key >::end | ( | void | ) | const [inline] |
SegmentTree< Container, Compare, Value2Key >::const_iterator theplu::yat::utility::SegmentTree< Container, Compare, Value2Key >::find | ( | const element_type & | vt | ) | const [inline] |
std::pair< typename SegmentTree< T, Compare, Value2Key >::iterator, bool > theplu::yat::utility::SegmentTree< T, Compare, Value2Key >::insert | ( | const value_type & | segment | ) | [inline] |
insert value
if segment does not overlap with any segment in set, insert segment; otherwise do nothing.
key_compare theplu::yat::utility::SegmentTree< Container, Compare, Value2Key >::key_comp | ( | void | ) | const [inline] |
SegmentTree< T, Compare, Value2Key >::const_iterator theplu::yat::utility::SegmentTree< T, Compare, Value2Key >::lower_bound | ( | const element_type & | element | ) | const [inline] |
SegmentTree< T, Compare, Value2Key >::iterator theplu::yat::utility::SegmentTree< T, Compare, Value2Key >::lower_bound | ( | const element_type & | element | ) | [inline] |
std::pair<iterator, iterator> theplu::yat::utility::SegmentTree< Container, Compare, Value2Key >::overlap_range | ( | const key_type & | segment | ) | [inline, protected] |
pair.first first (smallest) segment that overlaps with segment and pair.second first (smallest) segment that does not overlap with segment.
size_type theplu::yat::utility::SegmentTree< Container, Compare, Value2Key >::size | ( | void | ) | const [inline] |
SegmentTree< T, Compare, Value2Key >::const_iterator theplu::yat::utility::SegmentTree< T, Compare, Value2Key >::upper_bound | ( | const element_type & | element | ) | const [inline] |
SegmentTree< T, Compare, Value2Key >::iterator theplu::yat::utility::SegmentTree< T, Compare, Value2Key >::upper_bound | ( | const element_type & | element | ) | [inline] |
value_compare theplu::yat::utility::SegmentTree< Container, Compare, Value2Key >::value_comp | ( | void | ) | const [inline] |