public class PartitionFitnessFunction
extends java.lang.Object
Constructor and Description |
---|
PartitionFitnessFunction(java.util.ArrayList<LoggerOrPenaltyDefinition> penalties,
NetworkFileBackedWrapper wrapper,
PredictionModifierOpt modifier)
Constructs a PartitionFitnessFunction with an associated network, modifier and associated penalties.
|
Modifier and Type | Method and Description |
---|---|
void |
clearNetworks()
Clears all assigned penalties and coefficients.
|
void |
commit()
Commits the changes made by the modifier to all subnetworks.
|
java.util.ArrayList<PenaltyPair> |
getDetailedFitness()
Returns the list of pairs consisting of the penalty name and its current fitness score.
|
long |
getFitness()
Returns the calculated fitness score of the network ranking.
|
void |
modify()
Gets the list of modifications made to the ranking and translates them into subnetwork changes.
|
void |
revert()
Reverts the changes made by the modifier to all subnetworks and resets the penaltyfunction scores.
|
public PartitionFitnessFunction(java.util.ArrayList<LoggerOrPenaltyDefinition> penalties, NetworkFileBackedWrapper wrapper, PredictionModifierOpt modifier)
penalties
- A list of penalty functions to be created and assigned to networkswrapper
- The network represented as a NetworkFileBackedWrappermodifier
- The modifier which will mutate the network. Will be polled for incremental updates of the penalties.public void clearNetworks()
public long getFitness()
public void commit()
public void revert()
public void modify()
public java.util.ArrayList<PenaltyPair> getDetailedFitness()