Closed mbudisic closed 9 years ago
But at this point no other class needs it, right? I'd rather keep it out of +util
until we need it. It also doesn't follow the naming convention: it has a capital letter, so if you move it to +util
better rename it areequal
. But even then I don't love the name, since it doesn't really say what it does. How about fuzzyeq
, since eq
is the name of the equal operator in Matlab?
All valid points...
Looks good. Closing (reopen if you still need to do things).
areEqual
compares two float numbers up to D nearest float-representable numbers. It was originally written as a C++ function but it does not conform to how we usually write them.First of all, it is not a
_helper.cpp
as this was a core functionality to begin with. I have re-written it in Matlab this morning so nowareEqual.m
does run fine without MEX compiled version (although potentially slower).To do:
areEqual
to braidlab.util as it is not braid specific and it might be something we'd like to use outside justbraid
class. This means thatMakefile
and invocations should be changed to reflect this.areEqual.m
withareEqual.cpp
. This might be tricky to write as it is really about how "tightly" two precision-testing functions are.I wouldn't call this a high-priority issue, but we should get to it eventually.