|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.drools.planner.core.score.AbstractScore<SimpleDoubleScore>
org.drools.planner.core.score.buildin.simpledouble.DefaultSimpleDoubleScore
public final class DefaultSimpleDoubleScore
Default implementation of SimpleDoubleScore.
SimpleDoubleScore,
Serialized Form| Constructor Summary | |
|---|---|
DefaultSimpleDoubleScore(double score)
|
|
| Method Summary | |
|---|---|
SimpleDoubleScore |
add(SimpleDoubleScore augment)
Returns a Score whose value is (this + augment). |
int |
compareTo(SimpleDoubleScore other)
|
SimpleDoubleScore |
divide(double divisor)
Returns a Score whose value is (this / divisor). |
boolean |
equals(Object o)
|
double |
getScore()
The total of the broken negative constraints and fulfilled postive hard constraints. |
int |
hashCode()
|
SimpleDoubleScore |
multiply(double multiplicand)
Returns a Score whose value is (this * multiplicand). |
static DefaultSimpleDoubleScore |
parseScore(String scoreString)
|
SimpleDoubleScore |
subtract(SimpleDoubleScore subtrahend)
Returns a Score whose value is (this - subtrahend). |
double[] |
toDoubleLevels()
Returns an array of doubles representing the Score. |
String |
toString()
|
static DefaultSimpleDoubleScore |
valueOf(double score)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultSimpleDoubleScore(double score)
| Method Detail |
|---|
public static DefaultSimpleDoubleScore parseScore(String scoreString)
public static DefaultSimpleDoubleScore valueOf(double score)
public double getScore()
SimpleDoubleScore
getScore in interface SimpleDoubleScorepublic SimpleDoubleScore add(SimpleDoubleScore augment)
Score
add in interface Score<SimpleDoubleScore>augment - value to be added to this Score
public SimpleDoubleScore subtract(SimpleDoubleScore subtrahend)
Score
subtract in interface Score<SimpleDoubleScore>subtrahend - value to be subtracted from this Score
public SimpleDoubleScore multiply(double multiplicand)
ScoreMath.floor(double).
multiply in interface Score<SimpleDoubleScore>multiplicand - value to be multiplied by this Score.
public SimpleDoubleScore divide(double divisor)
ScoreMath.floor(double).
divide in interface Score<SimpleDoubleScore>divisor - value by which this Score is to be divided
public double[] toDoubleLevels()
ScoreMath.floor(double).
The length of the returned array must be stable for a specific Score implementation.
For example: -0hard/-7soft returns new double{-0.0, -7.0}
toDoubleLevels in interface Score<SimpleDoubleScore>public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int compareTo(SimpleDoubleScore other)
compareTo in interface Comparable<SimpleDoubleScore>public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||