This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Indoor/grid/walk/v2/modules/WalkModuleNodeImportance.h
FrankE 82f8828a04 added new sanity checks and compile-time assertions to prevent errors
fixed stair-building issue
new test-cases
added elevator support
fixed/improved some walker modules
2016-09-10 15:12:39 +02:00

56 lines
1.1 KiB
C++

#ifndef WALKMODULENODEIMPORTANCE_H
#define WALKMODULENODEIMPORTANCE_H
#include "WalkModule.h"
#include "WalkStateHeading.h"
#include "../../../../Assertions.h"
/**
* favor edges based on the importance-factor of the next node.
* @see struct GridNodeImportance
*/
template <typename Node, typename WalkState> class WalkModuleNodeImportance : public WalkModule<Node, WalkState> {
private:
public:
/** ctor */
WalkModuleNodeImportance() {
;
}
virtual void updateBefore(WalkState& state) override {
(void) state;
}
virtual void updateAfter(WalkState& state, const Node& startNode, const Node& endNode) override {
(void) state;
(void) startNode;
(void) endNode;
}
virtual void step(WalkState& state, const Node& curNode, const Node& nextNode) override {
(void) state;
(void) curNode;
(void) nextNode;
}
double getProbability(const WalkState& state, const Node& startNode, const Node& curNode, const Node& potentialNode) const override {
(void) state;
(void) startNode;
(void) curNode;
const double prob = potentialNode.getNavImportance();
return prob;
}
};
#endif // WALKMODULENODEIMPORTANCE_H