#include <Set.h> using namespace polymake;
ElementComparator is a comparator functor
defining a total ordering on the element value domain.
In the most cases, the default choice (lexicographical order) will suffice your needs.
Set object via a smart pointer with
reference counting.
template <typename Top, typename ElementType=typename Top::element_type,
typename ElementComparator=typename Top::element_comparator>
class GenericSet;
element_type |
ElementType, the persistent element type |
element_comparator |
ElementComparator, the comparator functor for the elements |
top_type |
Top, the concrete set object behind the generic reference |
generic_type |
GenericSet<Top> itself |
persistent_type |
Set<ElementType, ElementComparator> |
GenericSet directly are scattered over the entire page.
They are discernible on the prefix GenericSet:: or parameters of type GenericSet&.
To use other methods via a generic reference (or pointer), you must first move to the concrete object using the
top() method.
ElementComparator.
end_sensitive is to signal that the first argument src
has to be treated as an end-sensitive iterator.
A template constructor with a single argument would shadow all other constructors away!
ElementComparator.
Set or a row (column) of a mutable (non-const) incidence matrix.
All set classes implement the STL
Forward Container interface
or one of its refinements. This means, every set object can be traversed using an
iterator or const_iterator created by begin() method or
entire() function,
its size can be retrieved with size() method and so on.
Set class as well as rows and columns of an
IncidenceMatrix also inherit
the AVL tree data access interface, as well as following methods:
GenericSet argument to a template function where it has a chance to be evaluated multiple
times. See also prevent_lazy class.
size() method on such a lazy object
will effectively perform the entire operation. On the contrary, empty() will run until the
first resulting element is found, so it should be preferred to size() whenever possible.
GenericSet's with the same element and comparator types,
or one operand is a scalar having the type ElementType of another operand.
In the latter case it is treated as an one-element set with ElementComparator borrowed
from another operand.
GenericSet compatible to another operand (that is, having the same element and comparator types,)
or a Complement of a compatible set.
GenericSet compatible to another operand (that is, having the same element and comparator types,)
or a Complement of a compatible set,
or a scalar having the type ElementType of another operand.
In the latter case it is treated as an one-element set with ElementComparator borrowed
from another operand.
GenericSet.
namespace std_ext { template <typename ElementType, typename ElementComparator> struct hash< Set<ElementType, ElementComparator> >; template <> struct hash<Bitset>; }
std_ext::hash_set and
std_ext::hash_map.
| 0 | s1 = s2 |
| -1 | s1 ⊂ s2 |
| 1 | s1 ⊃ s2 |
| 2 | none of above; s1 and s2 are independent |
Complement case.)
The index of the first element is 0.
pm::SingleElementSet&.
pm::OrderedContainer&.
Indices&.
select(),
Set::select, GenericVector::slice,
GenericMatrix::minor, etc.
cmp<ElementType>, the second variant specifies an alternative comparator explicitly.
GenericSet is accepted." If not, any further results are undefined.
An arithmetic series is a special case of a set, it belongs to the GenericSet family.
Since the elements can be easily computed, the series can be encoded in a particulary compact form.
For the ElementType, the arithmetic operators
+, -, +=, -=, ++, -- must be defined.
sequence and series are aliases introduced for convenience.
The boolean template parameter step_equal_1 serves as a compile-time announcement of
a yet more special case, a series with the step 1. Although this case can be obviously covered by a general
series, this specialization allows for additional compiler optimization, taking into account the fact
that the elements build a contigous range of integer values. This is especially important by building
indexed subsets (GenericVector::slice, GenericMatrix::minor, etc.) Hence,
always use sequence when the selected indices are contiguous.
step_equal_1==true) too, but is ignored.
In addition, Series implements the
Random Access Container interface.
std::iostream::failure exception in the constructor,
or via std::iostream::fail() flag in the input operator.