Skip to content

Conversation

@akleeman
Copy link
Contributor

@akleeman akleeman commented Jul 2, 2018

This makes it easier to build combinations of spatial metrics.

@akleeman akleeman force-pushed the breakout_covariance_functions branch from c47e49c to 4415ac0 Compare July 2, 2018 19:57
Copy link
Contributor

@benjamin0 benjamin0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment, but lgtm!

// The acos operator doesn't behave well near |1|. acos(1.), for example,
// returns NaN, so here we do some special casing,
double dot_product = x.dot(y) / (x.norm() * y.norm());
if (dot_product > 1. - 1e-16) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we name 1e-16 as "epsilon" somewhere so we can reuse it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants