class documentation

class BestSolution(object):

View In Hierarchy

container to keep track of the best solution seen.

Keeps also track of the genotype, if available.

Method __init__ initialize the best solution with x, f, and evals.
Method get return (x, f, evals)
Method update checks for better solutions in list arx.
Instance Variable compared number of overall compared values, posterior hack
Instance Variable evals Undocumented
Instance Variable evalsall Undocumented
Instance Variable f Undocumented
Instance Variable last Undocumented
Instance Variable x Undocumented
Instance Variable x_geno Undocumented
def __init__(self, x=None, f=np.inf, evals=None):

initialize the best solution with x, f, and evals.

Better solutions have smaller f-values.

def get(self):

return (x, f, evals)

def update(self, arx, xarchive=None, arf=None, evals=None):

checks for better solutions in list arx.

Based on the smallest corresponding value in arf, alternatively, update may be called with a BestSolution instance like update(another_best_solution) in which case the better solution becomes the current best.

xarchive is used to retrieve the genotype of a solution.

compared: int =

number of overall compared values, posterior hack

evals =

Undocumented

evalsall =

Undocumented

f =

Undocumented

last =

Undocumented

x =

Undocumented

x_geno =

Undocumented