[Swift-commit] r5725 - SwiftApps/SciColSim

wilde at ci.uchicago.edu wilde at ci.uchicago.edu
Mon Mar 26 12:03:12 CDT 2012


Author: wilde
Date: 2012-03-26 12:03:11 -0500 (Mon, 26 Mar 2012)
New Revision: 5725

Modified:
   SwiftApps/SciColSim/optimizer.cpp
Log:
Changed max_loss_valuue() to use a switch. Corrected bad check for t.i. 1008.

Modified: SwiftApps/SciColSim/optimizer.cpp
===================================================================
--- SwiftApps/SciColSim/optimizer.cpp	2012-03-24 09:05:58 UTC (rev 5724)
+++ SwiftApps/SciColSim/optimizer.cpp	2012-03-26 17:03:11 UTC (rev 5725)
@@ -1023,7 +1023,7 @@
     }
 
     //==============================================
-    double max_loss_value(int tn){
+    double Omax_loss_value(int tn){
 
         if( tn == 58 )           return 128.286;
         else if( tn == 108 )     return 131.866;
@@ -1044,11 +1044,37 @@
         else if( tn == 858 )     return 279.201;
         else if( tn == 908 )     return 320.112;
         else if( tn == 958 )     return 394.774;
-        else if( tn == 1000 )    return 1052.38;  // Huge number here. Why?
+        else if( tn == 1008 )    return 1052.38;  // Huge number here. Why?
         else                      return 10000.;   /* Pray that this does not occur. Ask Andrey what to do */
     }
+    double max_loss_value(int tn){
 
+      switch(tn) {
+        case 58:           return 128.286;
+        case 108:     return 131.866;
+        case 158:     return 135.551;
+        case 208:     return 139.694;
+        case 258:     return 144.163;
+        case 308:     return 148.967;
+        case 358:     return 154.201;
+        case 408:     return 159.962;
+        case 458:     return 166.441;
+        case 508:     return 173.655;
+        case 558:     return 181.921;
+        case 608:     return 191.246;
+        case 658:     return 202.150;
+        case 708:     return 215.197;
+        case 758:     return 202.150;  // Verify with Andrey. Same as TargetNovelty of 658
+        case 808:     return 251.698;
+        case 858:     return 279.201;
+        case 908:     return 320.112;
+        case 958:     return 394.774;
+        case 1008:    return 1052.38;  // Huge number here. Why?
+        default:      return 10000.;   /* Pray that this does not occur. Ask Andrey what to do */
+      }
+    }
 
+
     //==============================================
     int get_reruns(void){
         return N_repeats;




More information about the Swift-commit mailing list