public class UtilEjml
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static double |
EPS |
static float |
F_EPS |
static float |
F_PI |
static float |
F_PI2 |
static float |
F_PId2 |
static int |
maxInverseSize |
static double |
PI |
static double |
PI2 |
static double |
PId2 |
static float |
TEST_F32 |
static float |
TEST_F32_SQ |
static double |
TEST_F64 |
static double |
TEST_F64_SQ |
static float |
TESTP_F32 |
static double |
TESTP_F64 |
| Constructor and Description |
|---|
UtilEjml() |
| Modifier and Type | Method and Description |
|---|---|
static double[] |
adjust(DGrowArray gwork,
int desired)
Resizes the array to ensure that it is at least of length desired and returns its internal array
|
static int[] |
adjust(IGrowArray gwork,
int desired)
Resizes the array to ensure that it is at least of length desired and returns its internal array
|
static int[] |
adjust(IGrowArray gwork,
int desired,
int zeroToM) |
static int[] |
adjustClear(IGrowArray gwork,
int desired) |
static java.lang.String |
fancyString(double value,
java.text.DecimalFormat format,
boolean hasSpace,
int length,
int significant) |
static java.lang.String |
fancyString(double value,
java.text.DecimalFormat format,
int length,
int significant) |
static java.lang.String |
fancyStringF(double value,
java.text.DecimalFormat format,
int length,
int significant)
Fixed length fancy formatting for doubles.
|
static boolean |
isIdentical(double a,
double b,
double tol) |
static boolean |
isIdentical(float a,
float b,
float tol) |
static boolean |
isUncountable(double val) |
static boolean |
isUncountable(float val) |
static double |
max(double[] array,
int start,
int length) |
static float |
max(float[] array,
int start,
int length) |
static void |
memset(double[] data,
double val,
int length) |
static void |
memset(int[] data,
int val,
int length) |
static DMatrixRMaj |
parse_DDRM(java.lang.String s,
int numColumns)
Give a string of numbers it returns a DenseMatrix
|
static DMatrixSparseCSC |
parse_DSCC(java.lang.String s,
int numColumns) |
static FMatrixRMaj |
parse_FDRM(java.lang.String s,
int numColumns)
Give a string of numbers it returns a DenseMatrix
|
static int |
permutationSign(int[] p,
int N,
int[] work) |
static int[] |
pivotVector(int[] pivots,
int length,
IGrowArray storage) |
static float[] |
randomVector_F32(java.util.Random rand,
int length) |
static double[] |
randomVector_F64(java.util.Random rand,
int length) |
static <S extends Matrix,D extends Matrix> |
safe(LinearSolver<S,D> solver)
Wraps a linear solver of any type with a safe solver the ensures inputs are not modified
|
static <D extends ReshapeMatrix> |
safe(LinearSolverDense<D> solver) |
static <T> void |
setnull(T[] array) |
static void |
shuffle(int[] list,
int N,
int start,
int end,
java.util.Random rand) |
static int[] |
shuffled(int N,
int shuffleUpTo,
java.util.Random rand) |
static int[] |
shuffled(int N,
java.util.Random rand) |
static int[] |
shuffledSorted(int N,
int shuffleUpTo,
java.util.Random rand) |
static java.lang.Integer[] |
sortByIndex(double[] data,
int size) |
static java.lang.String |
stringShapes(Matrix A,
Matrix B) |
static java.lang.String |
stringShapes(Matrix A,
Matrix B,
Matrix C) |
public static double EPS
public static float F_EPS
public static double PI
public static double PI2
public static double PId2
public static float F_PI
public static float F_PI2
public static float F_PId2
public static float TEST_F32
public static double TEST_F64
public static float TESTP_F32
public static double TESTP_F64
public static float TEST_F32_SQ
public static double TEST_F64_SQ
public static int maxInverseSize
public static <S extends Matrix,D extends Matrix> LinearSolver<S,D> safe(LinearSolver<S,D> solver)
public static <D extends ReshapeMatrix> LinearSolverDense<D> safe(LinearSolverDense<D> solver)
public static boolean isUncountable(double val)
public static boolean isUncountable(float val)
public static boolean isIdentical(double a,
double b,
double tol)
public static boolean isIdentical(float a,
float b,
float tol)
public static void memset(double[] data,
double val,
int length)
public static void memset(int[] data,
int val,
int length)
public static <T> void setnull(T[] array)
public static double max(double[] array,
int start,
int length)
public static float max(float[] array,
int start,
int length)
public static DMatrixRMaj parse_DDRM(java.lang.String s, int numColumns)
public static FMatrixRMaj parse_FDRM(java.lang.String s, int numColumns)
public static java.lang.Integer[] sortByIndex(double[] data,
int size)
public static DMatrixSparseCSC parse_DSCC(java.lang.String s, int numColumns)
public static int[] shuffled(int N,
java.util.Random rand)
public static int[] shuffled(int N,
int shuffleUpTo,
java.util.Random rand)
public static int[] shuffledSorted(int N,
int shuffleUpTo,
java.util.Random rand)
public static void shuffle(int[] list,
int N,
int start,
int end,
java.util.Random rand)
public static int[] pivotVector(int[] pivots,
int length,
IGrowArray storage)
public static int permutationSign(int[] p,
int N,
int[] work)
public static double[] randomVector_F64(java.util.Random rand,
int length)
public static float[] randomVector_F32(java.util.Random rand,
int length)
public static java.lang.String fancyStringF(double value,
java.text.DecimalFormat format,
int length,
int significant)
value - value being formattedformat - default format before exponentiallength - Maximum number of characters it can take.significant - Number of significant decimal digits to show at a minimum.public static java.lang.String fancyString(double value,
java.text.DecimalFormat format,
int length,
int significant)
public static java.lang.String fancyString(double value,
java.text.DecimalFormat format,
boolean hasSpace,
int length,
int significant)
public static int[] adjust(IGrowArray gwork, int desired)
public static int[] adjust(IGrowArray gwork, int desired, int zeroToM)
public static int[] adjustClear(IGrowArray gwork, int desired)
public static double[] adjust(DGrowArray gwork, int desired)