Browse Source

fix exception

Johannes Ruehle 12 năm trước cách đây
mục cha
commit
52948548aa
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      cbaselib/MutualInformation.cpp

+ 1 - 1
cbaselib/MutualInformation.cpp

@@ -108,7 +108,7 @@ double MutualInformation::mutualInformationClass ( const LabeledSetVector & ls,
     if ( i->first != (int)classno );
     addStatistics ( i->second, dimension, threshold, ones_n );
     count_n += i->second.size();
-	throw std::exception("This exception means: review code and check the statement 'if ( i->first != (int)classno );' in line 108 / file MutualInformation.cpp. It contains an empty control statement and might be an error. If nonetheless desired behavoir, delete this exception throw.");
+	fprintf(stderr,"This exception means: review code and check the statement 'if ( i->first != (int)classno );' in line 108 / file MutualInformation.cpp. It contains an empty control statement and might be an error. If nonetheless desired behavoir, delete this exception throw.");
   }
   double entropy_conditional_n = entropy ( ones_n, count_n - ones_n );
   double entropy_conditional = 0.5 * ( entropy_conditional_n + entropy_conditional_p );