title: C++: how to calculate RMSE between 2 vectors
body: <p>For example, to calculate the inner product of a vector A, rather than to loop each element in the vector and calculate a sum, we can use  library's inner_product() function:</p>
  
  <pre><code>std::inner_product(A.begin(), A.end(), A.begin(), 0.0);
  </code></pre>
  
  <p>I want to know if there exists a similar piece of code available to calculate the root mean squared error (RMSE) between 2 vectors (with the same size, of course) A and B?</p>
  
  <p>Thanks!</p>