yat
0.14.5pre
|
a set of Segments More...
#include <yat/utility/SegmentSet.h>
Public Types | |
typedef std::set< Segment< T, Compare >, SegmentCompare< T, Compare > >::key_type | key_type |
key type is same as Container 's key_type . More... | |
typedef std::set< Segment< T, Compare >, SegmentCompare< T, Compare > >::value_type | value_type |
value type is same as Container 's value_type . More... | |
typedef key_type::value_type | element_type |
element type is same as key_type 's value_type. More... | |
typedef std::set< Segment< T, Compare >, SegmentCompare< T, Compare > >::key_compare | key_compare |
key compare | |
typedef std::set< Segment< T, Compare >, SegmentCompare< T, Compare > >::value_compare | value_compare |
value compare | |
typedef Compare | element_compare |
element compare | |
typedef std::set< Segment< T, Compare >, SegmentCompare< T, Compare > >::pointer | pointer |
pointer | |
typedef std::set< Segment< T, Compare >, SegmentCompare< T, Compare > >::reference | reference |
reference | |
typedef std::set< Segment< T, Compare >, SegmentCompare< T, Compare > >::const_reference | const_reference |
const reference | |
typedef std::set< Segment< T, Compare >, SegmentCompare< T, Compare > >::size_type | size_type |
size_type | |
typedef std::set< Segment< T, Compare >, SegmentCompare< T, Compare > >::difference_type | difference_type |
difference_type | |
typedef std::set< Segment< T, Compare >, SegmentCompare< T, Compare > >::iterator | iterator |
iterator | |
typedef std::set< Segment< T, Compare >, SegmentCompare< T, Compare > >::const_iterator | const_iterator |
const_iterator | |
Public Member Functions | |
SegmentSet (void) | |
creates a set with no segments | |
me::const_iterator | insert_merge (const typename me::value_type &segment) |
me::iterator | insert_merge (typename me::iterator hint, const typename me::value_type &segment) |
insert with a hint More... | |
template<typename Iterator > | |
void | insert_merge (Iterator first, Iterator last) |
const_iterator | begin (void) const |
iterator | begin (void) |
void | clear (void) |
erases all values | |
size_type | count (const element_type &element) const |
bool | empty (void) const |
const_iterator | end (void) const |
iterator | end (void) |
void | erase (iterator first, iterator last) |
erase values in range [first, last) More... | |
void | erase (iterator pos) |
iterator | find (const element_type &element) |
const_iterator | find (const element_type &element) const |
std::pair< iterator, bool > | insert (const value_type &value) |
insert value More... | |
key_compare | key_comp (void) const |
iterator | lower_bound (const element_type &element) |
similar to lower_bound in std::set and std::map More... | |
const_iterator | lower_bound (const element_type &element) const |
similar to lower_bound in std::set and std::map More... | |
size_type | size (void) const |
iterator | upper_bound (const element_type &element) |
const_iterator | upper_bound (const element_type &element) const |
similar to upper_bound in std::set and std::map More... | |
value_compare | value_comp (void) const |
Protected Member Functions | |
std::pair< iterator, iterator > | overlap_range (const key_type &segment) |
Protected Attributes | |
std::set< Segment< T, Compare > , SegmentCompare< T, Compare > > | container_ |
underlying container | |
a set of Segments
A container that holds a set of Segment. The Segments cannot overlap.
|
inherited |
element type is same as key_type
's value_type.
If the key held is Segment<T>
, value_type
is T
.
|
inherited |
key type is same as Container
's key_type
.
Typically Segment<element_type>.
|
inherited |
value type is same as Container
's value_type
.
Typically a Segment<element_type> or pair<const Segment<element_type>, Data>.
|
inlineinherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
true
if size is zero
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
erase values in range [first, last)
|
inlineinherited |
erase value pointed to by pos
|
inherited |
If no value contains element, end() is returned.
|
inherited |
|
inherited |
insert value
if value does not overlap with container, insert segment; otherwise do nothing.
|
inline |
insert segment into set. If there is no gap between segment and neighboring segments the segments are merged.
|
inline |
insert with a hint
Similar to insert_merge(1) but hint help to find where to insert segment. For the hint to be useful, segment should not be greater than element hint points to and not smaller than element –hint points to.
|
inline |
Insert range [first, last). Same result as inserting them individually, but inserting a range is potentially faster, especially if range is sorted and set is sparse compared to range.
|
inlineinherited |
|
inherited |
similar to lower_bound in std::set and std::map
|
inherited |
similar to lower_bound in std::set and std::map
|
inlineprotectedinherited |
pair.first first (smallest) segment that overlaps with segment and pair.second first (smallest) segment that does not overlap with segment.
|
inlineinherited |
|
inherited |
|
inherited |
similar to upper_bound in std::set and std::map
|
inlineinherited |
value_compare
object used by the class to sort values