I would like to use the BOOST_TEST machinery to compare mathematical vector types using plain (in)equality operators.
I can only find how to tell Boost.Test that it should do that for a type (by specializing boost::math::fpc::tolerance_based for that type), given the presence of the usual arithmetic and comparison operators, but I can't tell it to do the comparison in a specific way (I'd like the element-wise comparison here, and only really need (in)equality, no less/greater etc.).
Is there any customization point for this functionality? If not, how can I easily enable such behaviour only in my tests?
You can always write a custom operator that will do the comparison. For example:
My guess would be the authors of Eigen didn't include these because they provided the
arrayclass to give you access for element-wise operations. Also there are many ways to define inequalities like this and everyone will have a different set of requirements.