Polymake Template Library (PTL): pm::PowerSet Class Reference
Polymake Template Library (PTL)  4.2

A Set with elements of type Set<E>, providing methods for adding elements while preserving subset or superset independence. Comparator is a functor defining a total ordering on Set<E>. More...

Public Member Functions

 PowerSet ()
 Create as empty.
 
template<typename Top >
 PowerSet (const GenericSet< Top, Set< E, Comparator >> &S)
 Create from a Set of Sets.
 
template<typename Iterator >
 PowerSet (Iterator first, Iterator last)
 Reads subsets from an input sequence. They must be sorted lexicographically.
 
template<typename Iterator >
 PowerSet (Iterator &&src, typename std::enable_if< assess_iterator< Iterator, check_iterator_feature, end_sensitive >::value &&assess_iterator_value< Iterator, isomorphic_types, Set< E >>::value, void ** >::type=nullptr)
 Create from an iterator.
 
template<typename TSet2 >
PowerSetoperator= (const GenericSet< TSet2, Set< E, Comparator >> &S)
 Compare two PowerSets.
 
template<typename TSet2 >
Int insertMax (const GenericSet< TSet2, E, Comparator > &s)
 Adds an independent subset. More...
 
template<typename TSet2 >
Int insertMin (const GenericSet< TSet2, E, Comparator > &s)
 Adds an independent subset. More...
 

Detailed Description

A Set with elements of type Set<E>, providing methods for adding elements while preserving subset or superset independence. Comparator is a functor defining a total ordering on Set<E>.

Member Function Documentation

◆ insertMax()

template<typename TSet2 >
Int pm::PowerSet::insertMax ( const GenericSet< TSet2, E, Comparator > &  s)
inline

Adds an independent subset.

The new subset will not be added if there already is another subset that includes the given one. All subsets in the PowerSet that are included in the new one are removed.

Returns
1 new subset inserted, smaller subsets possibly deleted.
0 new subset not inserted, because the same subset was already there
-1 new subset not inserted, because there already is a bigger one

◆ insertMin()

template<typename TSet2 >
Int pm::PowerSet::insertMin ( const GenericSet< TSet2, E, Comparator > &  s)
inline

Adds an independent subset.

The new subset will not be added if there already is another subset that is contained in the given one. All subsets in the PowerSet that contain the new one are removed.

Returns
1 new subset inserted, larger subsets possibly deleted
0 new subset not inserted, because the same subset was already there
-1 new subset not inserted, because there already is a smaller one

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