3.4. orbit.hpp¶
Full path: orbit.hpp
-
template<template<typename> class
T
>
conceptInOrbitHandler
¶ - Notation
-
T<value_type>
handler
¶
Valid Expressions
-
T<value_type>
-
template<typename
ValueType
>
classInOrbitHandlerBitset
¶ Models
InOrbitHandler
.
-
template<typename
ValueType
>
classInOrbitHandlerVector
¶ Models
InOrbitHandler
. .. function:: ValueType position(ValueType u) constRequires the clear method to have been called. Requires either
u
has been added or was the element given to the latest clear.- returns
the position of
u
in the orbit. The initial orbit element is at position 0.
-
template<typename
ValueType
, template<typename> classInOrbitHandlerT
= InOrbitHandlerBitset>
classOrbit
¶ Requires
InOrbitHandler<InOrbitHandlerT>
.An orbit calculator, which also acts as a range of the calculated orbit elements.
-
Orbit
(ValueType n, ValueType w)¶ Construct with a maximum element size
n
and an initial orbit elementw
.
-
template<typename
GenPtrIter
, typenameOnNewElement
, typenameOnDupElement
>
boolupdate
(const GenPtrIter &first, const GenPtrIter &lastOld, const GenPtrIter &lastNew, OnNewElement onNewElement, OnDupElement onDupElement)¶ Requires the iterators to iterator over pointer-like values to permutations (
Permutation
). That is,Permutation<typename std::pointer_traits<typename std::iterator_traits<GenPtrIter>::value_type>::element_type>
.Given two ranges of generators,
first
tolastOld
andlastOld
tolastNew
, extend the current orbit using first the new generators,lastOld
tolastNew
, and then with all generators.When a new orbit element
o
is found, by mapping a known orbit elementw
through a permutation pointed to by an iteratorit
, thenonNewElement(w, o, it)
is called. Similarly, wheno
is already in the orbit thenonDupElement(w, o, it)
is called.
-
auto
begin
() const¶ - Returns
an iterator to the first orbit element.
-
auto
end
() const¶ - Returns
an iterator to past-the-end of the orbit.
Todo
document
-
ValueType
position
(ValueType u) const¶ Requires
InOrbitHandlerT
to have a position method.Returns the position of
u
in the orbit (starting from 0). See alsoInOrbitHandlerVector::position
.
-
-
template<typename
GenPtrIter
, typenameOnNewElement
, typenameOnDupElement
>
voidorbit
(std::size_t w, const GenPtrIter &first, const GenPtrIter &last, std::size_t n, OnNewElement onNewElement, OnDupElement onDupElement)¶ -
template<typename
GenPtrIter
, typenameOnNewElement
, typenameOnDupElement
>
voidorbit
(std::size_t w, const GenPtrIter &first, const GenPtrIter &last, OnNewElement onNewElement, OnDupElement onDupElement)¶ -
template<typename
GenPtrIter
, typenameOnNewElement
>
voidorbit
(std::size_t w, const GenPtrIter &first, const GenPtrIter &last, OnNewElement onNewElement)¶ Calculate the orbit of
w
under the non-empty range of generatorsfirst
tolast
. SeeOrbit::update
for the details offirst
,last
,onNewElement
, andonDupElement
. Note though thatonNewElement(w, w, last)
is called in the beginning in addition. The overload withoutn
requiresSizeAwarePermutation<decltype(**first)>
and setsn = perm_group::degree(**first)
.