public class DoubleFactory1D extends PersistentObject
DoubleFactory1D F = DoubleFactory1D.dense; F.make(1000); F.descending(10); F.random(3); ... |
Modifier and Type | Field and Description |
---|---|
static DoubleFactory1D |
dense
A factory producing dense matrices.
|
static DoubleFactory1D |
sparse
A factory producing sparse matrices.
|
Modifier and Type | Method and Description |
---|---|
DoubleMatrix1D |
append(DoubleMatrix1D A,
DoubleMatrix1D B)
C = A||B; Constructs a new matrix which is the concatenation of two other
matrices.
|
DoubleMatrix1D |
ascending(int size)
Constructs a matrix with cells having ascending values.
|
DoubleMatrix1D |
descending(int size)
Constructs a matrix with cells having descending values.
|
DoubleMatrix1D |
make(AbstractDoubleList values)
Constructs a matrix from the values of the given list.
|
DoubleMatrix1D |
make(double[] values)
Constructs a matrix with the given cell values.
|
DoubleMatrix1D |
make(DoubleMatrix1D[] parts)
Constructs a matrix which is the concatenation of all given parts.
|
DoubleMatrix1D |
make(int size)
Constructs a matrix with the given shape, each cell initialized with
zero.
|
DoubleMatrix1D |
make(int size,
double initialValue)
Constructs a matrix with the given shape, each cell initialized with the
given value.
|
DoubleMatrix1D |
random(int size)
Constructs a matrix with uniformly distributed values in (0,1)
(exclusive).
|
DoubleMatrix1D |
repeat(DoubleMatrix1D A,
int repeat)
C = A||A||..||A; Constructs a new matrix which is concatenated
repeat times.
|
DoubleMatrix1D |
sample(int size,
double value,
double nonZeroFraction)
Constructs a randomly sampled matrix with the given shape.
|
DoubleArrayList |
toList(DoubleMatrix1D values)
Constructs a list from the given matrix.
|
clone
public static final DoubleFactory1D dense
public static final DoubleFactory1D sparse
public DoubleMatrix1D append(DoubleMatrix1D A, DoubleMatrix1D B)
public DoubleMatrix1D ascending(int size)
public DoubleMatrix1D descending(int size)
public DoubleMatrix1D make(AbstractDoubleList values)
values
- The values to be filled into the new matrix.public DoubleMatrix1D make(double[] values)
values
- The values to be filled into the new matrix.public DoubleMatrix1D make(DoubleMatrix1D[] parts)
public DoubleMatrix1D make(int size)
public DoubleMatrix1D make(int size, double initialValue)
public DoubleMatrix1D random(int size)
public DoubleMatrix1D repeat(DoubleMatrix1D A, int repeat)
0 1 repeat(3) --> 0 1 0 1 0 1
public DoubleMatrix1D sample(int size, double value, double nonZeroFraction)
IllegalArgumentException
- if nonZeroFraction < 0 || nonZeroFraction > 1.DoubleRandomSampler
public DoubleArrayList toList(DoubleMatrix1D values)
values
- The values to be filled into the new list.Jump to the Parallel Colt Homepage