added new data-structures

added new test-cases
added flexible dijkstra calculation
added debugging log
modified: plotting, grid-generation, grid-importance,
refactoring
This commit is contained in:
2016-01-22 18:47:06 +01:00
parent 12084fe147
commit cdf97322f8
21 changed files with 720 additions and 141 deletions

View File

@@ -24,6 +24,18 @@ struct Point3 {
Point3 operator * (const float v) const {return Point3(v*x, v*y, v*z);}
Point3& operator /= (const float v) {x/=v; y/=v; z/=v; return *this;}
float length() const {return std::sqrt(x*x + y*y + z*z);}
float length(const float norm) const {
return std::pow(
(std::pow(std::abs(x),norm) +
std::pow(std::abs(y),norm) +
std::pow(std::abs(z),norm)
), 1.0f/norm);
}
};
#endif // POINT3_H