SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::solver::continuation::CoordinateController< Count > Class Template Referencefinal

Own only the continuation path; a caller promotes physical states after successful correction. More...

#include <controller.hpp>

Collaboration diagram for serif::solver::continuation::CoordinateController< Count >:
[legend]

Public Types

using Coordinates = std::array<double, Count>
 
using Proposal = CoordinateProposal<Count>
 

Public Member Functions

 CoordinateController (Coordinates start, Coordinates target, CoordinateOptions< Count > options={})
 Validate finite endpoints and controls before any proposal can consume work.
 
const Coordinates & start () const noexcept
 Read the original physical coordinates.
 
const Coordinates & target () const noexcept
 Read the exact requested endpoint.
 
const Coordinates & accepted () const noexcept
 Read only successfully corrected coordinates.
 
const CoordinateOptions< Count > & options () const noexcept
 Inspect the selected step controls.
 
const CoordinateCounters & counters () const noexcept
 Include failed attempts in work accounting.
 
ControllerStatus status () const noexcept
 Explain whether another proposal may be requested.
 
const std::optional< Proposal > & pending () const noexcept
 Inspect the outstanding proposal without accepting its coordinates.
 
std::optional< Proposal > propose ()
 Propose one bounded representable change without modifying accepted coordinates.
 
void validate_resolution (std::uint64_t id, AttemptOutcome outcome, std::uint64_t work=0) const
 Validate a resolution before the caller commits any corresponding physical state.
 
void resolve (std::uint64_t id, AttemptOutcome outcome, std::uint64_t work=0)
 Resolve exactly one proposal; clipped rejected increments shrink from the actual distance attempted.
 

Private Member Functions

void validate_options () const
 Reject invalid adaptation, ordering, and work limits as configuration errors.
 
std::optional< std::size_t > select_axis () const noexcept
 Prefer incomplete coordinates by policy, allowing blocked preferred axes to yield to another axis.
 

Private Attributes

Coordinates m_start
 
Coordinates m_target
 
CoordinateOptions< Count > m_options
 
Coordinates m_accepted {}
 
Coordinates m_span {}
 
Coordinates m_step {}
 
std::array< bool, Count > m_blocked {}
 
std::array< std::uint64_t, Count > m_rejections_at_base {}
 
CoordinateCounters m_counters {}
 
ControllerStatus m_status {ControllerStatus::ready}
 
std::optional< Proposal > m_pending
 

Detailed Description

template<std::size_t Count>
class serif::solver::continuation::CoordinateController< Count >

Own only the continuation path; a caller promotes physical states after successful correction.

Member Typedef Documentation

◆ Coordinates

template<std::size_t Count>
using serif::solver::continuation::CoordinateController< Count >::Coordinates = std::array<double, Count>

◆ Proposal

template<std::size_t Count>
using serif::solver::continuation::CoordinateController< Count >::Proposal = CoordinateProposal<Count>

Constructor & Destructor Documentation

◆ CoordinateController()

template<std::size_t Count>
serif::solver::continuation::CoordinateController< Count >::CoordinateController ( Coordinates start,
Coordinates target,
CoordinateOptions< Count > options = {} )
inline

Validate finite endpoints and controls before any proposal can consume work.

Member Function Documentation

◆ accepted()

template<std::size_t Count>
const Coordinates & serif::solver::continuation::CoordinateController< Count >::accepted ( ) const
inlinenodiscardnoexcept

Read only successfully corrected coordinates.

◆ counters()

template<std::size_t Count>
const CoordinateCounters & serif::solver::continuation::CoordinateController< Count >::counters ( ) const
inlinenodiscardnoexcept

Include failed attempts in work accounting.

◆ options()

template<std::size_t Count>
const CoordinateOptions< Count > & serif::solver::continuation::CoordinateController< Count >::options ( ) const
inlinenodiscardnoexcept

Inspect the selected step controls.

◆ pending()

template<std::size_t Count>
const std::optional< Proposal > & serif::solver::continuation::CoordinateController< Count >::pending ( ) const
inlinenodiscardnoexcept

Inspect the outstanding proposal without accepting its coordinates.

◆ propose()

template<std::size_t Count>
std::optional< Proposal > serif::solver::continuation::CoordinateController< Count >::propose ( )
inlinenodiscard

Propose one bounded representable change without modifying accepted coordinates.

◆ resolve()

template<std::size_t Count>
void serif::solver::continuation::CoordinateController< Count >::resolve ( std::uint64_t id,
AttemptOutcome outcome,
std::uint64_t work = 0 )
inline

Resolve exactly one proposal; clipped rejected increments shrink from the actual distance attempted.

◆ select_axis()

template<std::size_t Count>
std::optional< std::size_t > serif::solver::continuation::CoordinateController< Count >::select_axis ( ) const
inlinenodiscardprivatenoexcept

Prefer incomplete coordinates by policy, allowing blocked preferred axes to yield to another axis.

◆ start()

template<std::size_t Count>
const Coordinates & serif::solver::continuation::CoordinateController< Count >::start ( ) const
inlinenodiscardnoexcept

Read the original physical coordinates.

◆ status()

template<std::size_t Count>
ControllerStatus serif::solver::continuation::CoordinateController< Count >::status ( ) const
inlinenodiscardnoexcept

Explain whether another proposal may be requested.

◆ target()

template<std::size_t Count>
const Coordinates & serif::solver::continuation::CoordinateController< Count >::target ( ) const
inlinenodiscardnoexcept

Read the exact requested endpoint.

◆ validate_options()

template<std::size_t Count>
void serif::solver::continuation::CoordinateController< Count >::validate_options ( ) const
inlineprivate

Reject invalid adaptation, ordering, and work limits as configuration errors.

◆ validate_resolution()

template<std::size_t Count>
void serif::solver::continuation::CoordinateController< Count >::validate_resolution ( std::uint64_t id,
AttemptOutcome outcome,
std::uint64_t work = 0 ) const
inline

Validate a resolution before the caller commits any corresponding physical state.

Member Data Documentation

◆ m_accepted

template<std::size_t Count>
Coordinates serif::solver::continuation::CoordinateController< Count >::m_accepted {}
private

◆ m_blocked

template<std::size_t Count>
std::array<bool, Count> serif::solver::continuation::CoordinateController< Count >::m_blocked {}
private

◆ m_counters

template<std::size_t Count>
CoordinateCounters serif::solver::continuation::CoordinateController< Count >::m_counters {}
private

◆ m_options

template<std::size_t Count>
CoordinateOptions<Count> serif::solver::continuation::CoordinateController< Count >::m_options
private

◆ m_pending

template<std::size_t Count>
std::optional<Proposal> serif::solver::continuation::CoordinateController< Count >::m_pending
private

◆ m_rejections_at_base

template<std::size_t Count>
std::array<std::uint64_t, Count> serif::solver::continuation::CoordinateController< Count >::m_rejections_at_base {}
private

◆ m_span

template<std::size_t Count>
Coordinates serif::solver::continuation::CoordinateController< Count >::m_span {}
private

◆ m_start

template<std::size_t Count>
Coordinates serif::solver::continuation::CoordinateController< Count >::m_start
private

◆ m_status

template<std::size_t Count>
ControllerStatus serif::solver::continuation::CoordinateController< Count >::m_status {ControllerStatus::ready}
private

◆ m_step

template<std::size_t Count>
Coordinates serif::solver::continuation::CoordinateController< Count >::m_step {}
private

◆ m_target

template<std::size_t Count>
Coordinates serif::solver::continuation::CoordinateController< Count >::m_target
private

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