|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r52274 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2009-04-08 20:48:56
Author: jewillco
Date: 2009-04-08 20:48:56 EDT (Wed, 08 Apr 2009)
New Revision: 52274
URL: http://svn.boost.org/trac/boost/changeset/52274
Log:
Added dot product
Text files modified:
trunk/boost/graph/topology.hpp | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
Modified: trunk/boost/graph/topology.hpp
==============================================================================
--- trunk/boost/graph/topology.hpp (original)
+++ trunk/boost/graph/topology.hpp 2009-04-08 20:48:56 EDT (Wed, 08 Apr 2009)
@@ -114,6 +114,13 @@
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];
};
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk