[ITK] [ITK-dev] New math comparison methods

Matt McCormick matt.mccormick at kitware.com
Tue Aug 18 12:12:34 EDT 2015


Hi Bill,

Thanks for taking a look at this, and trying to improve the result.

Yes, we should probably only use the operator in situations where
templates generate comparisons in a hybrid of floating point and
integer situations -- integer only could use operator==.

Thanks,
Matt

On Tue, Aug 18, 2015 at 12:07 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> If there are no objections, I'll take a pass on changing new math
> comparison operators back to vanilla comparisons for cases where
>
> two integral types of the same type are compared
> for example in
> Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx:
>   if ( Math::NotAlmostEquals( ( m_NumberOfSamples[classIndex][0] - 1 ), 0.0 ) )
>
> I think there may be other cases that can be reverted but I won't know
> until I do a line by line inspection./
>
>
>
>
> On Tue, Aug 18, 2015 at 11:42 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>> Folks,
>>
>> It is hard for me see see why the new math comparison operators are
>> used for statements like this one in Core/Common/test/
>> itkDerivativeOperatorTest
>>
>>     if( itk::Math::NotAlmostEquals( expected.size(), coefficients.size() ) )
>> instead of the original:
>>     if( expected.size() != coefficients.size() )
>>
>> Can we revisit this topic?
>>
>> Bill
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-developers
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-developers


More information about the Community mailing list