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