![]() |
JaffarPlus
High-performance best-first search optimizer for tool-assisted speedruns
|
A collection of input indexes whose availability is gated by a set of conditions. More...
#include <inputSet.hpp>
Public Types | |
| typedef size_t | inputIndex_t |
| Type used to index an input. | |
Public Member Functions | |
| bool | evaluate () const |
| Evaluates the input set by checking all of its conditions. | |
| void | addInput (const inputIndex_t inputIdx) |
| Adds an input index to this set. | |
| void | addCondition (std::unique_ptr< Condition > condition) |
| Adds a condition that must hold for this set to be active. | |
| const std::unordered_set< inputIndex_t > & | getInputIndexes () const |
| Returns the input indexes contained in this set. | |
| bool | getStopInputEvaluationFlag () const |
| Returns whether this set stops evaluation of subsequent input sets. | |
| void | setStopInputEvaluationFlag (const bool stopInputEvaluation) |
| Sets whether this set stops evaluation of subsequent input sets. | |
Private Attributes | |
| std::unordered_set< std::unique_ptr< Condition > > | _conditions |
| Conditions that must all hold for this input set to be active. | |
| std::unordered_set< inputIndex_t > | _inputIndexes |
| Input indexes belonging to this set. | |
| bool | _stopInputEvaluation = false |
| If true, input sets after this one are not evaluated. | |
A collection of input indexes whose availability is gated by a set of conditions.
An input set holds a group of input indexes together with conditions that must all evaluate to true (logical AND) for the set to be active. It also carries a flag that, when set, stops the evaluation of subsequent input sets.
Definition at line 25 of file inputSet.hpp.
| typedef size_t jaffarPlus::InputSet::inputIndex_t |
Type used to index an input.
Definition at line 29 of file inputSet.hpp.
|
inline |
Adds a condition that must hold for this set to be active.
| condition | The condition to add. |
Definition at line 49 of file inputSet.hpp.
|
inline |
Adds an input index to this set.
| inputIdx | The input index to add. |
Definition at line 47 of file inputSet.hpp.
|
inline |
Evaluates the input set by checking all of its conditions.
Definition at line 39 of file inputSet.hpp.
|
inline |
Returns the input indexes contained in this set.
Definition at line 51 of file inputSet.hpp.
|
inline |
Returns whether this set stops evaluation of subsequent input sets.
Definition at line 53 of file inputSet.hpp.
|
inline |
Sets whether this set stops evaluation of subsequent input sets.
| stopInputEvaluation | The flag value. |
Definition at line 55 of file inputSet.hpp.
|
private |
Conditions that must all hold for this input set to be active.
Definition at line 62 of file inputSet.hpp.
|
private |
Input indexes belonging to this set.
Definition at line 66 of file inputSet.hpp.
|
private |
If true, input sets after this one are not evaluated.
Definition at line 70 of file inputSet.hpp.