[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IMP-dev] default epsilon ?




Hi all

I am going to suggest something that is not very "correct", but that it is already "de facto" in IMP. I would suggest a default epsilon value for the cases where the use of "almost_equal" function cannot be avoided. That is dangerous, I know, but I think it is even more dangerous to have the code full of different epsilons if they don't need to be different.

I'm saying this because IMP::em already has a EPS value of 1e-6 that is thoroughly used, and probably makes sense to define one EPS in other modules.

My need is to compute the correlation between two em::Images, that in fact is going to be the correlation between their algebra::MultiArrays containing the data, and I need to check for values of the standard deviation (which is a double) near zero. I don't see how to avoid the use of almost_equal() here, and again, a default epsilon for IMP::algebra sounds reasonable to me.