public class SparseDComplexMatrix3D extends DComplexMatrix3D
Constructor and Description |
---|
SparseDComplexMatrix3D(double[][][] values)
Constructs a matrix with a copy of the given values.
|
SparseDComplexMatrix3D(int slices,
int rows,
int columns)
Constructs a matrix with a given number of slices, rows and columns and
default memory usage.
|
Modifier and Type | Method and Description |
---|---|
DComplexMatrix3D |
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.
|
DoubleMatrix3D |
getImaginaryPart()
Returns the imaginary part of this matrix
|
double[] |
getQuick(int slice,
int row,
int column)
Returns the matrix cell value at coordinate [slice,row,column].
|
DoubleMatrix3D |
getRealPart()
Returns the real part of this matrix
|
long |
index(int slice,
int row,
int column)
Returns the position of the given coordinate within the (virtual or
non-virtual) internal 1-dimensional array.
|
DComplexMatrix3D |
like(int slices,
int rows,
int columns)
Construct and returns a new empty matrix of the same dynamic type
as the receiver, having the specified number of slices, rows and columns.
|
DComplexMatrix2D |
like2D(int rows,
int columns)
Construct and returns a new 2-d matrix of the corresponding dynamic
type, sharing the same cells.
|
void |
setQuick(int slice,
int row,
int column,
double[] value)
Sets the matrix cell at coordinate [slice,row,column] to the
specified value.
|
void |
setQuick(int slice,
int row,
int column,
double re,
double im)
Sets the matrix cell at coordinate [slice,row,column] to the
specified value.
|
DComplexMatrix1D |
vectorize()
Returns a vector obtained by stacking the columns of each slice of the
matrix on top of one another.
|
aggregate, aggregate, assign, assign, assign, assign, assign, assign, assign, assign, assignImaginary, assignReal, copy, equals, equals, get, getNonZeros, like, set, set, toArray, toString, toString, viewColumn, viewColumnFlip, viewDice, viewPart, viewRow, viewRowFlip, viewSelection, viewSelection, viewSlice, viewSliceFlip, viewStrides, zSum
checkShape, checkShape, columns, columnStride, rows, rowStride, size, slices, sliceStride, toStringShort
ensureCapacity, isView, trimToSize
clone
public SparseDComplexMatrix3D(double[][][] values)
The values are copied. So subsequent changes in values are not reflected in the matrix, and vice-versa.
values
- The values to be filled into the new matrix.IllegalArgumentException
- if
for any 1 <= slice < values.length: values[slice].length != values[slice-1].length
.IllegalArgumentException
- if
for any 1 <= row < values[0].length: values[slice][row].length != values[slice][row-1].length
.public SparseDComplexMatrix3D(int slices, int rows, int columns)
slices
- the number of slices the matrix shall have.rows
- the number of rows the matrix shall have.columns
- the number of columns the matrix shall have.IllegalArgumentException
- if (double)slices*columns*rows > Integer.MAX_VALUE.IllegalArgumentException
- if slices<0 || rows<0 || columns<0.public DComplexMatrix3D assign(double[] value)
DComplexMatrix3D
The values are copied. So subsequent changes in values are not reflected in the matrix, and vice-versa.
assign
in class DComplexMatrix3D
value
- the values to be filled into the cells.public int cardinality()
DComplexMatrix3D
cardinality
in class DComplexMatrix3D
public double[] getQuick(int slice, int row, int column)
DComplexMatrix3D
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): slice<0 || slice>=slices() || row<0 || row>=rows() || column<0 || column>=column().
getQuick
in class DComplexMatrix3D
slice
- the index of the slice-coordinate.row
- the index of the row-coordinate.column
- the index of the column-coordinate.public ConcurrentHashMap<Long,double[]> elements()
DComplexMatrix3D
elements
in class DComplexMatrix3D
public long index(int slice, int row, int column)
AbstractMatrix3D
index
in class AbstractMatrix3D
slice
- the index of the slice-coordinate.row
- the index of the row-coordinate.column
- the index of the third-coordinate.public DComplexMatrix3D like(int slices, int rows, int columns)
DComplexMatrix3D
like
in class DComplexMatrix3D
slices
- the number of slices the matrix shall have.rows
- the number of rows the matrix shall have.columns
- the number of columns the matrix shall have.public DComplexMatrix2D like2D(int rows, int columns)
DComplexMatrix3D
like2D
in class DComplexMatrix3D
rows
- the number of rows the matrix shall have.columns
- the number of columns the matrix shall have.public void setQuick(int slice, int row, int column, double[] value)
DComplexMatrix3D
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): slice<0 || slice>=slices() || row<0 || row>=rows() || column<0 || column>=column().
setQuick
in class DComplexMatrix3D
slice
- the index of the slice-coordinate.row
- the index of the row-coordinate.column
- the index of the column-coordinate.value
- the value to be filled into the specified cell.public void setQuick(int slice, int row, int column, double re, double im)
DComplexMatrix3D
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): slice<0 || slice>=slices() || row<0 || row>=rows() || column<0 || column>=column().
setQuick
in class DComplexMatrix3D
slice
- the index of the slice-coordinate.row
- the index of the row-coordinate.column
- the index of the column-coordinate.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 DComplexMatrix1D vectorize()
DComplexMatrix3D
vectorize
in class DComplexMatrix3D
public DoubleMatrix3D getImaginaryPart()
DComplexMatrix3D
getImaginaryPart
in class DComplexMatrix3D
public DoubleMatrix3D getRealPart()
DComplexMatrix3D
getRealPart
in class DComplexMatrix3D
Jump to the Parallel Colt Homepage