public class IssueEvaluationDiscrete extends AIssueEvaluation
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<java.lang.String,java.lang.Integer> |
valueFrequencyMap |
firstOfferedValue, issue
Constructor and Description |
---|
IssueEvaluationDiscrete(IssueDiscrete issueD)
This constructs the IssueEvaluationDiscrete.
|
Modifier and Type | Method and Description |
---|---|
protected int |
getHighestFrequency()
This method returns the highest frequency that can be
found in the valueFrequencyMap.
|
IssueDiscrete |
getIssueDiscrete()
This method gives us the casted IssueDiscrete object
we are evaluating.
|
double |
getNormalizedValueWeight(Value value)
This method returns the normalized weight of the given value.
|
int |
getNumberOfDiscreteValues()
This returns the number of possible values for the discrete issue.
|
protected double |
getPercentageOfHighestFrequency()
This method returns the percentage of the highest frequency.
|
protected int |
getSummedFrequency()
This method returns the sum of the frequencies in the valueFrequencyMap.
|
protected void |
initValueFrequencyMap()
This method will initialize the valueFrequencyMap.
|
java.lang.String |
toString()
This returns a string representation of the issueEvaluation.
|
void |
updateIssueEvaluation(Value chosenValue)
This method updates the IssueEvaluationDiscrete, based on the value that has been offered to us
in a new bid.
|
protected void |
updateValueFrequencyMap(Value chosenValue)
This method updates the valueFrequencyMap for the IssueDiscrete we are evaluating.
|
getIssueID, getIssueName, getIssueType, isFirstValueOffered
protected java.util.HashMap<java.lang.String,java.lang.Integer> valueFrequencyMap
public IssueEvaluationDiscrete(IssueDiscrete issueD)
issueD
- The issueDiscrete that needs to be evaluated. May not be null.protected void initValueFrequencyMap()
public void updateIssueEvaluation(Value chosenValue)
updateIssueEvaluation
in class AIssueEvaluation
chosenValue
- The value of the issue we are evaluating that has just been chosen. May not be null.protected void updateValueFrequencyMap(Value chosenValue)
public IssueDiscrete getIssueDiscrete()
public int getNumberOfDiscreteValues()
protected int getSummedFrequency()
protected int getHighestFrequency()
protected double getPercentageOfHighestFrequency()
public double getNormalizedValueWeight(Value value)
getNormalizedValueWeight
in class AIssueEvaluation
value
- The value (discrete or non-discrete) of which we want to know the normalized weight.public java.lang.String toString()
toString
in class AIssueEvaluation