-# Copyright (C) 2006-2016 CEA/DEN, EDF R&D
+# Copyright (C) 2006-2021 CEA/DEN, EDF R&D
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
"""Optional method called on initialization.
The type of "input" is returned by "getTCForAlgoInit"
"""
- print "Algo initialize, input = ", input.getIntValue()
+ print("Algo initialize, input = ", input.getIntValue())
def startToTakeDecision(self):
"""This method is called only once to launch the algorithm. It must
pool, do nothing (wait for more samples), or empty the pool and
return to finish the evaluation.
"""
- print "startToTakeDecision"
+ print("startToTakeDecision")
# fill the pool with samples
iter=0
self.pool.pushInSample(0, 0.5)
currentId=self.pool.getCurrentId()
valIn = self.pool.getCurrentInSample().getDoubleValue()
valOut = self.pool.getCurrentOutSample().getIntValue()
- print "Compute currentId=%s, valIn=%s, valOut=%s" % (currentId, valIn, valOut)
+ print("Compute currentId=%s, valIn=%s, valOut=%s" % (currentId, valIn, valOut))
iter=iter+1
if iter < 3:
def finish(self):
"""Optional method called when the algorithm has finished, successfully
or not, to perform any necessary clean up."""
- print "Algo finish"
+ print("Algo finish")
self.pool.destroyAll()
def getAlgoResult(self):