|
CDT++ 1.0.0-rc3
Causal Dynamical Triangulations in C++
|
Queue and execute requested moves against a three-dimensional manifold while tracking attempted and successful transitions. More...
#include <Move_command.hpp>
Public Member Functions | |
| MoveCommand ()=delete | |
| Remove default ctor. | |
| MoveCommand (ManifoldType t_manifold) | |
| MoveCommand ctor. | |
| auto | attempted () const noexcept -> Counter const & |
| Attempted moves by MoveCommand. | |
| void | enqueue (move_tracker::MoveType const t_move) |
| Push a Pachner move onto the move queue. | |
| template<std::uniform_random_bit_generator Generator> | |
| void | execute (Generator &generator) |
| Execute all moves in the queue on the manifold. | |
| auto | failed () const noexcept -> Counter const & |
| Failed moves by MoveCommand. | |
| void | print_attempts () const |
| Print attempted moves. | |
| void | print_errors () const |
| Print move errors. | |
| void | print_successful () const |
| Print successful moves. | |
| void | reset_counters () |
| Reset counters. | |
| auto | result () &&noexcept -> ManifoldType |
| Consume the result manifold. | |
| auto | result () &noexcept -> ManifoldType & |
| Access the result manifold without transferring ownership. | |
| auto | result () const &&-> ManifoldType=delete |
| auto | result () const &noexcept -> ManifoldType const & |
| Access the result manifold without transferring ownership. | |
| auto | size () const noexcept |
| The number of moves on the queue. | |
| auto | succeeded () const noexcept -> Counter const & |
| Successful moves by MoveCommand. | |
Static Public Member Functions | |
| template<std::uniform_random_bit_generator Generator> | |
| static auto | apply_random_move (ManifoldType const &manifold, move_tracker::MoveType const move, Generator &generator) -> MoveResult |
| Apply one queued move using the caller-owned random stream. | |
Queue and execute requested moves against a three-dimensional manifold while tracking attempted and successful transitions.
Definition at line 25 of file Move_command.hpp.
|
inlineexplicit |
MoveCommand ctor.
| t_manifold | The manifold to perform moves on |
The manifold is copied or moved by value so the caller's source is not modified. Each completed move is committed independently; a queue execution is not one transaction.
Definition at line 69 of file Move_command.hpp.
|
inlinestaticnodiscard |
Apply one queued move using the caller-owned random stream.
| Generator | Uniform random bit generator type. |
| manifold | Source manifold, which remains unchanged. |
| move | Pachner move to attempt. |
| generator | Generator advanced by stochastic move selection. |
Definition at line 190 of file Move_command.hpp.
Referenced by execute().
|
inlinenodiscardnoexcept |
Attempted moves by MoveCommand.
Definition at line 100 of file Move_command.hpp.
References attempted().
Referenced by attempted().
|
inline |
Push a Pachner move onto the move queue.
| t_move | The move to add |
Definition at line 131 of file Move_command.hpp.
|
inline |
Execute all moves in the queue on the manifold.
Completed moves remain committed. If an exception escapes while attempting the current move, its attempted counter has been incremented, the move remains queued, earlier moves and their counters remain committed, and generator may already have advanced.
| Generator | Uniform random bit generator type |
| generator | Generator advanced by stochastic move selection |
Definition at line 150 of file Move_command.hpp.
References apply_random_move(), and result().
|
inlinenodiscardnoexcept |
Failed moves by MoveCommand.
Definition at line 114 of file Move_command.hpp.
|
inline |
Print attempted moves.
Definition at line 213 of file Move_command.hpp.
|
inline |
Print move errors.
Definition at line 246 of file Move_command.hpp.
|
inline |
Print successful moves.
Definition at line 229 of file Move_command.hpp.
|
inline |
Reset counters.
Definition at line 120 of file Move_command.hpp.
|
inlinenodiscardnoexcept |
Consume the result manifold.
Definition at line 91 of file Move_command.hpp.
|
inlinenodiscardnoexcept |
Access the result manifold without transferring ownership.
Definition at line 77 of file Move_command.hpp.
Referenced by execute().
|
inlinenodiscardnoexcept |
Access the result manifold without transferring ownership.
Definition at line 84 of file Move_command.hpp.
|
inlinenodiscardnoexcept |
The number of moves on the queue.
Definition at line 138 of file Move_command.hpp.
|
inlinenodiscardnoexcept |
Successful moves by MoveCommand.
Definition at line 107 of file Move_command.hpp.