|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--shared.MLJ
This class contains methods and data members that were external to classes.
| Field Summary | |
static double |
clampingEpsilon
The clamping epsilon used to determine if a real value is significantly different from another value during clamping. |
static double |
realEpsilon
The clamping epsilon used to determine if a real value is significantly different from another value. |
static double |
storedRealEpsilon
The clamping epsilon used to determine if a real value is significantly different from another value. |
| Constructor Summary | |
MLJ()
|
|
| Method Summary | |
static void |
Abort()
Displays an error message stating an unexpected condition was reached. |
static boolean |
approx_equal(double[][] lhs,
double[][] rhs)
Compares two matrices of double values for equality. |
static boolean |
approx_equal(double[][] lhs,
double[][] rhs,
int precisionMultiplier)
Compares two matrices of double values for equality, using the given precisionMultiplier to drive approximate comparisons at each element. |
static boolean |
approx_equal(double[] lhs,
double[] rhs)
Compares two arrays of double values for equality. |
static boolean |
approx_equal(double[] lhs,
double[] rhs,
int precisionMultiplier)
Compares two arrays of doubles for equality, using the given precisionMultiplier to drive approximate comparisons at each element. |
static boolean |
approx_equal(double lhs,
double rhs)
Compares two double values for equality. |
static boolean |
approx_equal(double lhs,
double rhs,
int precMultiplier)
Compares two double values for equality, using the given precisionMultiplier to drive approximate comparisons. |
static boolean |
approx_equal(float lhs,
float rhs)
Compares two float values for equality. |
static boolean |
approx_equal(float lhs,
float rhs,
int precMultiplier)
Compares two float values for equality. |
static boolean |
approx_equal(java.util.Vector a,
java.util.Vector b)
Checks if two Vectors of DoubleRefs are approximately equivalent in values. |
static boolean |
approx_greater(double lhs,
double rhs)
Checks if the left value is greater than the right value. |
static boolean |
approx_greater(double lhs,
double rhs,
int precMultiplier)
Checks if the left value is greater than the right value. |
static boolean |
approx_less(double lhs,
double rhs)
Checks if the left value is less than the right value. |
static boolean |
approx_less(double lhs,
double rhs,
int precMultiplier)
Checks if the left value is less than the right value. |
static void |
ASSERT(boolean theItem,
java.lang.String statement)
If the boolean value given is FALSE, the statement given is displayed as part of an assertion error message. |
static void |
clamp_above(DoubleRef source,
double lowBound,
java.lang.String additionalErrMsg)
If the given source value is lower than the lower bound, the source value is changed to the lower bound value. |
static void |
clamp_above(DoubleRef source,
double lowBound,
java.lang.String additionalErrMsg,
int precMultiplier)
If the given source value is lower than the lower bound, the source value is changed to the lower bound value. |
static void |
clamp_below(DoubleRef source,
double highBound,
java.lang.String additionalErrMsg)
If the given source value is higher than the higher bound, the source value is changed to the higher bound value. |
static void |
clamp_below(DoubleRef source,
double highBound,
java.lang.String additionalErrMsg,
int precMultiplier)
If the given source value is higher than the higher bound, the source value is changed to the higher bound value. |
static void |
clamp_to_range(DoubleRef source,
double lowBound,
double highBound,
java.lang.String additionalErrMsg)
If the given source value is lower than the lower bound, the source value is changed to the lower bound value. |
static void |
clamp_to_range(DoubleRef source,
double lowBound,
double highBound,
java.lang.String additionalErrMsg,
int precMultiplier)
If the given source value is lower than the lower bound, the source value is changed to the lower bound value. |
static double |
log_bin(double number)
Returns the binary log of the given value. |
static double |
Mround(double x,
int digits)
Rounds the given value by the number of digits. |
static java.lang.String |
numberToString(double value,
int mantissa)
Converts a numerical value to String form. |
static java.lang.String |
numberToString(double value,
int total_length,
int mantissa)
Converts a numerical value to String form. |
static java.lang.String |
protect(java.lang.String stringToProtect,
java.lang.String protChars)
Substitutes characters with their protected versions. |
static double |
square_real(double x)
Squares the given real number. |
static void |
verify_approx_equal(double lhs,
double rhs,
java.lang.String errMsg)
Checks if the double values are approximately equal and displays an error message if they are not. |
static void |
verify_strictly_greater(double lhs,
double rhs,
java.lang.String additionalErrMsg)
Checks if the left value is significantly less than the right value. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final double realEpsilon
public static final double storedRealEpsilon
public static final double clampingEpsilon
| Constructor Detail |
public MLJ()
| Method Detail |
public static void clamp_above(DoubleRef source,
double lowBound,
java.lang.String additionalErrMsg)
source - The value to be clamped.lowBound - The lower bound.additionalErrMsg - Message to be displayed if clamping occurs.
public static void clamp_above(DoubleRef source,
double lowBound,
java.lang.String additionalErrMsg,
int precMultiplier)
source - The value to be clamped.lowBound - The lower bound.additionalErrMsg - Message to be displayed if clamping occurs.precMultiplier - The precision multiplier for real values that are close to the lower bound.
public static boolean approx_equal(double lhs,
double rhs)
lhs - The left value to be compared.rhs - The right value to be compared.
public static boolean approx_equal(double lhs,
double rhs,
int precMultiplier)
lhs - The left value to be compared.rhs - The right value to be compared.precMultiplier - The precision multiplier for determining if a value is signifacntly different.
public static boolean approx_equal(double[] lhs,
double[] rhs)
lhs - The left array to be compared.rhs - The right array to be compared.
public static boolean approx_equal(double[] lhs,
double[] rhs,
int precisionMultiplier)
lhs - The left array to be compared.rhs - The right array to be compared.precisionMultiplier - The precision multiplier for determining if a value is signifacntly different.
public static boolean approx_equal(double[][] lhs,
double[][] rhs)
lhs - The left matrix to be compared.rhs - The right matrix to be compared.
public static boolean approx_equal(double[][] lhs,
double[][] rhs,
int precisionMultiplier)
lhs - The left matrix to be compared.rhs - The right matrix to be compared.precisionMultiplier - The precision multiplier for determining if a value is signifacntly different.
public static void verify_approx_equal(double lhs,
double rhs,
java.lang.String errMsg)
lhs - The left value to be compared.rhs - The right value to be compared.errMsg - The error message to be displayed.
public static void clamp_to_range(DoubleRef source,
double lowBound,
double highBound,
java.lang.String additionalErrMsg)
source - The value to be clamped.lowBound - The lower bound.highBound - The higher bound.additionalErrMsg - An additional error message to be displayed if clamping occurs.
public static void clamp_to_range(DoubleRef source,
double lowBound,
double highBound,
java.lang.String additionalErrMsg,
int precMultiplier)
source - The value to be clamped.lowBound - The lower bound.highBound - The higher bound.additionalErrMsg - An additional error message to be displayed if clamping occurs.precMultiplier - The precision multiplier for real values that are close to the a bound.
public static void clamp_below(DoubleRef source,
double highBound,
java.lang.String additionalErrMsg)
source - The value to be clamped.highBound - The higher bound.additionalErrMsg - An additional error message to be displayed if clamping occurs.
public static void clamp_below(DoubleRef source,
double highBound,
java.lang.String additionalErrMsg,
int precMultiplier)
source - The value to be clamped.highBound - The higher bound.additionalErrMsg - An additional error message to be displayed if clamping occurs.precMultiplier - The precision multiplier for real values that are close to the higher bound.
public static void verify_strictly_greater(double lhs,
double rhs,
java.lang.String additionalErrMsg)
lhs - The left value.rhs - The right value.additionalErrMsg - An additional error message for display.
public static boolean approx_equal(float lhs,
float rhs)
lhs - The left value to be compared.rhs - The right value to be compared.
public static boolean approx_equal(float lhs,
float rhs,
int precMultiplier)
lhs - The left value compared.rhs - The right value compared.precMultiplier - The precision multiplier for determining if a value is signifacntly different.public static double log_bin(double number)
number - The value for which a log is requested.public static void Abort()
public static boolean approx_greater(double lhs,
double rhs)
lhs - The left value compared.rhs - The right value compared.
public static boolean approx_greater(double lhs,
double rhs,
int precMultiplier)
lhs - The left value compared.rhs - The right value compared.precMultiplier - The precision multiplier for determining if a value is signifacntly different.
public static boolean approx_less(double lhs,
double rhs)
lhs - The left value compared.rhs - The right value compared.
public static boolean approx_less(double lhs,
double rhs,
int precMultiplier)
lhs - The left value compared.rhs - The right value compared.precMultiplier - The precision multiplier for determining if a value is signifacntly different.
public static void ASSERT(boolean theItem,
java.lang.String statement)
theItem - FALSE if message displayed, TRUE otherwise.statement - The statement to be displayed.
public static java.lang.String numberToString(double value,
int total_length,
int mantissa)
value - The value to be converted.total_length - The total length of the resulting String.mantissa - The length of the mantissa.
public static java.lang.String numberToString(double value,
int mantissa)
value - The value to be converted.mantissa - The length of the mantissa.
public static java.lang.String protect(java.lang.String stringToProtect,
java.lang.String protChars)
stringToProtect - The String containing characters to be protected.protChars - The characters to be protected.public static double square_real(double x)
x - The number to be squared.
public static boolean approx_equal(java.util.Vector a,
java.util.Vector b)
a - The first Vector compared.b - The second Vector compared.
public static double Mround(double x,
int digits)
x - The value to be rounded.digits - The number of digits to be rounded off.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||