public class SparseDComplexMatrix1D extends DComplexMatrix1D
Constructor and Description |
---|
SparseDComplexMatrix1D(double[] values)
Constructs a matrix with a copy of the given values.
|
SparseDComplexMatrix1D(int size)
Constructs a matrix with a given number of cells.
|
Modifier and Type | Method and Description |
---|---|
DComplexMatrix1D |
assign(double[] 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,double[]> |
elements()
Returns the elements of this matrix.
|
DoubleMatrix1D |
getImaginaryPart()
Returns the imaginary part of this matrix
|
double[] |
getQuick(int index)
Returns the matrix cell value at coordinate index.
|
DoubleMatrix1D |
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.
|
DComplexMatrix1D |
like(int size)
Construct and returns a new empty matrix of the same dynamic type
as the receiver, having the specified size.
|
DComplexMatrix2D |
like2D(int rows,
int columns)
Construct and returns a new 2-d matrix of the corresponding dynamic
type, entirely independent of the receiver.
|
DComplexMatrix2D |
reshape(int rows,
int columns)
Returns new DoubleMatrix2D of size rows x columns whose elements are
taken column-wise from this matrix.
|
DComplexMatrix3D |
reshape(int slices,
int rows,
int columns)
Returns new DoubleMatrix3D of size slices x rows x columns, whose
elements are taken column-wise from this matrix.
|
void |
setQuick(int index,
double[] value)
Sets the matrix cell at coordinate index to the specified value.
|
void |
setQuick(int index,
double re,
double im)
Sets the matrix cell at coordinate index to the specified value.
|
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
checkSize, size, stride, toStringShort
ensureCapacity, isView, trimToSize
clone
public SparseDComplexMatrix1D(double[] values)
values
- The values to be filled into the new matrix.public SparseDComplexMatrix1D(int size)
size
- the number of cells the matrix shall have.IllegalArgumentException
- if size<0.public DComplexMatrix1D assign(double[] value)
DComplexMatrix1D
The values are copied. So subsequent changes in values are not reflected in the matrix, and vice-versa.
assign
in class DComplexMatrix1D
value
- the values to be filled into the cells.public int cardinality()
DComplexMatrix1D
cardinality
in class DComplexMatrix1D
public double[] getQuick(int index)
DComplexMatrix1D
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 DComplexMatrix1D
index
- the index of the cell.public ConcurrentHashMap<Long,double[]> elements()
DComplexMatrix1D
elements
in class DComplexMatrix1D
public long index(int rank)
AbstractMatrix1D
index
in class AbstractMatrix1D
rank
- the rank of the element.public DComplexMatrix1D like(int size)
DComplexMatrix1D
like
in class DComplexMatrix1D
size
- the number of cell the matrix shall have.public DComplexMatrix2D like2D(int rows, int columns)
DComplexMatrix1D
like2D
in class DComplexMatrix1D
rows
- the number of rows the matrix shall have.columns
- the number of columns the matrix shall have.public DComplexMatrix2D reshape(int rows, int columns)
DComplexMatrix1D
reshape
in class DComplexMatrix1D
rows
- number of rowscolumns
- number of columnspublic DComplexMatrix3D reshape(int slices, int rows, int columns)
DComplexMatrix1D
reshape
in class DComplexMatrix1D
rows
- number of rowscolumns
- number of columnspublic void setQuick(int index, double[] value)
DComplexMatrix1D
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 DComplexMatrix1D
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, double re, double im)
DComplexMatrix1D
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 DComplexMatrix1D
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 DoubleMatrix1D getImaginaryPart()
DComplexMatrix1D
getImaginaryPart
in class DComplexMatrix1D
public DoubleMatrix1D getRealPart()
DComplexMatrix1D
getRealPart
in class DComplexMatrix1D
Jump to the Parallel Colt Homepage