Skip to content

Instantly share code, notes, and snippets.

@dadeba
Created January 3, 2012 21:55
Show Gist options
  • Save dadeba/1557145 to your computer and use it in GitHub Desktop.
Save dadeba/1557145 to your computer and use it in GitHub Desktop.
Compute the average of relative error between 3D vectors a0 & a1 in Eigen
// a0 and a1 are row-major Array
Vector3f a_err = (std::abs((a0 - a1)/a0)).colwise().sum()/a0.rows();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment