CDT++ 1.0.0-rc3
Causal Dynamical Triangulations in C++
Loading...
Searching...
No Matches
cdt::MoveRunCadence Class Reference

Positive pass count and checkpoint interval for a move run. More...

#include <Move_run.hpp>

Collaboration diagram for cdt::MoveRunCadence:

Public Member Functions

 MoveRunCadence ()=default
 Construct the valid single-pass default cadence.
constexpr auto checkpoint () const noexcept
constexpr auto passes () const noexcept

Static Public Member Functions

static auto parse (Int_precision const passes, Int_precision const checkpoint) noexcept -> std::expected< MoveRunCadence, MoveRunCadenceError >
 Parse raw counts into a cadence that proves positivity.

Detailed Description

Positive pass count and checkpoint interval for a move run.

Once parsed, the orchestration core can use both values without repeating positivity checks.

Definition at line 36 of file Move_run.hpp.

Member Function Documentation

◆ checkpoint()

auto cdt::MoveRunCadence::checkpoint ( ) const
inlinenodiscardconstexprnoexcept
Returns
The positive number of passes between checkpoint events.

Definition at line 80 of file Move_run.hpp.

Referenced by parse().

◆ parse()

auto cdt::MoveRunCadence::parse ( Int_precision const passes,
Int_precision const checkpoint ) -> std::expected< MoveRunCadence, MoveRunCadenceError >
inlinestaticnodiscardnoexcept

Parse raw counts into a cadence that proves positivity.

Parameters
passesNumber of passes; must be greater than zero.
checkpointNumber of passes between checkpoint events; must be greater than zero.
Returns
A cadence on success, or MoveRunCadenceError::NONPOSITIVE_PASSES when passes is nonpositive, otherwise MoveRunCadenceError::NONPOSITIVE_CHECKPOINT when checkpoint is nonpositive. The passes error takes precedence when both are invalid.

Definition at line 61 of file Move_run.hpp.

References checkpoint(), cdt::NONPOSITIVE_CHECKPOINT, cdt::NONPOSITIVE_PASSES, and passes().

Referenced by cdt::detail::parse_move_run_cadence().

◆ passes()

auto cdt::MoveRunCadence::passes ( ) const
inlinenodiscardconstexprnoexcept
Returns
The positive number of passes in a run.

Definition at line 77 of file Move_run.hpp.

Referenced by parse().


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