Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functions for individual covariance functions. #29

Merged
merged 2 commits into from
Jul 3, 2018

Conversation

akleeman
Copy link
Collaborator

@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
Collaborator 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