public class Utils extends Object
Modifier and Type | Field and Description |
---|---|
static DComplexFunctions |
cfunc |
static double[] |
CNEG_ONE |
static double[] |
CONE |
static double[] |
CZERO |
static DoubleFunctions |
dfunc |
static double |
EPS
Machine epsilon.
|
static IntFunctions |
ifunc |
static double[] |
j |
static Utils |
util |
Modifier and Type | Method and Description |
---|---|
static boolean |
all(DoubleMatrix1D x) |
static boolean |
all(IntMatrix1D x) |
static boolean |
any(DoubleMatrix1D x) |
static IntMatrix1D |
any(DoubleMatrix2D x) |
static boolean |
any(int[] x) |
static boolean |
any(IntMatrix1D x) |
static DoubleMatrix1D |
append(DoubleMatrix1D x,
double a)
Appends a value to the given matrix.
|
static IntMatrix1D |
append(IntMatrix1D x,
int a)
Appends a value to the given matrix.
|
static DComplexMatrix1D |
complex(DoubleMatrix1D real,
DoubleMatrix1D imaginary) |
static DComplexMatrix2D |
complex(DoubleMatrix2D real,
DoubleMatrix2D imaginary) |
static DComplexMatrix1D |
cplxm(IntMatrix1D ix) |
static DoubleMatrix1D |
dbla(int[] ix) |
static DoubleMatrix1D |
dblm(IntMatrix1D ix) |
static double[] |
dcat(double[] a,
double[] b) |
static DoubleMatrix2D |
delete(DoubleMatrix2D m,
int idx) |
static DoubleMatrix2D |
delete(DoubleMatrix2D m,
int idx,
int axis) |
static DoubleMatrix1D |
diff(DoubleMatrix1D x) |
static IntMatrix1D |
diff(IntMatrix1D x) |
static double[] |
drange(double stop) |
static double[] |
drange(double start,
double stop) |
static double[] |
drange(double start,
double stop,
double step) |
static double[] |
drange(int stop) |
static double[] |
drange(int start,
int stop) |
static double[] |
drange(int start,
int stop,
int step) |
static int[] |
icat(int[] a,
int[] b) |
static int[] |
inta(DoubleMatrix1D d) |
static IntMatrix1D |
intm(DoubleMatrix1D d) |
static int[] |
irange(int stop) |
static int[] |
irange(int start,
int stop) |
static int[] |
irange(int start,
int stop,
int step) |
static double |
max(DoubleMatrix1D a) |
static int |
max(int[] t) |
static double |
min(DoubleMatrix1D a) |
static int[] |
nonzero(DoubleMatrix1D a) |
static int[] |
nonzero(IntMatrix1D a) |
static int[] |
ones(int size) |
static DComplexMatrix1D |
polar(DoubleMatrix1D r,
DoubleMatrix1D theta) |
static DComplexMatrix1D |
polar(DoubleMatrix1D r,
DoubleMatrix1D theta,
boolean radians) |
static DComplexMatrix2D |
polar(DoubleMatrix2D r,
DoubleMatrix2D theta) |
static DComplexMatrix2D |
polar(DoubleMatrix2D r,
DoubleMatrix2D theta,
boolean radians) |
static String[] |
scat(String[] a,
String[] b) |
static IntMatrix1D |
sub2ind(int rows,
int cols,
IntMatrix1D I,
IntMatrix1D J) |
static IntMatrix1D |
sub2ind(int rows,
int cols,
IntMatrix1D I,
IntMatrix1D J,
boolean row_major) |
static DComplexMatrix2D |
unflatten(DComplexMatrix1D a,
boolean col)
Creates a 2-dimensional copy of the given matrix
|
static DoubleMatrix2D |
unflatten(DoubleMatrix1D a,
boolean col)
Creates a 2-dimensional copy of the given matrix
|
static IntMatrix2D |
unflatten(IntMatrix1D a) |
static IntMatrix2D |
unflatten(IntMatrix1D a,
boolean col) |
static int[] |
zeros(int size) |
public static final IntFunctions ifunc
public static final DoubleFunctions dfunc
public static final DComplexFunctions cfunc
public static final double[] j
public static final double[] CZERO
public static final double[] CONE
public static final double[] CNEG_ONE
public static final Utils util
public static final double EPS
public static int[] irange(int stop)
stop
- public static int[] irange(int start, int stop)
start
- stop
- public static int[] irange(int start, int stop, int step)
start
- stop
- step
- public static double[] drange(int stop)
stop
- public static double[] drange(int start, int stop)
start
- stop
- public static double[] drange(int start, int stop, int step)
start
- stop
- step
- public static double[] drange(double stop)
stop
- public static double[] drange(double start, double stop)
start
- stop
- an arithmetic progression.public static double[] drange(double start, double stop, double step)
start
- stop
- step
- increment (or decrement)public static int[] zeros(int size)
n
- public static int[] ones(int size)
size
- array lengthpublic static int[] inta(DoubleMatrix1D d)
d
- public static IntMatrix1D intm(DoubleMatrix1D d)
d
- public static DoubleMatrix1D dbla(int[] ix)
d
- public static DoubleMatrix1D dblm(IntMatrix1D ix)
d
- public static DComplexMatrix1D cplxm(IntMatrix1D ix)
d
- public static double max(DoubleMatrix1D a)
a
- public static double min(DoubleMatrix1D a)
a
- public static int max(int[] t)
t
- public static int[] icat(int[] a, int[] b)
a
- b
- public static double[] dcat(double[] a, double[] b)
a
- b
- public static int[] nonzero(IntMatrix1D a)
a
- public static int[] nonzero(DoubleMatrix1D a)
a
- public static DComplexMatrix1D polar(DoubleMatrix1D r, DoubleMatrix1D theta)
r
- polar radius.theta
- polar angle in radians.public static DComplexMatrix1D polar(DoubleMatrix1D r, DoubleMatrix1D theta, boolean radians)
r
- polar radius.theta
- polar angle.radians
- is 'theta' expressed in radians.public static DComplexMatrix2D polar(DoubleMatrix2D r, DoubleMatrix2D theta)
public static DComplexMatrix2D polar(DoubleMatrix2D r, DoubleMatrix2D theta, boolean radians)
public static IntMatrix1D diff(IntMatrix1D x)
x
- public static DoubleMatrix1D diff(DoubleMatrix1D x)
x
- public static boolean any(int[] x)
x
- an array of integers.public static boolean any(IntMatrix1D x)
x
- a vector of integers.public static boolean any(DoubleMatrix1D x)
x
- a vector of doubles.public static IntMatrix1D any(DoubleMatrix2D x)
x
- public static boolean all(IntMatrix1D x)
x
- a vector of integers.public static boolean all(DoubleMatrix1D x)
x
- a vector of doubles.public static DComplexMatrix1D complex(DoubleMatrix1D real, DoubleMatrix1D imaginary)
real
- real component, may be nullimaginary
- imaginary component, may be nullpublic static DComplexMatrix2D complex(DoubleMatrix2D real, DoubleMatrix2D imaginary)
real
- real component, may be nullimaginary
- imaginary component, may be nullpublic static IntMatrix1D sub2ind(int rows, int cols, IntMatrix1D I, IntMatrix1D J)
rows
- cols
- I
- J
- public static IntMatrix1D sub2ind(int rows, int cols, IntMatrix1D I, IntMatrix1D J, boolean row_major)
rows
- cols
- I
- J
- row_major
- public static DoubleMatrix1D append(DoubleMatrix1D x, double a)
x
- input matrix of length na
- value to appendpublic static IntMatrix1D append(IntMatrix1D x, int a)
x
- input matrix of length na
- value to appendpublic static DoubleMatrix2D unflatten(DoubleMatrix1D a, boolean col)
a
- 1D input matrixcol
- create a column vector?public static DComplexMatrix2D unflatten(DComplexMatrix1D a, boolean col)
a
- 1D input matrixcol
- create a column vector?public static IntMatrix2D unflatten(IntMatrix1D a)
public static IntMatrix2D unflatten(IntMatrix1D a, boolean col)
public static DoubleMatrix2D delete(DoubleMatrix2D m, int idx)
public static DoubleMatrix2D delete(DoubleMatrix2D m, int idx, int axis)
Jump to the Parallel Colt Homepage