|
CDT++
Causal Dynamical Triangulations in C++
|
Collaboration diagram for MoveCommand< ManifoldType, ExpectedType, FunctionType >:Public Member Functions | |
| MoveCommand ()=delete | |
| Remove default ctor. | |
| MoveCommand (ManifoldType t_manifold) | |
| MoveCommand ctor. | |
| void | enqueue (move_tracker::move_type const t_move) |
| Push a Pachner move onto the move queue. | |
| void | execute () |
| Execute all moves in the queue on the manifold. | |
| auto | get_attempted () const -> Counter const & |
| Attempted moves by MoveCommand. | |
| auto | get_const_results () const -> ManifoldType const & |
| A read-only reference to the manifold. | |
| auto | get_failed () const -> Counter const & |
| Failed moves by MoveCommand. | |
| auto | get_results () -> ManifoldType & |
| Results of the moves invoked by MoveCommand. | |
| auto | get_succeeded () const |
| Successful 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 | size () const |
| The number of moves on the queue. | |
Static Public Member Functions | |
| static auto | as_move_function (move_tracker::move_type const move) -> FunctionType |
| Execute a move function on a manifold. | |
Private Types | |
| using | Counter = move_tracker::MoveTracker< ManifoldType > |
| using | Queue = std::deque< move_tracker::move_type > |
Private Attributes | |
| Counter | m_attempted |
| The counter of attempted moves. | |
| Counter | m_failed |
| The counter of failed moves. | |
| ManifoldType | m_manifold |
| The manifold on which to perform moves. | |
| Queue | m_moves |
| The queue of moves to perform. | |
| Queue | m_moves_to_retry |
| The queue of moves to retry. | |
| Counter | m_succeeded |
| The counter of successful moves. | |
Definition at line 20 of file Move_command.hpp.
|
private |
Definition at line 23 of file Move_command.hpp.
|
private |
Definition at line 22 of file Move_command.hpp.
|
inlineexplicit |
MoveCommand ctor.
| t_manifold | The manifold to perform moves on |
The manifold to perform moves upon should be copied by value into the MoveCommand to ensure moves are executed atomically and either succeed or fail and can be discarded without affecting the original manifold.
Definition at line 68 of file Move_command.hpp.
|
inlinestatic |
Execute a move function on a manifold.
| move | The move to execute |
Definition at line 182 of file Move_command.hpp.
Referenced by MoveCommand< ManifoldType, ExpectedType, FunctionType >::execute().
|
inline |
Push a Pachner move onto the move queue.
| t_move | The move to add |
Definition at line 123 of file Move_command.hpp.
References MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_moves.
Referenced by MoveStrategy< Strategies::METROPOLIS, ManifoldType >::initialize(), and MoveStrategy< Strategies::MOVE_ALWAYS, ManifoldType >::operator()().
|
inline |
Execute all moves in the queue on the manifold.
Definition at line 136 of file Move_command.hpp.
References apply_move(), MoveCommand< ManifoldType, ExpectedType, FunctionType >::as_move_function(), MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_attempted, MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_failed, MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_manifold, MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_moves, MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_moves_to_retry, MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_succeeded, MoveCommand< ManifoldType, ExpectedType, FunctionType >::print_attempts(), and MoveCommand< ManifoldType, ExpectedType, FunctionType >::print_errors().
Referenced by MoveStrategy< Strategies::METROPOLIS, ManifoldType >::initialize(), and MoveStrategy< Strategies::MOVE_ALWAYS, ManifoldType >::operator()().
|
inline |
Attempted moves by MoveCommand.
Definition at line 88 of file Move_command.hpp.
References MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_attempted.
Referenced by MoveStrategy< Strategies::METROPOLIS, ManifoldType >::initialize(), and MoveStrategy< Strategies::MOVE_ALWAYS, ManifoldType >::operator()().
|
inline |
A read-only reference to the manifold.
Definition at line 75 of file Move_command.hpp.
References MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_manifold.
Referenced by MoveStrategy< Strategies::MOVE_ALWAYS, ManifoldType >::operator()().
|
inline |
Failed moves by MoveCommand.
Definition at line 104 of file Move_command.hpp.
References MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_failed.
Referenced by MoveStrategy< Strategies::METROPOLIS, ManifoldType >::initialize(), and MoveStrategy< Strategies::MOVE_ALWAYS, ManifoldType >::operator()().
|
inline |
Results of the moves invoked by MoveCommand.
Definition at line 83 of file Move_command.hpp.
References MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_manifold.
Referenced by MoveStrategy< Strategies::METROPOLIS, ManifoldType >::initialize(), and MoveStrategy< Strategies::MOVE_ALWAYS, ManifoldType >::operator()().
|
inline |
Successful moves by MoveCommand.
Definition at line 96 of file Move_command.hpp.
References MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_succeeded.
Referenced by MoveStrategy< Strategies::METROPOLIS, ManifoldType >::initialize(), and MoveStrategy< Strategies::MOVE_ALWAYS, ManifoldType >::operator()().
|
inline |
Print attempted moves.
Definition at line 198 of file Move_command.hpp.
References move_tracker::MoveTracker< ManifoldType >::eight_two_moves(), move_tracker::MoveTracker< ManifoldType >::four_four_moves(), move_tracker::MoveTracker< ManifoldType >::four_six_moves(), move_tracker::MoveTracker< ManifoldType >::four_two_moves(), MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_attempted, move_tracker::MoveTracker< ManifoldType >::six_four_moves(), move_tracker::MoveTracker< ManifoldType >::six_two_moves(), move_tracker::MoveTracker< ManifoldType >::three_three_moves(), move_tracker::MoveTracker< ManifoldType >::three_two_moves(), move_tracker::MoveTracker< ManifoldType >::two_eight_moves(), move_tracker::MoveTracker< ManifoldType >::two_four_moves(), move_tracker::MoveTracker< ManifoldType >::two_six_moves(), and move_tracker::MoveTracker< ManifoldType >::two_three_moves().
Referenced by MoveCommand< ManifoldType, ExpectedType, FunctionType >::execute().
|
inline |
Print move errors.
Definition at line 267 of file Move_command.hpp.
References move_tracker::MoveTracker< ManifoldType >::eight_two_moves(), move_tracker::MoveTracker< ManifoldType >::four_four_moves(), move_tracker::MoveTracker< ManifoldType >::four_six_moves(), move_tracker::MoveTracker< ManifoldType >::four_two_moves(), MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_failed, move_tracker::MoveTracker< ManifoldType >::moves_view(), move_tracker::MoveTracker< ManifoldType >::six_four_moves(), move_tracker::MoveTracker< ManifoldType >::six_two_moves(), move_tracker::MoveTracker< ManifoldType >::three_three_moves(), move_tracker::MoveTracker< ManifoldType >::three_two_moves(), move_tracker::MoveTracker< ManifoldType >::two_eight_moves(), move_tracker::MoveTracker< ManifoldType >::two_four_moves(), move_tracker::MoveTracker< ManifoldType >::two_six_moves(), and move_tracker::MoveTracker< ManifoldType >::two_three_moves().
Referenced by MoveCommand< ManifoldType, ExpectedType, FunctionType >::execute(), and MoveStrategy< Strategies::METROPOLIS, ManifoldType >::initialize().
|
inline |
Print successful moves.
Definition at line 231 of file Move_command.hpp.
References move_tracker::MoveTracker< ManifoldType >::eight_two_moves(), move_tracker::MoveTracker< ManifoldType >::four_four_moves(), move_tracker::MoveTracker< ManifoldType >::four_six_moves(), move_tracker::MoveTracker< ManifoldType >::four_two_moves(), MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_succeeded, move_tracker::MoveTracker< ManifoldType >::six_four_moves(), move_tracker::MoveTracker< ManifoldType >::six_two_moves(), move_tracker::MoveTracker< ManifoldType >::three_three_moves(), move_tracker::MoveTracker< ManifoldType >::three_two_moves(), move_tracker::MoveTracker< ManifoldType >::two_eight_moves(), move_tracker::MoveTracker< ManifoldType >::two_four_moves(), move_tracker::MoveTracker< ManifoldType >::two_six_moves(), and move_tracker::MoveTracker< ManifoldType >::two_three_moves().
Referenced by MoveStrategy< Strategies::METROPOLIS, ManifoldType >::initialize().
|
inline |
Reset counters.
Definition at line 112 of file Move_command.hpp.
References MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_attempted, MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_failed, MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_succeeded, and move_tracker::MoveTracker< ManifoldType >::reset().
Referenced by MoveStrategy< Strategies::METROPOLIS, ManifoldType >::initialize().
|
inline |
The number of moves on the queue.
Definition at line 131 of file Move_command.hpp.
References MoveCommand< ManifoldType, ExpectedType, FunctionType >::m_moves.
|
private |
The counter of attempted moves.
Definition at line 43 of file Move_command.hpp.
Referenced by MoveCommand< ManifoldType, ExpectedType, FunctionType >::execute(), MoveCommand< ManifoldType, ExpectedType, FunctionType >::get_attempted(), MoveCommand< ManifoldType, ExpectedType, FunctionType >::print_attempts(), and MoveCommand< ManifoldType, ExpectedType, FunctionType >::reset_counters().
|
private |
The counter of failed moves.
Definition at line 53 of file Move_command.hpp.
Referenced by MoveCommand< ManifoldType, ExpectedType, FunctionType >::execute(), MoveCommand< ManifoldType, ExpectedType, FunctionType >::get_failed(), MoveCommand< ManifoldType, ExpectedType, FunctionType >::print_errors(), and MoveCommand< ManifoldType, ExpectedType, FunctionType >::reset_counters().
|
private |
The manifold on which to perform moves.
Definition at line 28 of file Move_command.hpp.
Referenced by MoveCommand< ManifoldType, ExpectedType, FunctionType >::execute(), MoveCommand< ManifoldType, ExpectedType, FunctionType >::get_const_results(), and MoveCommand< ManifoldType, ExpectedType, FunctionType >::get_results().
|
private |
The queue of moves to perform.
Definition at line 33 of file Move_command.hpp.
Referenced by MoveCommand< ManifoldType, ExpectedType, FunctionType >::enqueue(), MoveCommand< ManifoldType, ExpectedType, FunctionType >::execute(), and MoveCommand< ManifoldType, ExpectedType, FunctionType >::size().
|
private |
The queue of moves to retry.
Definition at line 38 of file Move_command.hpp.
Referenced by MoveCommand< ManifoldType, ExpectedType, FunctionType >::execute().
|
private |
The counter of successful moves.
Definition at line 48 of file Move_command.hpp.
Referenced by MoveCommand< ManifoldType, ExpectedType, FunctionType >::execute(), MoveCommand< ManifoldType, ExpectedType, FunctionType >::get_succeeded(), MoveCommand< ManifoldType, ExpectedType, FunctionType >::print_successful(), and MoveCommand< ManifoldType, ExpectedType, FunctionType >::reset_counters().