public class EvaluatorInteger extends java.lang.Object implements Evaluator
Constructor and Description |
---|
EvaluatorInteger()
Creates a new integer evaluator with weight 0 and
no values.
|
Modifier and Type | Method and Description |
---|---|
EvaluatorInteger |
clone() |
double |
getConstantParam()
Deprecated.
|
java.lang.Double |
getEvaluation(int value) |
java.lang.Double |
getEvaluation(UtilitySpace uspace,
Bid bid,
int index)
This method returns the utility of the value of an issue.
|
EVALFUNCTYPE |
getFuncType() |
double |
getLinearParam()
Deprecated.
|
int |
getLowerBound() |
double |
getOffset() |
double |
getSlope() |
EVALUATORTYPE |
getType() |
int |
getUpperBound() |
double |
getUtilHighestValue() |
double |
getUtilLowestValue() |
double |
getWeight() |
java.lang.String |
isComplete(Objective whichobj)
Check whether the evaluator has enough information to make an evaluation.
|
void |
loadFromXML(SimpleElement pRoot)
Method to
|
void |
lockWeight()
Locks the weight of this Evaluator.
|
void |
setConstantParam(double offset)
Deprecated.
|
void |
setLinearFunction(double utilLowInt,
double utilHighInt)
Specifies the linear utility function of the issue by giving the
utility of the lowest value and the highest value.
|
void |
setLinearParam(double slope)
Deprecated.
|
void |
setLowerBound(int lb)
Sets the lower bound of this evaluator.
|
void |
setOffset(double offset)
Sets the offset of the linear utility function.
|
void |
setSlope(double slope)
Sets the slope of the linear utility function.
|
void |
setUpperBound(int ub)
Sets the upper bound of this evaluator.
|
void |
setWeight(double wt)
Sets the weigth with which an Objective or Issue is evaluated.
|
SimpleElement |
setXML(SimpleElement evalObj)
Sets weights and evaluator properties for the object in SimpleElement representation that is passed to it.
|
java.lang.String |
toString() |
void |
unlockWeight()
Unlock the weight of this evaluator.
|
boolean |
weightLocked() |
public EvaluatorInteger()
public double getWeight()
public void setWeight(double wt)
Evaluator
public void lockWeight()
lockWeight
in interface Evaluator
public void unlockWeight()
unlockWeight
in interface Evaluator
public boolean weightLocked()
weightLocked
in interface Evaluator
public java.lang.Double getEvaluation(UtilitySpace uspace, Bid bid, int index)
Evaluator
getEvaluation
in interface Evaluator
uspace
- preference profilebid
- in which the value is contained.index
- of the issue in the bid.public java.lang.Double getEvaluation(int value)
value
- of an issue.public EVALUATORTYPE getType()
public EVALFUNCTYPE getFuncType()
public int getLowerBound()
public int getUpperBound()
public double getUtilLowestValue()
public double getUtilHighestValue()
public void setLowerBound(int lb)
lb
- The new lower boundpublic void setUpperBound(int ub)
ub
- The new upper boundpublic void setLinearFunction(double utilLowInt, double utilHighInt)
utilLowInt
- utility of the lowest vale.utilHighInt
- utility of the highest value.public void loadFromXML(SimpleElement pRoot)
Evaluator
loadFromXML
in interface Evaluator
public SimpleElement setXML(SimpleElement evalObj)
evalObj
- The object of which to set the evaluation properties.public java.lang.String isComplete(Objective whichobj)
Evaluator
isComplete
in interface Evaluator
whichobj
- is the objective/issue to which this evaluator is attached.public double getSlope()
@Deprecated public double getLinearParam()
public void setSlope(double slope)
slope
- of the linear utility function.@Deprecated public void setLinearParam(double slope)
slope
- of the linear utility function.public double getOffset()
@Deprecated public double getConstantParam()
public void setOffset(double offset)
offset
- of the linear utility function.@Deprecated public void setConstantParam(double offset)
offset
- of the linear utility function.public java.lang.String toString()
toString
in class java.lang.Object
public EvaluatorInteger clone()