|
Dedekind 0.0.0
A structuralist C++23 Module Library
|
The orbit sequence n ↦ Opⁿ(generator) of a carrier (T, Op), reified as a distinct IsSequence type.
More...


Public Member Functions | |
| constexpr | OrbitSequence (T gen, Op op) |
| Public Member Functions inherited from dedekind::sequences::Path< T, Cardinality, Index > | |
| constexpr Codomain | operator() (Index i) const |
| constexpr T | at (Index i) const |
| constexpr std::size_t | size () const noexcept |
| constexpr auto | begin () const noexcept |
| constexpr auto | end () const noexcept |
| constexpr auto | cardinality () const noexcept |
| The Path is generally viewed as a mapping from N. | |
Additional Inherited Members | |
| Public Types inherited from dedekind::sequences::Path< T, Cardinality, Index > | |
| using | Domain = Index |
| using | Codomain = T |
| using | cardinality_type = Cardinality |
| using | index_type = Index |
| Public Attributes inherited from dedekind::sequences::Path< T, Cardinality, Index > | |
| std::function< T(Index)> | generator |
| The underlying mapping f(n). | |
| std::size_t | extent = 0 |
The orbit sequence n ↦ Opⁿ(generator) of a carrier (T, Op), reified as a distinct IsSequence type.
Derives the sequence shape from Path<T>; the generator function folds Op over copies of the stored generator element. The carrier's periodicity (if any) propagates to this type's is_periodic_sequence_v via the bridge below.
cyclic_order_v<T, Op> = order > 0, the index n is reduced mod order before folding, so at(n) is O(order) rather than O(n) — the orbit only has order distinct values regardless of n.OrbitSequence is the group-flavoured orbit (n ↦ Opⁿ(generator), folding a binary Op). Its dynamical-systems sibling is the unary-iteration sequence n ↦ fⁿ(seed) produced by iterate(seed, f) — e.g.\ mandelbrot_orbit(c) = iterate(0, z↦z²+c) in :numbers::mandelbrot. Both are "iteration sequences"; the sequence-shape concepts (IsBoundedSequence, IsPeriodicSequence, IsAbsorptiveSequence) apply to either regardless of how the orbit is constructed. A future mechanical unification — a typed IterationSequence<f, seed> subsuming both — would let the periodicity bridge fire on Mandelbrot bulbs too; this slice keeps the group-orbit case (where cyclic_order_v gives the period); the unary case for the one step that matters most, the NNO successor, is SuccessorOrbit below.