def main(): """ xxx xxx""" print('Subclass:', issubclass(PyAlgoExampleAnother, PyBratAlgoBase)) print('Instance:', isinstance(PyAlgoExampleAnother(), PyBratAlgoBase)) algo = PyAlgoExampleAnother() print(" ") print("Name: " + str(algo.GetName())) print("Description: " + str(algo.GetDescription())) print("Nb of Input: " + str(algo.GetNumInputParam())) print("RESULT: " + str(algo.Run([10, 20, 'abcd', 40, 42])) + " " + algo.GetOutputUnit()) print('\nSubclasses of PyAlgoBase: ') for sc in PyBratAlgoBase.__subclasses__(): print(sc.__name__)
def main(): """ xxx xxx""" print ('Subclass:', issubclass(PyAlgoExample, PyBratAlgoBase) ) print ('Instance:', isinstance(PyAlgoExample(), PyBratAlgoBase) ) algo = PyAlgoExample() print (" ") print ("Name: " + str( algo.GetName() )) print ("Description: " + str( algo.GetDescription() )) print ("Nb of Input: " + str( algo.GetNumInputParam() )) print ("RESULT: " + str( algo.Run([10, 20, 'abcd', 40, 42]) ) + " " + algo.GetOutputUnit() ) print ('\nSubclasses of PyAlgoBase: ') for sc in PyBratAlgoBase.__subclasses__(): print (sc.__name__)
def main(): """ xxx xxx""" print ('Subclass:', issubclass(Example_AlgoUsingNumpy, PyBratAlgoBase) ) print ('Instance:', isinstance(Example_AlgoUsingNumpy(), PyBratAlgoBase) ) algo = Example_AlgoUsingNumpy() print (" ") print ("Name: " + str( algo.GetName() )) print ("Description: " + str( algo.GetDescription() )) print ("Nb of Input: " + str( algo.GetNumInputParam() )) print ("Par 1 description: " + str( algo.GetInputParamDesc(0) )) print ("RESULT: " + str( algo.Run([1]) ) + " " + algo.GetOutputUnit() ) print ('\nSubclasses of PyAlgoBase: ') for sc in PyBratAlgoBase.__subclasses__(): print (sc.__name__)
def main(): """ xxx xxx""" print ('Subclass:', issubclass(Example_SSHjason2, PyBratAlgoBase) ) print ('Instance:', isinstance(Example_SSHjason2(), PyBratAlgoBase) ) algo = Example_SSHjason2() print (" ") print ("Name: " + str( algo.GetName() )) print ("Description: " + str( algo.GetDescription() )) print ("Nb of Input: " + str( algo.GetNumInputParam() )) print ("Par 1 name: " + str( algo.GetInputParamDesc(1) )) print ("RESULT: " + str( algo.Run([60, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) ) + " " + algo.GetOutputUnit() ) print ('\nSubclasses of PyAlgoBase: ') for sc in PyBratAlgoBase.__subclasses__(): print (sc.__name__)
def main(): """ xxx xxx""" print('Subclass:', issubclass(Example_SSHjason2, PyBratAlgoBase)) print('Instance:', isinstance(Example_SSHjason2(), PyBratAlgoBase)) algo = Example_SSHjason2() print(" ") print("Name: " + str(algo.GetName())) print("Description: " + str(algo.GetDescription())) print("Nb of Input: " + str(algo.GetNumInputParam())) print("Par 1 name: " + str(algo.GetInputParamDesc(1))) print("RESULT: " + str(algo.Run([60, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])) + " " + algo.GetOutputUnit()) print('\nSubclasses of PyAlgoBase: ') for sc in PyBratAlgoBase.__subclasses__(): print(sc.__name__)