class TargetValues(object):
Known subclasses: cocopp.pproc.RunlengthBasedTargetValues
Constructor: TargetValues(target_values, discretize)
store and retrieve a list of target function values:
>>> import numpy as np >>> import cocopp.pproc as pp >>> targets = [10**i for i in np.arange(2, -8.1, -0.2)] >>> targets_as_class = pp.TargetValues(targets) >>> assert targets_as_class() == targets
In itself this class is useless, as it does not more than a simple list could do, but it serves as interface for derived classes, where targets() requires an actual argument targets(fun_dim).
Details: The optional argument for calling the class instance is needed to be consistent with the derived class RunlengthBasedTargetValues.
Static Method | cast |
idempotent cast to TargetValues class type, specifically ``return TargetValues(target_values_or_class_instance) |
Method | __call__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __len__ |
Undocumented |
Method | label |
return the i-th target value as str, to be overwritten by a derived class |
Method | label |
Undocumented |
Method | labels |
target values as a list of str |
Method | loglabel |
return log10 of the i-th target value as str, to be overwritten by a derived class |
Method | loglabels |
log10 of the target values as a list of str |
Instance Variable | __dict__ |
Undocumented |
Instance Variable | target |
Undocumented |
Property | short |
Undocumented |
Static Method | _discretize |
return a "similar" list with targets in [10**i/5] |
Instance Variable | _short |
Undocumented |
cocopp.pproc.RunlengthBasedTargetValues
idempotent cast to TargetValues class type, specifically ``return TargetValues(target_values_or_class_instance)
if not isinstance(target_values_or_class_instance, TargetValues) else target_values_or_class_instance``
cocopp.pproc.RunlengthBasedTargetValues
return the i-th target value as str, to be overwritten by a derived class
cocopp.pproc.RunlengthBasedTargetValues
return log10 of the i-th target value as str, to be overwritten by a derived class