boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc > Class Template Reference
Addable, subractable and intersectable maps.
More...
List of all members.
|
Public Member Functions |
iterator | add (iterator prior, const value_type &value_pair) |
map & | add (const value_type &value_pair) |
void | add_intersection (map §ion, const map §ant) const |
void | add_intersection (map §ion, const set_type §ant) const |
void | add_intersection (map §ion, const element_type &key_value_pair) const |
void | add_intersection (map §ion, const domain_type &key_value) const |
std::string | as_string () const |
template<class Predicate > |
map & | assign_if (const map &src, const Predicate &) |
bool | contained_in (const map &super) const |
bool | contains (const map &sub) const |
bool | contains (const element_type &key_value_pair) const |
bool | contains (const domain_type &key) const |
void | domain (set_type &domain_set) const |
size_type | erase (const element_type &key_value_pair) |
template<class Predicate > |
map & | erase_if (const Predicate &) |
bool | intersects (const element_type &key_value_pair) const |
bool | intersects (const domain_type &key) const |
size_t | iterative_size () const |
codomain_type | operator() (const domain_type &key) const |
map & | set (const element_type &key_value_pair) |
map & | subtract (const value_type &value_pair) |
Static Public Member Functions |
template<typename IteratorT > |
static const codomain_type & | codomain_value (IteratorT value_) |
template<typename IteratorT > |
static const data_type & | data_value (IteratorT value_) |
template<typename LeftIterT , typename RightIterT > |
static bool | key_less (LeftIterT lhs_, RightIterT rhs_) |
template<typename IteratorT > |
static const key_type & | key_value (IteratorT value_) |
static value_type | make_element (const key_type &key_val, const data_type &data_val) |
Detailed Description
template<typename DomainT, typename CodomainT, class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
class boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >
Addable, subractable and intersectable maps.
Member Function Documentation
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
bool boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::contains |
( |
const domain_type & |
key |
) |
const [inline] |
Checks if a key is in the map
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
bool boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::contains |
( |
const element_type & |
key_value_pair |
) |
const [inline] |
Checks if a key-value pair is in the map
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
bool boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::contained_in |
( |
const map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc > & |
super |
) |
const [inline] |
Is *this
contained in super
?
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
bool boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::contains |
( |
const map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc > & |
sub |
) |
const [inline] |
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
size_t boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::iterative_size |
( |
|
) |
const [inline] |
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
codomain_type boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::operator() |
( |
const domain_type & |
key |
) |
const [inline] |
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
map& boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::add |
( |
const value_type & |
value_pair |
) |
[inline] |
add
inserts value_pair
into the map if it's key does not exist in the map. If value_pairs's
key value exists in the map, it's data value is added to the data value already found in the map.
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
iterator boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::add |
( |
iterator |
prior, |
|
|
const value_type & |
value_pair | |
|
) |
| | [inline] |
add
add value_pair
into the map using prior
as a hint to insert value_pair
after the position prior
is pointing to.
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
map& boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::subtract |
( |
const value_type & |
value_pair |
) |
[inline] |
If the value_pair's
key value is in the map, it's data value is subtraced from the data value stored in the map.
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
map& boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::set |
( |
const element_type & |
key_value_pair |
) |
[inline] |
With key_value_pair = (k,v)
set value v
for key k
template<class DomainT , class CodomainT , class Traits , ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::size_type boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::erase |
( |
const element_type & |
key_value_pair |
) |
[inline] |
erase key_value_pair
from the map. Erase only if, the exact value content val
is stored for the given key.
template<class DomainT , class CodomainT , class Traits , ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
void boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::add_intersection |
( |
map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc > & |
section, |
|
|
const domain_type & |
key_value | |
|
) |
| | const [inline] |
The intersection of key
in *this
map is added to section
.
template<class DomainT , class CodomainT , class Traits , ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
void boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::add_intersection |
( |
map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc > & |
section, |
|
|
const element_type & |
key_value_pair | |
|
) |
| | const [inline] |
The intersection of key_value_pair
and *this
map is added to section
.
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
void boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::add_intersection |
( |
map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc > & |
section, |
|
|
const set_type & |
sectant | |
|
) |
| | const |
The intersection of set sectant
with *this
map is added to section
.
template<class DomainT , class CodomainT , class Traits , ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
void boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::add_intersection |
( |
map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc > & |
section, |
|
|
const map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc > & |
sectant | |
|
) |
| | const [inline] |
The intersection of map sectant
with *this
map is added to section
.
template<class DomainT , class CodomainT , class Traits , ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
bool boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::intersects |
( |
const domain_type & |
key |
) |
const [inline] |
Returns true, if there is an intersection of key
and *this
map. Functions intersects
and contains
are identical on key value arguments of type domain_type
. Complexity: Logarithmic in container size.
template<class DomainT , class CodomainT , class Traits , ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
bool boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::intersects |
( |
const element_type & |
key_value_pair |
) |
const [inline] |
Returns true, if there is an intersection of and *this
map. If the key is found, the content of key_value_pair
has to have an intersection with the content of the data value in the map. Complexity: Logarithmic in container size.
template<class DomainT , class CodomainT , class Traits , ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
std::string boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::as_string |
( |
|
) |
const [inline] |
Represent this map as string
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
template<typename IteratorT >
static const key_type& boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::key_value |
( |
IteratorT |
value_ |
) |
[inline, static] |
key_value
allows for a uniform access to key_values
which is is used for common algorithms on sets and maps.
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
template<typename IteratorT >
static const data_type& boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::data_value |
( |
IteratorT |
value_ |
) |
[inline, static] |
data_value
allows for a uniform access to data_values
which is is used for common algorithms on sets and maps.
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
template<typename IteratorT >
static const codomain_type& boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::codomain_value |
( |
IteratorT |
value_ |
) |
[inline, static] |
codomain_value
allows for a uniform access to codomain_values
which is is used for common algorithms on sets and maps.
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
template<typename LeftIterT , typename RightIterT >
static bool boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::key_less |
( |
LeftIterT |
lhs_, |
|
|
RightIterT |
rhs_ | |
|
) |
| | [inline, static] |
key_less
allows for a uniform notation of key comparison which is used for common algorithms on sets and maps.
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
static value_type boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::make_element |
( |
const key_type & |
key_val, |
|
|
const data_type & |
data_val | |
|
) |
| | [inline, static] |
template<class DomainT , class CodomainT , class Traits , ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
template<class Predicate >
map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc > & boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::erase_if |
( |
const Predicate & |
pred |
) |
[inline] |
Erase the elements in *this map to which property hasProperty
applies. Keep all the rest.
template<class DomainT , class CodomainT , class Traits , ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
template<class Predicate >
map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc > & boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::assign_if |
( |
const map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc > & |
src, |
|
|
const Predicate & |
pred | |
|
) |
| | [inline] |
Copy the elements in map src
to which property hasProperty
applies into *this
map.
template<typename DomainT , typename CodomainT , class Traits = itl::partial_absorber, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT), ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), ITL_ALLOC Alloc = std::allocator>
void boost::itl::map< DomainT, CodomainT, Traits, Compare, Combine, Section, Alloc >::domain |
( |
set_type & |
domain_set |
) |
const [inline] |
Copy the key values of the map to domain_set
. Complexity: Linear.
The documentation for this class was generated from the following file: