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

Remove 'almost_equal' from 'VectorArrayInterface' ... #143

Closed
sdrave opened this Issue Sep 17, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@sdrave
Member

sdrave commented Sep 17, 2015

... or provide a default implementation in terms of norms.

Right now, the semantics of almost_equal is to do a float_cmp for each component pair of the vectors. I see no reason, why it would not be ok to do

||u - v|| <= rtol * ||v|| + atol

instead, where the norm could be 'sup', 'l2', or 'l1'.

Right now, we only use almost_equal only in trivial_basis_extension and the tests, anyhow.

I would propose to completely remove almost_equal from the interface and add a free function almost_equal which can also be given a scalar product as norm.

@sdrave sdrave added this to the 0.4 milestone Sep 17, 2015

@ftalbrecht

This comment has been minimized.

Member

ftalbrecht commented Sep 17, 2015

Sounds reasonable. In a way, the old behaviour is more like a float_cmp extension for vectors.

How did you come across this? Do you have an application for an almost equal measured in a specific norm?

Anyway, I have no objections...

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