|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.deri.iris.utils.StrictFloatingPointComparator
public class StrictFloatingPointComparator
A floating point comparator that uses the default java behaviour. This class will make floating point comparison faster, but will not allow for any round-off errors at all.
| Constructor Summary | |
|---|---|
StrictFloatingPointComparator()
|
|
| Method Summary | |
|---|---|
int |
compare(double a,
double b)
An error-safe comparison in the java style. |
boolean |
equals(double a,
double b)
Test two double values for equality. |
boolean |
greater(double a,
double b)
Floating-point error safe comparison. |
boolean |
greaterOrEquals(double a,
double b)
Floating-point error safe comparison. |
boolean |
isIntValue(double value)
Indicates whether a double value contains an integer or a number very, very close to an integer. |
boolean |
less(double a,
double b)
Floating-point error safe comparison. |
boolean |
lessOrEquals(double a,
double b)
Floating-point error safe comparison. |
boolean |
notEquals(double a,
double b)
Floating-point error safe comparison. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StrictFloatingPointComparator()
| Method Detail |
|---|
public int compare(double a,
double b)
IFloatingPointComparator
compare in interface IFloatingPointComparatora - A double valueb - A double value
public boolean equals(double a,
double b)
IFloatingPointComparator
equals in interface IFloatingPointComparatora - A double valueb - A double value
public boolean greater(double a,
double b)
IFloatingPointComparator
greater in interface IFloatingPointComparatora - A double valueb - A double value
public boolean greaterOrEquals(double a,
double b)
IFloatingPointComparator
greaterOrEquals in interface IFloatingPointComparatora - A double valueb - A double value
public boolean isIntValue(double value)
IFloatingPointComparator
isIntValue in interface IFloatingPointComparatorvalue - The value to test
public boolean less(double a,
double b)
IFloatingPointComparator
less in interface IFloatingPointComparatora - A double valueb - A double value
public boolean lessOrEquals(double a,
double b)
IFloatingPointComparator
lessOrEquals in interface IFloatingPointComparatora - A double valueb - A double value
public boolean notEquals(double a,
double b)
IFloatingPointComparator
notEquals in interface IFloatingPointComparator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||