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