diff base/LogRange.cpp @ 689:573d45e9487b

Merge from debug-output branch
author Chris Cannam
date Tue, 14 Jun 2011 14:47:59 +0100
parents 06f13a3b9e9e
children 1424aa29ae95
line wrap: on
line diff
--- a/base/LogRange.cpp	Tue Jun 14 13:43:03 2011 +0100
+++ b/base/LogRange.cpp	Tue Jun 14 14:47:59 2011 +0100
@@ -26,7 +26,7 @@
     if (min > max) std::swap(min, max);
     if (max == min) max = min + 1;
 
-//    std::cerr << "LogRange::mapRange: min = " << min << ", max = " << max << std::endl;
+//    DEBUG << "LogRange::mapRange: min = " << min << ", max = " << max << endl;
 
     if (min >= 0.f) {
 
@@ -35,7 +35,7 @@
         if (min == 0.f) min = std::min(logthresh, max);
         else min = log10f(min);
 
-//        std::cerr << "LogRange::mapRange: positive: min = " << min << ", max = " << max << std::endl;
+//        DEBUG << "LogRange::mapRange: positive: min = " << min << ", max = " << max << endl;
 
     } else if (max <= 0.f) {
         
@@ -46,7 +46,7 @@
         
         std::swap(min, max);
         
-//        std::cerr << "LogRange::mapRange: negative: min = " << min << ", max = " << max << std::endl;
+//        DEBUG << "LogRange::mapRange: negative: min = " << min << ", max = " << max << endl;
 
     } else {
         
@@ -55,7 +55,7 @@
         max = log10f(std::max(max, -min));
         min = std::min(logthresh, max);
 
-//        std::cerr << "LogRange::mapRange: spanning: min = " << min << ", max = " << max << std::endl;
+//        DEBUG << "LogRange::mapRange: spanning: min = " << min << ", max = " << max << endl;
     }
 
     if (min == max) min = max - 1;
@@ -104,8 +104,8 @@
     float sd0 = sd(values, 0, mi);
     float sd1 = sd(values, mi, values.size() - mi);
 
-    std::cerr << "LogRange::useLogScale: sd0 = "
-              << sd0 << ", sd1 = " << sd1 << std::endl;
+    DEBUG << "LogRange::useLogScale: sd0 = "
+              << sd0 << ", sd1 = " << sd1 << endl;
 
     if (sd0 == 0 || sd1 == 0) return false;