[Swift-commit] r6130 - SwiftApps/SciColSim

wilde at ci.uchicago.edu wilde at ci.uchicago.edu
Thu Jan 3 19:16:18 CST 2013


Author: wilde
Date: 2013-01-03 19:16:18 -0600 (Thu, 03 Jan 2013)
New Revision: 6130

Modified:
   SwiftApps/SciColSim/annealing.swift
Log:
Adjust some formatting back to K&R-like swift.

Modified: SwiftApps/SciColSim/annealing.swift
===================================================================
--- SwiftApps/SciColSim/annealing.swift	2013-01-04 00:34:31 UTC (rev 6129)
+++ SwiftApps/SciColSim/annealing.swift	2013-01-04 01:16:18 UTC (rev 6130)
@@ -24,27 +24,25 @@
 
 ( float nx ) newx( float x, float dx )
 {
-    float r = (random());
+  float r = (random());
 
-    if (r > 0.5)
-    {
-      nx = x + (random())*dx; //Java already returns a float between [0-1]
-    }
-    else
-    {
-        nx = x - (random())*dx;
-    }
-    // tracef("newx(%f,%f)=%f\n",x,dx,nx);
+  if (r > 0.5) {
+    nx = x + (random())*dx; //Java already returns a float between [0-1]
+  }
+  else {
+    nx = x - (random())*dx;
+  }
+  // tracef("newx(%f,%f)=%f\n",x,dx,nx);
 }
 
 app  (/*file outfile,*/  file loss ) evolve ( string args[], file graph )
 {
-    evolve @loss  args /*stdout=@outfile*/;  // FIXME: graph is passed implicitly
+  evolve @loss  args /*stdout=@outfile*/;  // FIXME: graph is passed implicitly
 }
 
 app ( file x ) sumloss( file loss[] )
 {
-    sumloss @filenames(loss) stdout=@x;
+  sumloss @filenames(loss) stdout=@x;
 }
 
 /*




More information about the Swift-commit mailing list