|
QDpy
|
Public Member Functions | |
| __setstate__ (self, state) | |
| Verify that a snapshot stores unweighted objective values. | |
| ScoreValuesLike | weighted_values (self, ScoreValuesLike weights) |
| bool | valid (self) |
| FitnessValuesLike | values (self) |
| Public Member Functions inherited from qdpy.phenotype.Score | |
| bool | dominates (self, Any other, Any obj=slice(None), Optional[ScoreValuesLike] weights=None) |
Store raw objectives and their comparison weights. Supply one weight per objective. Negative weights minimise and positive weights maximise. A weight of zero ignores its objective in a weighted comparison. The default is minimisation. Assigning weights keeps the raw objective values unchanged. Empty fitness and fitness containing NaN are invalid. Use container domains to specify which otherwise valid scores may enter an archive.
Definition at line 309 of file phenotype.py.
| qdpy.phenotype.Fitness.__setstate__ | ( | self, | |
| state ) |
Verify that a snapshot stores unweighted objective values.
| state | Serialized fitness attributes with a format marker. |
| ValueError | If the marker is absent or unsupported. An older weighted tuple could otherwise be read as a raw objective. |
Definition at line 333 of file phenotype.py.
| bool qdpy.phenotype.Fitness.valid | ( | self | ) |
Whether the fitness has at least one objective and contains no NaN values.
Reimplemented from qdpy.phenotype.Score.
Definition at line 353 of file phenotype.py.
| FitnessValuesLike qdpy.phenotype.Fitness.values | ( | self | ) |
Objective values before applying weights.
Reimplemented from qdpy.phenotype.Score.
Definition at line 358 of file phenotype.py.
| ScoreValuesLike qdpy.phenotype.Fitness.weighted_values | ( | self, | |
| ScoreValuesLike | weights ) |
Return one weighted value per objective in the same order.
:param weights: Comparison weights for this calculation.
:raises ValueError: If a nonempty fitness and the weights differ
in length.
Reimplemented from qdpy.phenotype.Score.
Definition at line 341 of file phenotype.py.