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

SCM Repository

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

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

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

revision 4307, Fri Jul 29 19:29:48 2016 UTC revision 4308, Fri Jul 29 20:53:07 2016 UTC
# Line 26  Line 26 
26  #------------------------------ constants -----------------------------------------------------  #------------------------------ constants -----------------------------------------------------
27  #  Constants  #  Constants
28  # id, name, arity, symbol  # id, name, arity, symbol
29  #unay operators  # placement of the operator in respect to the arguments
30  place_left = "left"  place_left = "left"
31  place_right = "right"  place_right = "right"
32  place_middle = "middle"  place_middle = "middle"
# Line 35  Line 35 
35    
36  id=0  id=0
37  #op_none= operator(id,"none", 1,"", place_left)  #op_none= operator(id,"none", 1,"", place_left)
38    op_negationT = operator(0,"negT", 1,"-", place_left)
39    
40  op_negation = operator(id,"neg", 1,"-", place_left)  op_negation = operator(id,"neg", 1,"-", place_left)
41  op_norm = operator(id+1,"norm", 1, u'|', place_split)  op_norm = operator(id+1,"norm", 1, u'|', place_split)
42  op_normalize = operator(id+2,"normalize", 1, u'normalize', place_left)  op_normalize = operator(id+2,"normalize", 1, u'normalize', place_left)
# Line 66  Line 68 
68    
69  #binary operators  #binary operators
70  id=id+6  id=id+6
71    print"addition id",id
72  op_add = operator(id,"addition", 2,"+", place_middle)  op_add = operator(id,"addition", 2,"+", place_middle)
73  op_subtract = operator(id+1,"subtraction", 2, "-", place_middle)  op_subtract = operator(id+1,"subtraction", 2, "-", place_middle)
74  op_cross = operator(id+2,"cross product", 2, u'×', place_middle)  op_cross = operator(id+2,"cross product", 2, u'×', place_middle)

Legend:
Removed from v.4307  
changed lines
  Added in v.4308

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