2
0
mirror of https://github.com/boostorg/graph.git synced 2026-02-01 08:32:11 +00:00

Added dot product

[SVN r52274]
This commit is contained in:
Jeremiah Willcock
2009-04-09 00:48:56 +00:00
parent 0f708da558
commit 39ffc159eb

View File

@@ -114,6 +114,13 @@ class convex_topology
return result;
}
friend double dot(const point_difference& a, const point_difference& b) {
double result = 0;
for (std::size_t i = 0; i < Dims; ++i)
result += a[i] * b[i];
return result;
}
private:
double values[Dims];
};