Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84563 - trunk/boost/geometry/extensions/algebra/algorithms
From: adam.wulkiewicz_at_[hidden]
Date: 2013-05-30 15:57:16


Author: awulkiew
Date: 2013-05-30 15:57:16 EDT (Thu, 30 May 2013)
New Revision: 84563
URL: http://svn.boost.org/trac/boost/changeset/84563

Log:
geometry extensions: Added basic description of some functions.
Text files modified:
   trunk/boost/geometry/extensions/algebra/algorithms/detail.hpp | 9 +++++++++
   1 files changed, 9 insertions(+), 0 deletions(-)

Modified: trunk/boost/geometry/extensions/algebra/algorithms/detail.hpp
==============================================================================
--- trunk/boost/geometry/extensions/algebra/algorithms/detail.hpp (original)
+++ trunk/boost/geometry/extensions/algebra/algorithms/detail.hpp 2013-05-30 15:57:16 EDT (Thu, 30 May 2013)
@@ -14,6 +14,7 @@
 
 namespace detail { namespace algebra {
 
+// Cross 3D of 3 components of Vectors/Quaternion starting from IS1 and IS2 and placing the result starting from D
 template <std::size_t IS1, std::size_t IS2, std::size_t ID, typename S1, typename S2, typename D>
 inline void cross(S1 const& s1, S2 const& s2, D & d)
 {
@@ -22,6 +23,8 @@
     set<ID+2>(d, get<IS1+0>(s1)*get<IS2+1>(s2) - get<IS1+1>(s1)*get<IS2+0>(s2));
 }
 
+// Dot of N components of Vectors/Quaternion starting from IS1 and IS2
+
 template <typename S1, typename S2, std::size_t IS1, std::size_t IS2, std::size_t N>
 struct dot_impl
 {
@@ -63,6 +66,8 @@
     return dot_impl<S1, S2, IS1, IS2, N>::apply(s1, s2);
 }
 
+// Multiplication of N components starting from Ith by Value v
+
 template <typename S, typename T, std::size_t IS, std::size_t I, std::size_t N>
 struct mul_impl
 {
@@ -87,6 +92,8 @@
     return mul_impl<S, T, IS, 0, N>::apply(s, v);
 }
 
+// Normalization of N components starting from Ith
+
 template <std::size_t I, std::size_t N, typename S>
 inline static void normalize(S & s)
 {
@@ -97,6 +104,8 @@
         mul<I, N>(s, 1.0f / ::sqrt(lsqr));
 }
 
+// Square matrix * Vector of the same dimension
+
 template <typename M, typename V, typename VD, std::size_t I, std::size_t N>
 struct matrix_mul_row_impl
 {


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