Polymake Template Library (PTL): Generic Sets
Polymake Template Library (PTL)  3.0.6
Generic Sets
Collaboration diagram for Generic Sets:

Namespaces

 pm
 global namespace for all classes from the polymake project
 
 operations
 functors for operations on GenericSet objects
 
 operators
 functors for operators on GenericSet objects
 
 polymake
 namespace to be used for client code
 

Classes

class  pm::Complement< SetTop, E, Comparator >
 Complement as GenericSet. More...
 
class  pm::SingleElementSetCmp< Eref, Comparator >
 A set consisting of exactly one element. More...
 
class  pm::Set_with_dim< SetRef >
 Set_with_dim as GenericSet. More...
 

Functions

template<typename E >
const SingleElementSet< const E & > pm::scalar2set (const E &x)
 constructs a one element set
 
template<typename E >
const SingleElementSet< E > pm::scalarcopy2set (const E &x)
 constructs a one element set, creating a private copy of the element inside
 
int pm::Set_with_dim< SetRef >::size () const
 the size of the set
 
template<typename Set1 , typename Set2 >
operations::add_impl< const Set1 &, const Set2 & >::result_type pm::operators::operator+ (const GenericSet< Set1 > &l, const GenericSet< Set2 > &r)
 union of two GenericSet objects
 
template<typename Set1 , typename E >
operations::add_impl< const Set1 &, const E & >::result_type pm::operators::operator+ (const GenericSet< Set1, E > &l, const E &r)
 union of a GenericSet and a singleton
 
template<typename E , typename Set2 >
operations::add_impl< const E &, const Set2 & >::result_type pm::operators::operator+ (const E &l, const GenericSet< Set2, E > &r)
 union of singleton and a GenericSet
 
template<typename Set1 , typename Set2 >
operations::sub_impl< const Set1 &, const Set2 & >::result_type pm::operators::operator- (const GenericSet< Set1 > &l, const GenericSet< Set2 > &r)
 difference of two GenericSet objects
 
template<typename Set1 , typename E >
operations::sub_impl< const Set1 &, const E & >::result_type pm::operators::operator- (const GenericSet< Set1, E > &l, const E &r)
 difference of GenericSet and a singleton
 
template<typename Set1 , typename Set2 , typename E , typename Comparator >
bool pm::operators::operator== (const GenericSet< Set1, E, Comparator > &l, const GenericSet< Set2, E, Comparator > &r)
 equality of GenericSet objects
 
template<typename Set1 , typename Set2 , typename E , typename Comparator >
bool pm::operators::operator< (const GenericSet< Set1, E, Comparator > &l, const GenericSet< Set2, E, Comparator > &r)
 lexicographical comparison of GenericSet objects
 
static bool pm::size_estimator< Set1, Set2, _both_have_size >::seek_cheaper_than_sequential (const Set1 &set1, const Set2 &set2)
 
template<typename Set1 , typename Set2 , typename E1 , typename E2 , class Comparator >
int pm::incl (const GenericSet< Set1, E1, Comparator > &s1, const GenericSet< Set2, E2, Comparator > &s2)
 

Detailed Description

Functions and operations for GenericSets

Function Documentation

template<typename Set1 , typename Set2 , typename E1 , typename E2 , class Comparator >
int pm::incl ( const GenericSet< Set1, E1, Comparator > &  s1,
const GenericSet< Set2, E2, Comparator > &  s2 
)

Analyze the inclusion relation of two sets. 0 $s1$ and $s2$ are equal -1 $s1$ is included in $s2$ 1 $s2$ is included in $s1$ 2 $s1$ and $s2$ are independent

template<typename Set1 , typename Set2 , bool _both_have_size = (iterator_traits<typename Set1::iterator>::is_bidirectional && iterator_traits<typename Set2::iterator>::is_bidirectional)>
static bool pm::size_estimator< Set1, Set2, _both_have_size >::seek_cheaper_than_sequential ( const Set1 &  set1,
const Set2 &  set2 
)
inlinestatic

Estimates how the insertion or removal of a sequence of elements could be made faster. Returns true if \n2*log(n1) < n1+n2\, which means that seeking for each element of set2 in set1 would be faster than sequentially comparing element pairs from set1 and set2.