Re: [eigen] about eebce0fdbf01

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]



Actually there are lot of things to do there. For example, i dont understand why
inline bool test_ei_isApprox(const float& a, const float& b)
inline bool test_ei_isApprox(const double& a, const double& b)

and such are 'copy/pasted' and not using template. I've tried to define

template <typename T>
inline bool test_ei_isApprox(const T& a, const T& b)
{ return ei_isApprox(a, b, test_precision<T>()); }

But the compilation fails because it tries to use it [with T = Eigen::CwiseUnaryOp<Eigen::ei_scalar_real_op<std::complex<double> >, Eigen::Matrix<std::complex<double>, 33331, 33331> >]

so i gave up.... and i did not dare copy/pasting the "output error" on all those functions..

Thomas
-- 
Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>
http://www.freehackers.org/thomas

In data venerdì 21 maggio 2010 13:18:57, Benoit Jacob ha scritto:
: > This commit is  a good idea but one must be careful about one thing:
> 
> if the test does VERIFY_IS_NOT_APPROX, this is currently defined as
> 
> #define VERIFY_IS_NOT_APPROX(a, b) VERIFY(!test_ei_isApprox(a, b))
> 
> so it will output to cerr whenever it succeeds! The fix is probably to
> introduce a separate test_isNotApprox or something like that.
> 
> Another thing is that for consistency, VERIFY_IS_EQUAL should do the samel.
> 
> Benoit
> 
> 
> 



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/