|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.xtreemos.xosd.resmng.data.NodeEvaluationLinearLimited
public class NodeEvaluationLinearLimited
The class evaluates the score as a linear function, limited with an upper and a lower bound. The linear function has a form of: y = k * attributeValue + n. The score has the value of lowerBound for y < lowerBound, upperBound for y > upperBound, and y otherwise.
Field Summary | |
---|---|
protected double |
k
The slope of the linear function. |
(package private) static org.apache.log4j.Logger |
logger
|
protected double |
lowerBound
The lowest possible value returned by the function. |
protected double |
n
The offset in the y direction of the function. |
protected double |
upperBound
The highest possible value returned by the function. |
Constructor Summary | |
---|---|
NodeEvaluationLinearLimited(double n,
double k,
double lowerBound,
double upperBound)
Initialise the evaluation function to be a linear function. |
Method Summary | |
---|---|
double |
getScore(java.lang.Double attributeValue)
Compute the score of the attribute value typed as Double. |
double |
getScore(java.lang.Object attributeValue)
Compute the score of the attribute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static org.apache.log4j.Logger logger
protected double n
protected double k
protected double lowerBound
protected double upperBound
Constructor Detail |
---|
public NodeEvaluationLinearLimited(double n, double k, double lowerBound, double upperBound)
n
- The offset in the y direction of the function. This is the
value of the function for attributeValue = 0;k
- The slope of the function.lowerBound
- The lowest possible value of the function.upperBound
- The highest possible value of the function.Method Detail |
---|
public double getScore(java.lang.Double attributeValue)
attributeValue
- The value of the attribute.
public double getScore(java.lang.Object attributeValue) throws java.security.InvalidParameterException
getScore
in interface INodeEvaluation
attributeValue
- The value of the attribute. Must be an instance
of Double.
java.security.InvalidParameterException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |