Functions and operations for GenericSets.
More...
|
| pm |
| global namespace for all classes from the polymake project
|
|
| operations |
| functors for operations on GenericSet objects
|
|
| polymake |
| namespace to be used for client code
|
|
|
template<typename Set2 > |
bool | pm::GenericSet::operator== (const GenericSet< Set2, E, Comparator > &s) const |
| comparison
|
|
template<typename Set2 > |
bool | pm::GenericSet::operator< (const GenericSet< Set2, E, Comparator > &s) const |
| lexicographical comparison
|
|
template<typename Comparator , typename E > |
auto | pm::scalar2set (E &&x) |
| construct an one-element set with explicitly specified comparator type
|
|
template<typename E > |
auto | pm::scalar2set (E &&x) |
| construct an one-element set with standard (lexicographical) comparator type
|
|
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) |
|
Functions and operations for GenericSets.
◆ incl()
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. @returnval 0 $s1$ and $s2$ are equal @returnval -1 $s1$ is included in $s2$ @returnval 1 $s2$ is included in $s1$ @returnval 2 $s1$ and $s2$ are independent
◆ seek_cheaper_than_sequential()
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.