public final class BinaryRelations extends Object
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_COMPARISON_EPSILON
Default epsilon for comparison
|
| Constructor and Description |
|---|
BinaryRelations() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkIfEpsilonMode()
Checks if epsilon comparison mode is active;
|
static boolean |
checkIfExactMode()
Checks if exact comparison mode is active;
|
static double |
eq(double a,
double b)
Equality relation.
|
static double |
geq(double a,
double b)
Greater or equal relation.
|
static double |
getEpsilon()
Returns current epsilon value.
|
static double |
gt(double a,
double b)
Greater than relation.
|
static double |
leq(double a,
double b)
Lower or equal relation.
|
static double |
lt(double a,
double b)
Lower than relation.
|
static double |
neq(double a,
double b)
Inequality relation.
|
static void |
setDefaultEpsilon()
Sets default epsilon value.
|
static void |
setEpsilon(double epsilon)
Sets epsilon value.
|
static void |
setEpsilonComparison()
Sets comparison mode to EPSILON.
|
static void |
setExactComparison()
Sets comparison mode to EXACT.
|
public static final double DEFAULT_COMPARISON_EPSILON
public static final void setExactComparison()
public static final void setEpsilonComparison()
public static final void setEpsilon(double epsilon)
epsilon - Epsilon value (grater than 0).setEpsilonComparison()public static final void setDefaultEpsilon()
setEpsilonComparison(),
DEFAULT_COMPARISON_EPSILONpublic static final double getEpsilon()
setEpsilonComparison()public static final boolean checkIfEpsilonMode()
setEpsilonComparison(),
setExactComparison()public static final boolean checkIfExactMode()
setEpsilonComparison(),
setExactComparison()public static final double eq(double a,
double b)
a - the a number (a = b)b - the b number (a = b)public static final double neq(double a,
double b)
a - the a number (a <> b)b - the b number (a <> b)public static final double lt(double a,
double b)
a - the a number (a < b)b - the b number (a < b)public static final double gt(double a,
double b)
a - the a number (a > b)b - the b number (a > b)public static final double leq(double a,
double b)
a - the a number (a <= b)b - the b number (a <= b)public static final double geq(double a,
double b)
a - the a number (a >= b)b - the b number (a >= b)Copyright © 2020 MathParser.org. All rights reserved.