|
OptaPlanner distribution 6.1.0.CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.optaplanner.core.api.score.AbstractScore<SimpleBigDecimalScore>
org.optaplanner.core.api.score.buildin.simplebigdecimal.SimpleBigDecimalScore
public final class SimpleBigDecimalScore
This Score is based on 1 level of BigDecimal constraints.
Score,
Serialized Form| Method Summary | |
|---|---|
SimpleBigDecimalScore |
add(SimpleBigDecimalScore augment)
Returns a Score whose value is (this + augment). |
int |
compareTo(SimpleBigDecimalScore other)
|
SimpleBigDecimalScore |
divide(double divisor)
Returns a Score whose value is (this / divisor). |
boolean |
equals(Object o)
|
BigDecimal |
getScore()
The total of the broken negative constraints and fulfilled positive hard constraints. |
int |
hashCode()
|
SimpleBigDecimalScore |
multiply(double multiplicand)
Returns a Score whose value is (this * multiplicand). |
SimpleBigDecimalScore |
negate()
Returns a Score whose value is (- this). |
static SimpleBigDecimalScore |
parseScore(String scoreString)
|
SimpleBigDecimalScore |
power(double exponent)
Returns a Score whose value is (this ^ exponent). |
SimpleBigDecimalScore |
subtract(SimpleBigDecimalScore subtrahend)
Returns a Score whose value is (this - subtrahend). |
Number[] |
toLevelNumbers()
Returns an array of numbers representing the Score. |
String |
toString()
|
static SimpleBigDecimalScore |
valueOf(BigDecimal score)
|
| Methods inherited from class org.optaplanner.core.api.score.AbstractScore |
|---|
buildScorePattern, buildScorePattern, isCompatibleArithmeticArgument, parseLevelAsBigDecimal, parseLevelAsDouble, parseLevelAsInt, parseLevelAsLong, parseLevelStrings, parseLevelStrings |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static SimpleBigDecimalScore parseScore(String scoreString)
public static SimpleBigDecimalScore valueOf(BigDecimal score)
public BigDecimal getScore()
public SimpleBigDecimalScore add(SimpleBigDecimalScore augment)
Score
augment - value to be added to this Score
public SimpleBigDecimalScore subtract(SimpleBigDecimalScore subtrahend)
Score
subtrahend - value to be subtracted from this Score
public SimpleBigDecimalScore multiply(double multiplicand)
ScoreMath.floor(double).
/> If the implementation has a scale/precision, then the unspecified scale/precision of the double multiplicand should have no impact on the returned scale/precision.
multiplicand - value to be multiplied by this Score.
public SimpleBigDecimalScore divide(double divisor)
ScoreMath.floor(double).
/> If the implementation has a scale/precision, then the unspecified scale/precision of the double divisor should have no impact on the returned scale/precision.
divisor - value by which this Score is to be divided
public SimpleBigDecimalScore power(double exponent)
ScoreMath.floor(double).
/> If the implementation has a scale/precision, then the unspecified scale/precision of the double exponent should have no impact on the returned scale/precision.
exponent - value by which this Score is to be powered
public SimpleBigDecimalScore negate()
Score
public Number[] toLevelNumbers()
ScoreMath.floor(double).
The length of the returned array must be stable for a specific Score implementation.
For example: -0hard/-7soft returns new int{-0, -7}
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int compareTo(SimpleBigDecimalScore other)
public String toString()
toString in class Object
|
OptaPlanner distribution 6.1.0.CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||