cocopp.pproc.TargetValues(object)
class documentationcocopp.pproc
(View In Hierarchy)
Known subclasses: cocopp.pproc.RunlengthBasedTargetValues
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.
Method | __init__ | Undocumented |
Method | short_info | Undocumented |
Static Method | cast | No summary |
Method | __len__ | Undocumented |
Method | __call__ | Undocumented |
Method | label | return the i-th target value as str, to be overwritten by a derived class |
Method | loglabel | return log10 of the i-th target value as str, to be overwritten by a derived class |
Method | labels | target values as a list of str |
Method | loglabels | log10 of the target values as a list of str |
Method | label_name | Undocumented |
Static Method | _discretize | return a "similar" list with targets in [10**i/5] |
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``