Claw 1.7.0
Public Types | Public Member Functions
claw::math::ordered_set< K, Comp > Class Template Reference

A class to manage sets of ordered items. More...

#include <ordered_set.hpp>

Inheritance diagram for claw::math::ordered_set< K, Comp >:
claw::avl< K, Comp >

List of all members.

Public Types

typedef super::const_iterator const_iterator
typedef super::value_type value_type
typedef super::referent_type referent_type
typedef super::const_reference const_reference

Public Member Functions

ordered_setoperator*= (const ordered_set &that)
 Intersection.
ordered_setoperator+= (const ordered_set &that)
 Union.
ordered_setoperator-= (const ordered_set &that)
 Difference.
ordered_setoperator/= (const ordered_set &that)
 Symetric difference.
bool operator> (const ordered_set &that) const
 Inclusion.
bool operator>= (const ordered_set &that) const
 Inclusion or equality.
bool operator< (const ordered_set &that) const
 Inclusion.
bool operator<= (const ordered_set &that) const
 Inclusion or equality.
ordered_setintersection (const ordered_set &that)
 Intersection.
ordered_setjoin (const ordered_set &that)
 Union.
ordered_setdifference (const ordered_set &that)
 Difference.
ordered_setsymetric_difference (const ordered_set &that)
 Symetric difference.
bool contains (const ordered_set &that) const
 Inclusion or equality.
bool strictly_contains (const ordered_set &that) const
 Inclusion.

Detailed Description

template<class K, class Comp = std::less<K>>
class claw::math::ordered_set< K, Comp >

A class to manage sets of ordered items.

Author:
Julien Jorge

Definition at line 44 of file ordered_set.hpp.


Member Function Documentation

template<class K , class Comp >
bool claw::math::ordered_set< K, Comp >::contains ( const ordered_set< K, Comp > &  that) const

Inclusion or equality.

Parameters:
thatThe instance that should be contained.
Returns:
true if that is included in this.

Definition at line 223 of file ordered_set.tpp.

References claw::avl< K, Comp >::begin(), claw::avl< K, Comp >::end(), and claw::avl< K, Comp >::size().

Referenced by claw::math::ordered_set< K, Comp >::operator<=().

template<class K , class Comp >
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::difference ( const ordered_set< K, Comp > &  that)

Difference.

Parameters:
thatThe instance from which to remove items.

Definition at line 184 of file ordered_set.tpp.

References claw::avl< K, Comp >::end(), and claw::avl< K, Comp >::find().

Referenced by claw::math::ordered_set< K, Comp >::symetric_difference().

template<class K , class Comp >
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::intersection ( const ordered_set< K, Comp > &  that)

Intersection.

Parameters:
thatThe instance to intersect from.

Definition at line 143 of file ordered_set.tpp.

References claw::avl< K, Comp >::end(), and claw::avl< K, Comp >::find().

template<class K , class Comp >
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::join ( const ordered_set< K, Comp > &  that)

Union.

Parameters:
thatThe instance to join with.

Definition at line 167 of file ordered_set.tpp.

References claw::avl< K, Comp >::begin(), and claw::avl< K, Comp >::end().

template<class K , class Comp >
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::operator*= ( const ordered_set< K, Comp > &  that)

Intersection.

Parameters:
thatThe instance to intersect from.

Definition at line 43 of file ordered_set.tpp.

template<class K , class Comp >
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::operator+= ( const ordered_set< K, Comp > &  that)

Union.

Parameters:
thatThe instance to join with.

Definition at line 55 of file ordered_set.tpp.

template<class K , class Comp >
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::operator-= ( const ordered_set< K, Comp > &  that)

Difference.

Parameters:
thatThe instance from which to remove items.

Definition at line 67 of file ordered_set.tpp.

template<class K , class Comp >
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::operator/= ( const ordered_set< K, Comp > &  that)

Symetric difference.

Parameters:
thatThe instance to differ from.

Definition at line 79 of file ordered_set.tpp.

template<class K , class Comp >
bool claw::math::ordered_set< K, Comp >::operator< ( const ordered_set< K, Comp > &  that) const

Inclusion.

Parameters:
thatThe instance that should contain.
Returns:
true if that is strictly included in this.

Definition at line 118 of file ordered_set.tpp.

References claw::math::ordered_set< K, Comp >::strictly_contains().

template<class K , class Comp >
bool claw::math::ordered_set< K, Comp >::operator<= ( const ordered_set< K, Comp > &  that) const

Inclusion or equality.

Parameters:
thatThe instance that should be contained.
Returns:
true if that is included in this.

Definition at line 131 of file ordered_set.tpp.

References claw::math::ordered_set< K, Comp >::contains().

template<class K , class Comp >
bool claw::math::ordered_set< K, Comp >::operator> ( const ordered_set< K, Comp > &  that) const

Inclusion.

Parameters:
thatThe instance that should be contained.
Returns:
true if that is strictly included in this.

Definition at line 92 of file ordered_set.tpp.

template<class K , class Comp >
bool claw::math::ordered_set< K, Comp >::operator>= ( const ordered_set< K, Comp > &  that) const

Inclusion or equality.

Parameters:
thatThe instance that should be contained.
Returns:
true if that is included in this.

Definition at line 105 of file ordered_set.tpp.

template<class K , class Comp >
bool claw::math::ordered_set< K, Comp >::strictly_contains ( const ordered_set< K, Comp > &  that) const

Inclusion.

Parameters:
thatThe instance that should contain.
Returns:
true if that is strictly included in this.

Definition at line 252 of file ordered_set.tpp.

References claw::avl< K, Comp >::size().

Referenced by claw::math::ordered_set< K, Comp >::operator<().

template<class K , class Comp >
claw::math::ordered_set< K, Comp > & claw::math::ordered_set< K, Comp >::symetric_difference ( const ordered_set< K, Comp > &  that)

Symetric difference.

Parameters:
thatThe instance to differ from.

Definition at line 208 of file ordered_set.tpp.

References claw::math::ordered_set< K, Comp >::difference().


The documentation for this class was generated from the following files: