class documentation
class BoxConstraintsTransformationBase(object):
Known subclasses: cma.transformations.BoxConstraintsLinQuadTransformation
, cma.transformations._BoxConstraintsTransformationTemplate
Constructor: BoxConstraintsTransformationBase(bounds)
Implements a transformation into boundaries and is used in top level boundary handling classes.
Example:
tf = BoxConstraintsTransformationAnyDerivedClass([[1, 4]]) x = [3, 2, 4.4] y = tf(x) # "repaired" solution print(tf([2.5])) # middle value is never changed [2.5] assert all([yi <= 4 for yi in y])
See Also | |
BoundTransform |
Method | __call__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | bounds |
return [ith_lower_bound, ith_upper_bound] |
Method | initialize |
initialize in base class |
Method | inverse |
Undocumented |
Method | shift |
return the reference solution that has the same box_constraints_transformation(solution) value, i.e. tf.shift_or_mirror_into_invertible_domain(x) = tf.inverse(tf.transform(x)). This is an idempotent mapping (leading to the same result independent how often it is repeatedly applied). |
Instance Variable | bounds |
Undocumented |
Method | _index |
Undocumented |
Method | _inverse |
Undocumented |
Method | _lowerupperval |
Undocumented |
Method | _transform |
Undocumented |
Instance Variable | _lb |
Undocumented |
Instance Variable | _ub |
Undocumented |
overridden in
cma.transformations.BoxConstraintsLinQuadTransformation
, cma.transformations._BoxConstraintsTransformationTemplate
initialize in base class
overridden in
cma.transformations.BoxConstraintsLinQuadTransformation
return the reference solution that has the same box_constraints_transformation(solution) value, i.e. tf.shift_or_mirror_into_invertible_domain(x) = tf.inverse(tf.transform(x)). This is an idempotent mapping (leading to the same result independent how often it is repeatedly applied).
overridden in
cma.transformations.BoxConstraintsLinQuadTransformation
, cma.transformations._BoxConstraintsTransformationTemplate
Undocumented
overridden in
cma.transformations.BoxConstraintsLinQuadTransformation
, cma.transformations._BoxConstraintsTransformationTemplate
Undocumented