2 # Generated python file of Graph GraphLoopsCoupled_3
6 # Graph creation of GraphLoopsCoupled_3
7 def DefGraphLoopsCoupled_3() :
8 GraphLoopsCoupled_3 = Graph( 'GraphLoopsCoupled_3' )
9 GraphLoopsCoupled_3.SetName( 'GraphLoopsCoupled_3' )
10 GraphLoopsCoupled_3.SetAuthor( 'JR' )
11 GraphLoopsCoupled_3.SetComment( '' )
12 GraphLoopsCoupled_3.Coords( 0 , 0 )
14 # Creation of Factory Nodes
16 # Creation of InLine Nodes
18 PyAdd.append( 'def Add(x,y) : ' )
19 PyAdd.append( ' return x+y ' )
21 Add = GraphLoopsCoupled_3.INode( 'Add' , PyAdd )
24 Add.SetComment( 'Compute Node' )
25 Add.Coords( 245 , 38 )
26 IAddx = Add.InPort( 'x' , 'long' )
27 IAddy = Add.InPort( 'y' , 'long' )
28 IAddGate = Add.GetInPort( 'Gate' )
29 OAddz = Add.OutPort( 'z' , 'long' )
30 OAddGate = Add.GetOutPort( 'Gate' )
33 PyAdd_1.append( 'def Add(x,y) : ' )
34 PyAdd_1.append( ' return x+y ' )
36 Add_1 = GraphLoopsCoupled_3.INode( 'Add' , PyAdd_1 )
37 Add_1.SetName( 'Add_1' )
39 Add_1.SetComment( 'Compute Node' )
40 Add_1.Coords( 243 , 288 )
41 IAdd_1x = Add_1.InPort( 'x' , 'long' )
42 IAdd_1y = Add_1.InPort( 'y' , 'long' )
43 IAdd_1Gate = Add_1.GetInPort( 'Gate' )
44 OAdd_1z = Add_1.OutPort( 'z' , 'long' )
45 OAdd_1Gate = Add_1.GetOutPort( 'Gate' )
48 PySub.append( 'def Sub(x,y) : ' )
49 PySub.append( ' return x-y ' )
51 Sub = GraphLoopsCoupled_3.INode( 'Sub' , PySub )
54 Sub.SetComment( 'Compute Node' )
55 Sub.Coords( 458 , 18 )
56 ISubx = Sub.InPort( 'x' , 'long' )
57 ISuby = Sub.InPort( 'y' , 'long' )
58 ISubGate = Sub.GetInPort( 'Gate' )
59 OSubz = Sub.OutPort( 'z' , 'long' )
60 OSubGate = Sub.GetOutPort( 'Gate' )
63 PySub_1.append( 'def Sub(x,y) : ' )
64 PySub_1.append( ' return x-y ' )
66 Sub_1 = GraphLoopsCoupled_3.INode( 'Sub' , PySub_1 )
67 Sub_1.SetName( 'Sub_1' )
69 Sub_1.SetComment( 'Compute Node' )
70 Sub_1.Coords( 461 , 268 )
71 ISub_1x = Sub_1.InPort( 'x' , 'long' )
72 ISub_1y = Sub_1.InPort( 'y' , 'long' )
73 ISub_1Gate = Sub_1.GetInPort( 'Gate' )
74 OSub_1z = Sub_1.OutPort( 'z' , 'long' )
75 OSub_1Gate = Sub_1.GetOutPort( 'Gate' )
77 # Creation of Loop Nodes
81 PyMoreLoop.append( 'def More(Index,Max,z) : ' )
82 PyMoreLoop.append( ' DoLoop = 0 ' )
83 PyMoreLoop.append( ' if Index < Max : ' )
84 PyMoreLoop.append( ' DoLoop = 1 ' )
85 PyMoreLoop.append( ' return DoLoop,Index,Max,z ' )
86 PyMoreLoop.append( ' ' )
88 PyNextLoop.append( 'def Next(Index,Max,z) : ' )
89 PyNextLoop.append( ' Index = Index + 1 ' )
90 PyNextLoop.append( ' return Index,Max,z ' )
91 PyNextLoop.append( ' ' )
92 Loop,EndLoop = GraphLoopsCoupled_3.LNode( '' , PyLoop , 'More' , PyMoreLoop , 'Next' , PyNextLoop )
93 EndLoop.SetName( 'EndLoop' )
94 EndLoop.SetAuthor( '' )
95 EndLoop.SetComment( 'Compute Node' )
96 EndLoop.Coords( 662 , 38 )
98 EndLoop.SetPyFunction( 'EndLoop' , PyEndLoop )
99 ILoopDoLoop = Loop.GetInPort( 'DoLoop' )
100 ILoopIndex = Loop.InPort( 'Index' , 'long' )
101 ILoopMax = Loop.InPort( 'Max' , 'long' )
102 ILoopz = Loop.InPort( 'z' , 'long' )
103 ILoopGate = Loop.GetInPort( 'Gate' )
104 OLoopDoLoop = Loop.GetOutPort( 'DoLoop' )
105 OLoopIndex = Loop.GetOutPort( 'Index' )
106 OLoopMax = Loop.GetOutPort( 'Max' )
107 OLoopz = Loop.GetOutPort( 'z' )
108 IEndLoopDoLoop = EndLoop.GetInPort( 'DoLoop' )
109 IEndLoopIndex = EndLoop.GetInPort( 'Index' )
110 IEndLoopMax = EndLoop.GetInPort( 'Max' )
111 IEndLoopz = EndLoop.GetInPort( 'z' )
112 IEndLoopGate = EndLoop.GetInPort( 'Gate' )
113 OEndLoopDoLoop = EndLoop.GetOutPort( 'DoLoop' )
114 OEndLoopIndex = EndLoop.GetOutPort( 'Index' )
115 OEndLoopMax = EndLoop.GetOutPort( 'Max' )
116 OEndLoopz = EndLoop.GetOutPort( 'z' )
117 OEndLoopGate = EndLoop.GetOutPort( 'Gate' )
118 Loop.SetName( 'Loop' )
120 Loop.SetComment( 'Compute Node' )
121 Loop.Coords( 15 , 58 )
126 PyMoreInit.append( 'def More(Index,Max,z) : ' )
127 PyMoreInit.append( ' DoLoop = 0 ' )
128 PyMoreInit.append( ' if Index < Max : ' )
129 PyMoreInit.append( ' DoLoop = 1 ' )
130 PyMoreInit.append( ' return DoLoop,Index,Max,z ' )
131 PyMoreInit.append( ' ' )
133 PyNextInit.append( 'def Next(Index,Max,z) : ' )
134 PyNextInit.append( ' Index = Index + 1 ' )
135 PyNextInit.append( ' return Index,Max,z ' )
136 PyNextInit.append( ' ' )
137 Init,EndInit = GraphLoopsCoupled_3.LNode( '' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit )
138 EndInit.SetName( 'EndInit' )
139 EndInit.SetAuthor( '' )
140 EndInit.SetComment( 'Compute Node' )
141 EndInit.Coords( 670 , 288 )
143 EndInit.SetPyFunction( 'EndInit' , PyEndInit )
144 IInitDoLoop = Init.GetInPort( 'DoLoop' )
145 IInitIndex = Init.InPort( 'Index' , 'long' )
146 IInitMax = Init.InPort( 'Max' , 'long' )
147 IInitz = Init.InPort( 'z' , 'long' )
148 IInitGate = Init.GetInPort( 'Gate' )
149 OInitDoLoop = Init.GetOutPort( 'DoLoop' )
150 OInitIndex = Init.GetOutPort( 'Index' )
151 OInitMax = Init.GetOutPort( 'Max' )
152 OInitz = Init.GetOutPort( 'z' )
153 IEndInitDoLoop = EndInit.GetInPort( 'DoLoop' )
154 IEndInitIndex = EndInit.GetInPort( 'Index' )
155 IEndInitMax = EndInit.GetInPort( 'Max' )
156 IEndInitz = EndInit.GetInPort( 'z' )
157 IEndInitGate = EndInit.GetInPort( 'Gate' )
158 OEndInitDoLoop = EndInit.GetOutPort( 'DoLoop' )
159 OEndInitIndex = EndInit.GetOutPort( 'Index' )
160 OEndInitMax = EndInit.GetOutPort( 'Max' )
161 OEndInitz = EndInit.GetOutPort( 'z' )
162 OEndInitGate = EndInit.GetOutPort( 'Gate' )
163 Init.SetName( 'Init' )
165 Init.SetComment( 'Compute Node' )
166 Init.Coords( 10 , 308 )
169 LAddzSuby = GraphLoopsCoupled_3.Link( OAddz , ISuby )
171 LAddzSub_1x = GraphLoopsCoupled_3.Link( OAddz , ISub_1x )
173 LAdd_1zSub_1y = GraphLoopsCoupled_3.Link( OAdd_1z , ISub_1y )
175 LAdd_1zSubx = GraphLoopsCoupled_3.Link( OAdd_1z , ISubx )
177 LSubzEndInitz = GraphLoopsCoupled_3.Link( OSubz , IEndInitz )
179 LSub_1zEndLoopz = GraphLoopsCoupled_3.Link( OSub_1z , IEndLoopz )
181 LLoopIndexEndLoopIndex = GraphLoopsCoupled_3.Link( OLoopIndex , IEndLoopIndex )
183 LLoopMaxEndLoopMax = GraphLoopsCoupled_3.Link( OLoopMax , IEndLoopMax )
185 LLoopMaxAddx = GraphLoopsCoupled_3.Link( OLoopMax , IAddx )
187 LLoopzAddy = GraphLoopsCoupled_3.Link( OLoopz , IAddy )
189 LInitIndexEndInitIndex = GraphLoopsCoupled_3.Link( OInitIndex , IEndInitIndex )
191 LInitMaxEndInitMax = GraphLoopsCoupled_3.Link( OInitMax , IEndInitMax )
193 LInitMaxAdd_1x = GraphLoopsCoupled_3.Link( OInitMax , IAdd_1x )
195 LInitzAdd_1y = GraphLoopsCoupled_3.Link( OInitz , IAdd_1y )
198 ILoopIndex.Input( 5 )
201 IInitIndex.Input( 3 )
205 # Output Ports of the graph
206 #OEndLoopIndex = EndLoop.GetOutPort( 'Index' )
207 #OEndLoopMax = EndLoop.GetOutPort( 'Max' )
208 #OEndLoopz = EndLoop.GetOutPort( 'z' )
209 #OEndInitIndex = EndInit.GetOutPort( 'Index' )
210 #OEndInitMax = EndInit.GetOutPort( 'Max' )
211 #OEndInitz = EndInit.GetOutPort( 'z' )
212 return GraphLoopsCoupled_3
215 GraphLoopsCoupled_3 = DefGraphLoopsCoupled_3()