LatNet Builder Manual
2.0.1-11
Software Package for Constructing Highly Uniform Point Sets
|
A CoordinateSets for coordinates within a given range. More...
#include <CoordinateSets.h>
Classes | |
class | const_iterator |
An iterator class used internaly by the FromRange class. More... | |
Public Member Functions | |
FromRanges (Coordinates::size_type minOrder, Coordinates::size_type maxOrder, Coordinates::value_type minCoord, Coordinates::value_type maxCoord) | |
Constructs a set of all subsets of \(\{\mathtt{minCoord}, \dots, \mathtt{maxCoord}\}\) with minimum and maximum cardinality specified by minOrder and maxOrder . More... | |
FromRanges () | |
Constructs an empty set of coordinate sets. | |
void | includeOrder (Coordinates::size_type order, Coordinates::value_type minCoord, Coordinates::value_type maxCoord) |
Include all subsets \(\mathfrak u\) of \(\{\mathtt{minCoord}, \dots, \mathtt{maxCoord}\}\) of order \(|\mathfrak u| = \mathtt{order}\). More... | |
void | excludeOrder (Coordinates::size_type order) |
Removes the element associated with order from the list of of intervals to generate from. More... | |
const_iterator | begin () const |
Returns a const_iterator pointing to the first element in the sequence of coordinates sets that the object contains. More... | |
const_iterator | end () const |
Returns a const_iterator pointing past the last element in the seq. More... | |
A CoordinateSets for coordinates within a given range.
This contains ways to build all subsets of coordinates of a given size in an interval \(\{\mathtt{minCoord}, \dots, \mathtt{maxCoord}\}\). The intended usage of this class is to generate subsets of different orders for a single interval.
This class keeps a map of intervals indiced with the order that will be used to generate subsets from them. This means that this class only keeps one interval for each order.
When you iterate through this class, it generates the next subset of coordinates in the interval associated with the current order. If there is none left, it moves on to the next order and starts generating subsets from the interval associated with this order. It is not possible to generate coordinate sets of the same order for different intervals with the same instance of this class.
LatticeTester::CoordinateSets::FromRanges::FromRanges | ( | Coordinates::size_type | minOrder, |
Coordinates::size_type | maxOrder, | ||
Coordinates::value_type | minCoord, | ||
Coordinates::value_type | maxCoord | ||
) |
Constructs a set of all subsets of \(\{\mathtt{minCoord}, \dots, \mathtt{maxCoord}\}\) with minimum and maximum cardinality specified by minOrder
and maxOrder
.
For example, to select all 1, 2, and 3-tuples over coordinates 2, 3, 4, one may use the declaration FromRanges range(1, 3, 2, 4)
; this gives the sets range = {{2}, {3}, {4}, {2, 3}, {2, 4}, {3, 4}, {2, 3, 4}}
.
|
inline |
Returns a const_iterator pointing to the first element in the sequence of coordinates sets that the object contains.
It can then be used to cycle through all the sets with ++
.
|
inline |
Returns a const_iterator pointing past the last element in the seq.
It can then be used to cycle through all the sets with --
.
void LatticeTester::CoordinateSets::FromRanges::excludeOrder | ( | Coordinates::size_type | order | ) |
Removes the element associated with order
from the list of of intervals to generate from.
This means that no coordinate set \(\mathfrak u\) of order \(|\mathfrak u| = \mathtt{order}\) will be returned by the iterator until a new interval is given to the object for this order.
void LatticeTester::CoordinateSets::FromRanges::includeOrder | ( | Coordinates::size_type | order, |
Coordinates::value_type | minCoord, | ||
Coordinates::value_type | maxCoord | ||
) |
Include all subsets \(\mathfrak u\) of \(\{\mathtt{minCoord}, \dots, \mathtt{maxCoord}\}\) of order
\(|\mathfrak u| = \mathtt{order}\).
For example, calling includeOrder(3, 1, 5)
causes all 3-tuples over coordinates \(1, \dots, 5\) to be included. If order = 0
(corresponding to the empty set), minCoord
and maxCoord
are ignored.
Except for the case where order = 0
, an exception is thrown if \(\mathtt{maxCoord} < \mathtt{minCoord} + \mathtt{order} - 1\).
If the object already contains an interval for size order
, this interval is overwritten by the new one.