Эх сурвалжийг харах

fixed NICE::isFinite call

unknown 12 жил өмнө
parent
commit
7a387ff3e4

+ 1 - 1
classifier/fpclassifier/logisticregression/SLR.cpp

@@ -383,7 +383,7 @@ int SLR::stepwise_regression ( Examples &x, int classno )
 #else
           double e = X[i].get ( basis ) * exp ( Xw[i].get ( 0 ) ) / S[i];
 #endif
-          if ( finite ( e ) )
+		  if ( NICE::isFinite ( e ) )
             XdotP += e;
 #ifdef SLRDEBUG
           else

+ 1 - 1
features/fpfeatures/FIHistograms.cpp

@@ -92,7 +92,7 @@ void FIHistograms::buildHSVMap (
       }
       colorhist[val](x,y) += 1;
 
-      if ( !finite ( colorhist[val](x,y) ) ) {
+      if ( !NICE::isFinite( colorhist[val](x,y) ) ) {
         fprintf ( stderr, "EOH Image failed: %f\n", colorhist[val](x,y) );
         exit ( -1 );
       }

+ 1 - 1
features/fpfeatures/HaarFeature.cpp

@@ -193,7 +193,7 @@ double HaarFeature::val ( const Example *example ) const
     return -1;
   }
 
-  assert ( finite ( value ) );
+  assert ( NICE::isFinite( value ) );
 #else
   throw("not yet adapted for new MultiChannelImageT!");
   double value = 0.0;

+ 1 - 1
math/kernels/KernelData.cpp

@@ -113,7 +113,7 @@ void KernelData::updateCholeskyFactorization ()
     cr->robustChol ( kernelMatrix, choleskyMatrix );
     logdet = cr->getLastLogDet();
 
-    if ( !finite ( logdet ) )
+    if ( !NICE::isFinite( logdet ) )
     {
       choleskyMatrix.resize ( kernelMatrix.rows(), kernelMatrix.cols() );
       choleskyMatrix.setIdentity();