|
Parallel Colt 0.9.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcern.colt.PersistentObject
cern.colt.matrix.tfloat.FloatFactory1D
public class FloatFactory1D
Factory for convenient construction of 1-d matrices holding float cells. Use idioms like FloatFactory1D.dense.make(1000) to construct dense matrices, FloatFactory1D.sparse.make(1000) to construct sparse matrices. If the factory is used frequently it might be useful to streamline the notation. For example by aliasing:
FloatFactory1D F = FloatFactory1D.dense; F.make(1000); F.descending(10); F.random(3); ... |
Field Summary | |
---|---|
static FloatFactory1D |
dense
A factory producing dense matrices. |
static FloatFactory1D |
sparse
A factory producing sparse matrices. |
Method Summary | |
---|---|
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. |
Methods inherited from class cern.colt.PersistentObject |
---|
clone |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final FloatFactory1D dense
public static final FloatFactory1D sparse
Method Detail |
---|
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.
|
Parallel Colt 0.9.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |