public class AntiDominatePenalty extends java.lang.Object implements PenaltyFunction
Constructor and Description |
---|
AntiDominatePenalty(java.lang.Object argumentList)
Constructs a new AntiDominatePenalty, the arguments are specified as an String[] passed as an object for classloading.
|
Modifier and Type | Method and Description |
---|---|
void |
calculateMetricFromScratch()
Calculates the metric from the current subnetwork/ranking
|
double |
getCoef()
Gets the relative weight for this penalty
|
double |
getMetric()
Returns the current penalty metric (unmapped to the cost)
|
java.lang.String |
getPenaltyName()
The penalty name, used for logging functionality
|
long |
getPenaltyScore()
Returns the current penalty score (metric mapped on cost function)
|
boolean |
isGlobalPenalty()
Indicates if this penalty works on the ranking or on (sub)network level
|
void |
revertIncrementalPenalty()
Reverts the penalty score to the previous value, discarding any changes made by the latest incremental update
|
void |
setCoef(double coef)
Sets the relative weight for this penalty
|
void |
setNetwork(Network predictionNetwork)
Sets the network/ranking associated with this penalty
|
void |
updateIncrementalPenalty()
Calculates the new penalty score in an incremental way after (small) changes have been to the network
|
public AntiDominatePenalty(java.lang.Object argumentList)
argumentList
- an Object in the form of a String arraypublic java.lang.String getPenaltyName()
PenaltyFunction
getPenaltyName
in interface PenaltyFunction
public boolean isGlobalPenalty()
PenaltyFunction
isGlobalPenalty
in interface PenaltyFunction
public double getMetric()
PenaltyFunction
getMetric
in interface PenaltyFunction
public void updateIncrementalPenalty()
PenaltyFunction
updateIncrementalPenalty
in interface PenaltyFunction
public void revertIncrementalPenalty()
PenaltyFunction
revertIncrementalPenalty
in interface PenaltyFunction
public long getPenaltyScore()
PenaltyFunction
getPenaltyScore
in interface PenaltyFunction
public void calculateMetricFromScratch()
PenaltyFunction
calculateMetricFromScratch
in interface PenaltyFunction
public void setNetwork(Network predictionNetwork)
PenaltyFunction
setNetwork
in interface PenaltyFunction
predictionNetwork
- network or ranking associated with this penaltypublic double getCoef()
PenaltyFunction
getCoef
in interface PenaltyFunction
public void setCoef(double coef)
PenaltyFunction
setCoef
in interface PenaltyFunction
coef
- the relative weight