- 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
56 lines
1.1 KiB
C++
56 lines
1.1 KiB
C++
#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
|