huge commit
- worked on about everything - grid walker using plugable modules - wifi models - new distributions - worked on geometric data-structures - added typesafe timestamps - worked on grid-building - added sensor-classes - added sensor analysis (step-detection, turn-detection) - offline data reader - many test-cases
This commit is contained in:
55
grid/walk/v2/modules/WalkModuleNodeImportance.h
Normal file
55
grid/walk/v2/modules/WalkModuleNodeImportance.h
Normal file
@@ -0,0 +1,55 @@
|
||||
#ifndef WALKMODULENODEIMPORTANCE_H
|
||||
#define WALKMODULENODEIMPORTANCE_H
|
||||
|
||||
#include "WalkModule.h"
|
||||
#include "WalkStateHeading.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 std::pow(prob, 10);
|
||||
//return prob;
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // WALKMODULENODEIMPORTANCE_H
|
||||
Reference in New Issue
Block a user