MCPcopy Create free account
hub / github.com/ChunelFeng/CGraph / tutorial_function

Function tutorial_function

python/tutorial/T12-Function.py:36–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34
35
36def tutorial_function():
37 pipeline = GPipeline()
38 a, b = MyNode1(), MyWriteParamNode()
39 c_function, d_function = GFunction(), GFunction()
40
41 c_function.setFunction(CFunctionType.RUN, c_function_run)
42
43 d_function.setFunction(CFunctionType.INIT, lambda: d_function_init(d_function))
44 d_function.setFunction(CFunctionType.RUN, lambda: d_function_run(d_function, 10))
45
46 pipeline.registerGElement(a, set(), "nodeA")
47 pipeline.registerGElement(b, {a}, "nodeB")
48 pipeline.registerGElement(c_function, {b}, "functionC")
49 pipeline.registerGElement(d_function, {c_function}, "nodeD")
50
51 pipeline.process()
52
53
54if __name__ == '__main__':

Callers 1

T12-Function.pyFile · 0.70

Calls 7

processMethod · 0.95
MyNode1Class · 0.90
MyWriteParamNodeClass · 0.90
GPipelineClass · 0.85
d_function_initFunction · 0.85
d_function_runFunction · 0.85
setFunctionMethod · 0.80

Tested by

no test coverage detected