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]
def __init__(self, target_values, discretize=None):
Undocumented
@property
def short_info(self):
Undocumented
@staticmethod
def cast(target_values_or_class_instance, *args, **kwargs):
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`` 
    
def __len__(self):
Undocumented
def __call__(self, fun_dim_but_not_use=None, discretize=None):
Undocumented
@staticmethod
def _discretize(target_list):
return a "similar" list with targets in [10**i/5]
def label(self, i):
return the i-th target value as str, to be overwritten by a derived class
def loglabel(self, i, decimals=0):
return log10 of the i-th target value as str, to be overwritten by a derived class
def labels(self):
target values as a list of str
def loglabels(self, decimals=0):
log10 of the target values as a list of str
def label_name(self):
Undocumented
API Documentation for cocopp, generated by pydoctor at 2020-01-21 16:27:37.