Boost LA

dot

#include <boost/la/vector_dot.hpp>

namespace
boost
    {
    namespace
    la
        {
        //Only enabled if:
        //  is_vector<A>::value && is_vector<B>::value &&
        //  vector_traits<A>::dim==vector_traits<B>::dim
        template <class A,class B>
        typename deduce_scalar<A,B>::type
        dot( A const & a, B const & b );
        }
    }

Returns:

The dot product of the vectors a and b.

Required access:

a:ir, b:ir.