We should consider requiring every decision to implement the following methods
class ArrayDecisionNode : public ArrayNode, public DecisionNode {
public:
// override the current state with a new one (specified as a flattened array).
void assign(State& state, std::span<const double> values) const = 0;
// override specific indices of the array
void set_values(State& state, std::span<const std::tuple<ssize_t, double>> values) const = 0;
};
the responsibility would be on the caller to ensure the given state/changes result in a valid state for the decision, but each implementation should assert(...) for correctness.
We should consider requiring every decision to implement the following methods
the responsibility would be on the caller to ensure the given state/changes result in a valid state for the decision, but each implementation should
assert(...)for correctness.