93 const std::vector<const AState*>& seededStates,
95 std::vector<AResult>& results)
97 B2ASSERT(
"Expected relation to be sorted",
98 std::is_sorted(stateRelations.begin(), stateRelations.end()));
100 std::vector<const AState*> path;
101 for (
const AState* state : seededStates) {
102 B2DEBUG(25,
"Starting with new seed...");
103 path.push_back(state);
106 B2DEBUG(25,
"... finished with seed");
108 assert(path.empty());
113 std::vector<const AState*>& path,
115 std::vector<AResult>& results)
119 const AState* currentState = path.back();
121 std::equal_range(stateRelations.begin(), stateRelations.end(), currentState);
123 std::vector<AState*> childStates;
125 AState* childState = continuation.getTo();
126 childStates.push_back(childState);
131 const std::vector<const AState*>& constPath = path;
134 if (childStates.empty()) {
135 B2DEBUG(25,
"Terminating this route, as there are no possible child states.");
136 results.emplace_back(path);
141 B2DEBUG(25,
"Having found " << childStates.size() <<
" child states.");
142 for (
const AState* childState : childStates) {
143 if (std::count(path.begin(), path.end(), childState)) {
148 path.push_back(childState);
void apply(const std::vector< const AState * > &seededStates, const std::vector< Relation< AState > > &stateRelations, std::vector< AResult > &results) override
Main function of this findlet: traverse a tree starting from a given seed states.