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 3945, Thu Jun 9 20:00:15 2016 UTC revision 3946, Sat Jun 11 00:39:19 2016 UTC
# Line 37  Line 37 
37  op_inner = operator(10,"inner product", 2, u'•')  op_inner = operator(10,"inner product", 2, u'•')
38  op_scale = operator(11,"multiplication", 2, u'*')  op_scale = operator(11,"multiplication", 2, u'*')
39    
40    
41    
42    op_binary = [op_add, op_subtract, op_cross, op_outer, op_inner, op_scale]
43  #:,*,|()|,normalize,transpose,trace..  #:,*,|()|,normalize,transpose,trace..
44    
45    def idToStr(n):
46        for i in  (op_unary+op_binary):
47            if (n==i.id):
48                return i.name
49        return "no match"
50    def idToStrBinary(n):
51        n =n+6
52        for i in  (op_binary):
53            if (n==i.id):
54                return i.name
55        else:
56            return "no match"
57    
58    

Legend:
Removed from v.3945  
changed lines
  Added in v.3946

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