title: c++ Armadillo: what does "norm_dot" do?
body: <p>What is this function doing? It states it is the normalized version of the dot product, which I presumed meant</p>
  
  <pre><code>func norm_dot(A,B) = dot(A,B) / ||B||^2
  </code></pre>
  
  <p>but </p>
  
  <pre><code>vec A(3,1) ; A.randu() ;
  vec B(3,1) ; B.randu() ;
  
  double dot1 = dot(A,B) /  arma::accu(arma::square(B)) ;
  
  double dot2 = norm_dot(A,B) ;
  </code></pre>
  
  <p>dot1 != dot2</p>