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