Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/ein16/synth/d2/test_compare.py
ViewVC logotype

Diff of /branches/ein16/synth/d2/test_compare.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4351, Wed Aug 3 01:15:46 2016 UTC revision 4352, Wed Aug 3 03:55:33 2016 UTC
# Line 3  Line 3 
3  from obj_operator import *  from obj_operator import *
4  import math  import math
5    
6    divConstant=7.2
7    
8  def toStr(name,var, maxdiff,sumdiff):  def toStr(name,var, maxdiff,sumdiff):
9      # f = open("results_tmp.txt", 'a+')      # f = open("results_tmp.txt", 'a+')
10      #f.write("\n\n **********")      #f.write("\n\n **********")
# Line 16  Line 18 
18          #f.close()          #f.close()
19          #print rtn          #print rtn
20          return (rtn,1,0,0,0)          return (rtn,1,0,0,0)
21      elif (maxdiff<=0.5):      elif (maxdiff<=0.1):
22          rtn = "Results: "+var+": eh "+x          rtn = "Results: "+var+": eh "+x
23          #f.write("\n\t\t"+rtn)          #f.write("\n\t\t"+rtn)
24          #f.close()          #f.close()
# Line 72  Line 74 
74              c1= cor[i][j]              c1= cor[i][j]
75              if (o1==0):              if (o1==0):
76                  break                  break
77                if(abs(o1-divConstant)<0.01):
78                    print "used div constant"
79                    break
80    
81              diff=abs(o1-c1)              diff=abs(o1-c1)
82              sumdiff += diff              sumdiff += diff
83              if(diff > maxdiff):              if(diff > maxdiff):

Legend:
Removed from v.4351  
changed lines
  Added in v.4352

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0