|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.xtreemos.xosd.resmng.data.NodeEvaluationLinear
public class NodeEvaluationLinear
The class evaluates the score as a linear function. The linear function has a form of: score = k * attributeValue + n.
Field Summary | |
---|---|
protected double |
k
The slope of the linear function. |
(package private) static org.apache.log4j.Logger |
logger
|
protected double |
n
The offset in the y direction of the function. |
Constructor Summary | |
---|---|
NodeEvaluationLinear(double n,
double k)
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
Constructor Detail |
---|
public NodeEvaluationLinear(double n, double k)
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.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 |