ArithmeticUtils, Precision, MathArrays
| Modifier and Type | Field and Description |
|---|---|
| public static final double | PI_SQUARED
\(\pi^2\) |
| public static final double | TWO_PI
\(2\pi\) |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static void | |
| public static void | checkNotNull(Object
Object to be checked. o, Localizable Message pattern. pattern, Object... Arguments to replace the placeholders in args)pattern.Checks that an object is not null. |
| public static void | |
| public static byte | Returns: a value with magnitude equal tomagnitude and with the
same sign as the sign argument.Magnitude of the returned value. magnitude, byte Sign of the returned value. sign)Returns the first argument with the sign of the second argument. |
| public static short | Returns: a value with magnitude equal tomagnitude and with the
same sign as the sign argument.Magnitude of the returned value. magnitude, short Sign of the returned value. sign)Returns the first argument with the sign of the second argument. |
| public static int | Returns: a value with magnitude equal tomagnitude and with the
same sign as the sign argument.Magnitude of the returned value. magnitude, int Sign of the returned value. sign)Returns the first argument with the sign of the second argument. |
| public static long | Returns: a value with magnitude equal tomagnitude and with the
same sign as the sign argument.Magnitude of the returned value. magnitude, long Sign of the returned value. sign)Returns the first argument with the sign of the second argument. |
| public static boolean | Returns: new Double(x).equals(new Double(y))Value x, double Value y)Returns |
| public static int | Returns: the hash codethe value to be hashed value)Returns an integer hash code representing the given double value. |
| public static int | Returns: the hash codethe value to be hashed (may be null) value)Returns an integer hash code representing the given double array. |
| public static < the type of the field elements T extends RealFieldElement | Returns: max(a1, e2)first element e1, final T second element e2)Find the maximum of two field elements. |
| public static < the type of the field elements T extends RealFieldElement | Returns: min(a1, e2)first element e1, final T second element e2)Find the minimum of two field elements. |
| public static double | Returns: a-2kπ with integer k and center-π <= a-2kπ <= center+πangle to normalize a, double center of the desired 2π interval for the result center)Normalize an angle in a 2π wide interval around a center value. |
| public static double | Returns: the value, within the interval[0 |period|),
that corresponds to a.Value to reduce. a, double Period. period, double Value that will be mapped to offset)0.Reduce |
| PI_SQUARED | back to summary |
|---|---|
| public static final double PI_SQUARED \(\pi^2\)
| |
| TWO_PI | back to summary |
|---|---|
| public static final double TWO_PI \(2\pi\)
| |
| MathUtils | back to summary |
|---|---|
| private MathUtils() Class contains only static methods. | |
| checkFinite | back to summary |
|---|---|
| public static void checkFinite(final double x) throws NotFiniteNumberException Check that the argument is a real number.
| |
| checkFinite | back to summary |
|---|---|
| public static void checkFinite(final double[] val) throws NotFiniteNumberException Check that all the elements are real numbers.
| |
| checkNotNull | back to summary |
|---|---|
| public static void checkNotNull(Object o, Localizable pattern, Object... args) throws NullArgumentException Checks that an object is not null.
| |
| checkNotNull | back to summary |
|---|---|
| public static void checkNotNull(Object o) throws NullArgumentException Checks that an object is not null.
| |
| copySign | back to summary |
|---|---|
| public static byte copySign(byte magnitude, byte sign) throws MathArithmeticException Returns the first argument with the sign of the second argument.
| |
| copySign | back to summary |
|---|---|
| public static short copySign(short magnitude, short sign) throws MathArithmeticException Returns the first argument with the sign of the second argument.
| |
| copySign | back to summary |
|---|---|
| public static int copySign(int magnitude, int sign) throws MathArithmeticException Returns the first argument with the sign of the second argument.
| |
| copySign | back to summary |
|---|---|
| public static long copySign(long magnitude, long sign) throws MathArithmeticException Returns the first argument with the sign of the second argument.
| |
| equals | back to summary |
|---|---|
| public static boolean equals(double x, double y) Returns
| |
| hash | back to summary |
|---|---|
| public static int hash(double value) Returns an integer hash code representing the given double value.
| |
| hash | back to summary |
|---|---|
| public static int hash(double[] value) Returns an integer hash code representing the given double array.
| |
| max | back to summary |
|---|---|
| public static <T extends RealFieldElement Find the maximum of two field elements.
| |
| min | back to summary |
|---|---|
| public static <T extends RealFieldElement Find the minimum of two field elements.
| |
| normalizeAngle | back to summary |
|---|---|
| public static double normalizeAngle(double a, double center) Normalize an angle in a 2π wide interval around a center value. This method has three main uses:
Note that due to numerical accuracy and since π cannot be represented exactly, the result interval is closed, it cannot be half-closed as would be more satisfactory in a purely mathematical view.
| |
| reduce | back to summary |
|---|---|
| public static double reduce(double a, double period, double offset) Reduce Specifically, the value returned is If any of the parameters are
| |