|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.xtreemos.xosd.resmng.data.AttributeScorekeeper
public class AttributeScorekeeper
An auxiliary structure for storing the score of the attribute in a related record. The class contains a sum of positive scores and the count of the occurrences that contributed to the score.
Field Summary | |
---|---|
protected int |
attribute
The identifier that tells which attribute the score is for. |
protected int |
contributionCount
The number of nodes that contributed to the scoreAccum. |
protected double |
scoreAccum
The sum of all relevant scores computed |
Constructor Summary | |
---|---|
AttributeScorekeeper(int attribute,
double scoreAccum)
Intialise the first occurrence of the attribute's score. |
|
AttributeScorekeeper(int attribute,
double scoreAccum,
int contributionCount)
Initialise the class by passing all of the class's field values. |
Method Summary | |
---|---|
void |
addScore(double scoreToAdd)
|
void |
addScore(double scoreToAdd,
int countToAdd)
|
int |
getAttribute()
|
int |
getContributionCount()
|
double |
getScoreAccum()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int attribute
protected double scoreAccum
protected int contributionCount
Constructor Detail |
---|
public AttributeScorekeeper(int attribute, double scoreAccum)
attribute
- scoreAccum
- public AttributeScorekeeper(int attribute, double scoreAccum, int contributionCount)
attribute
- Identifies the attribute.scoreAccum
- A sum of scores accumulated so far. Use a negative
value to denote the attribute took part in the query evaluation, but
did not fit the subexpression.contributionCount
- The number of times the attribute has been
evaluated. The value has to be 0 if scoreAccum is negative.Method Detail |
---|
public int getAttribute()
public int getContributionCount()
public double getScoreAccum()
public void addScore(double scoreToAdd)
public void addScore(double scoreToAdd, int countToAdd)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |