|
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.AbstractMatrix
cern.colt.matrix.AbstractMatrix1D
cern.colt.matrix.tfcomplex.FComplexMatrix1D
cern.colt.matrix.tfcomplex.impl.SparseFComplexMatrix1D
public class SparseFComplexMatrix1D
Sparse hashed 1-d matrix (aka vector) holding complex elements. This implementation uses ConcurrentHashMap
Constructor Summary | |
---|---|
SparseFComplexMatrix1D(float[] values)
Constructs a matrix with a copy of the given values. |
|
SparseFComplexMatrix1D(int size)
Constructs a matrix with a given number of cells. |
Method Summary | |
---|---|
FComplexMatrix1D |
assign(float[] value)
Sets all cells to the state specified by values. |
int |
cardinality()
Returns the number of cells having non-zero values; ignores tolerance. |
ConcurrentHashMap<Long,float[]> |
elements()
Returns the elements of this matrix. |
FloatMatrix1D |
getImaginaryPart()
Returns the imaginary part of this matrix |
float[] |
getQuick(int index)
Returns the matrix cell value at coordinate index. |
FloatMatrix1D |
getRealPart()
Returns the real part of this matrix |
long |
index(int rank)
Returns the position of the element with the given relative rank within the (virtual or non-virtual) internal 1-dimensional array. |
FComplexMatrix1D |
like(int size)
Construct and returns a new empty matrix of the same dynamic type as the receiver, having the specified size. |
FComplexMatrix2D |
like2D(int rows,
int columns)
Construct and returns a new 2-d matrix of the corresponding dynamic type, entirely independent of the receiver. |
FComplexMatrix2D |
reshape(int rows,
int columns)
Returns new FloatMatrix2D of size rows x columns whose elements are taken column-wise from this matrix. |
FComplexMatrix3D |
reshape(int slices,
int rows,
int columns)
Returns new FloatMatrix3D of size slices x rows x columns, whose elements are taken column-wise from this matrix. |
void |
setQuick(int index,
float[] value)
Sets the matrix cell at coordinate index to the specified value. |
void |
setQuick(int index,
float re,
float im)
Sets the matrix cell at coordinate index to the specified value. |
Methods inherited from class cern.colt.matrix.tfcomplex.FComplexMatrix1D |
---|
aggregate, aggregate, assign, assign, assign, assign, assign, assign, assign, assignImaginary, assignReal, copy, equals, equals, get, getNonZeros, like, set, set, swap, toArray, toArray, toString, toString, viewFlip, viewPart, viewSelection, viewSelection, viewStrides, zDotProduct, zDotProduct, zDotProduct, zSum |
Methods inherited from class cern.colt.matrix.AbstractMatrix1D |
---|
checkSize, size, stride, toStringShort |
Methods inherited from class cern.colt.matrix.AbstractMatrix |
---|
ensureCapacity, isView, trimToSize |
Methods inherited from class cern.colt.PersistentObject |
---|
clone |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SparseFComplexMatrix1D(float[] values)
values
- The values to be filled into the new matrix.public SparseFComplexMatrix1D(int size)
size
- the number of cells the matrix shall have.
IllegalArgumentException
- if size<0.Method Detail |
---|
public FComplexMatrix1D assign(float[] value)
FComplexMatrix1D
The values are copied. So subsequent changes in values are not reflected in the matrix, and vice-versa.
assign
in class FComplexMatrix1D
value
- the values to be filled into the cells.
public int cardinality()
FComplexMatrix1D
cardinality
in class FComplexMatrix1D
public float[] getQuick(int index)
FComplexMatrix1D
Provided with invalid parameters this method may return invalid objects without throwing any exception. You should only use this method when you are absolutely sure that the coordinate is within bounds. Precondition (unchecked): index<0 || index>=size().
getQuick
in class FComplexMatrix1D
index
- the index of the cell.
public ConcurrentHashMap<Long,float[]> elements()
FComplexMatrix1D
elements
in class FComplexMatrix1D
public long index(int rank)
AbstractMatrix1D
index
in class AbstractMatrix1D
rank
- the rank of the element.public FComplexMatrix1D like(int size)
FComplexMatrix1D
like
in class FComplexMatrix1D
size
- the number of cell the matrix shall have.
public FComplexMatrix2D like2D(int rows, int columns)
FComplexMatrix1D
like2D
in class FComplexMatrix1D
rows
- the number of rows the matrix shall have.columns
- the number of columns the matrix shall have.
public FComplexMatrix2D reshape(int rows, int columns)
FComplexMatrix1D
reshape
in class FComplexMatrix1D
rows
- number of rowscolumns
- number of columns
public FComplexMatrix3D reshape(int slices, int rows, int columns)
FComplexMatrix1D
reshape
in class FComplexMatrix1D
rows
- number of rowscolumns
- number of columns
public void setQuick(int index, float[] value)
FComplexMatrix1D
Provided with invalid parameters this method may access illegal indexes without throwing any exception. You should only use this method when you are absolutely sure that the coordinate is within bounds. Precondition (unchecked): index<0 || index>=size().
setQuick
in class FComplexMatrix1D
index
- the index of the cell.value
- the value to be filled into the specified cell (re=value[0],
im=value[1]).public void setQuick(int index, float re, float im)
FComplexMatrix1D
Provided with invalid parameters this method may access illegal indexes without throwing any exception. You should only use this method when you are absolutely sure that the coordinate is within bounds. Precondition (unchecked): index<0 || index>=size().
setQuick
in class FComplexMatrix1D
index
- the index of the cell.re
- the real part of the value to be filled into the specified
cell.im
- the imaginary part of the value to be filled into the
specified cell.public FloatMatrix1D getImaginaryPart()
FComplexMatrix1D
getImaginaryPart
in class FComplexMatrix1D
public FloatMatrix1D getRealPart()
FComplexMatrix1D
getRealPart
in class FComplexMatrix1D
|
Parallel Colt 0.9.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |