public class WrapperDoubleMatrix3D extends DoubleMatrix3D
Constructor and Description |
---|
WrapperDoubleMatrix3D(DoubleMatrix3D newContent) |
Modifier and Type | Method and Description |
---|---|
void |
dct2Slices(boolean scale)
Computes the 2D discrete cosine transform (DCT-II) of each slice of this
matrix.
|
void |
dct3(boolean scale)
Computes the 3D discrete cosine transform (DCT-II) of this matrix.
|
void |
dht2Slices()
Computes the 2D discrete Hertley transform (DHT) of each column of this
matrix.
|
void |
dht3()
Computes the 3D discrete Hartley transform (DHT) of this matrix.
|
void |
dst2Slices(boolean scale)
Computes the 2D discrete sine transform (DST-II) of each slice of this
matrix.
|
void |
dst3(boolean scale)
Computes the 3D discrete sine transform (DST-II) of this matrix.
|
Object |
elements()
Returns the elements of this matrix.
|
void |
fft3()
Computes the 3D discrete Fourier transform (DFT) of this matrix.
|
DenseLargeDComplexMatrix3D |
getFft2Slices()
Returns new complex matrix which is the 2D discrete Fourier transform
(DFT) of each slice of this matrix.
|
DenseLargeDComplexMatrix3D |
getFft3()
Returns new complex matrix which is the 3D discrete Fourier transform
(DFT) of this matrix.
|
DenseLargeDComplexMatrix3D |
getIfft2Slices(boolean scale)
Returns new complex matrix which is the 2D inverse of the discrete
Fourier transform (IDFT) of each slice of this matrix.
|
DenseLargeDComplexMatrix3D |
getIfft3(boolean scale)
Returns new complex matrix which is the 3D inverse of the discrete
Fourier transform (IDFT) of this matrix.
|
double |
getQuick(int slice,
int row,
int column)
Returns the matrix cell value at coordinate [slice,row,column].
|
void |
idct2Slices(boolean scale)
Computes the 2D inverse of the discrete cosine transform (DCT-III) of
each slice of this matrix.
|
void |
idct3(boolean scale)
Computes the 3D inverse of the discrete cosine transform (DCT-III) of
this matrix.
|
void |
idht2Slices(boolean scale)
Computes the 2D inverse of the discrete Hartley transform (DHT) of each
slice of this matrix.
|
void |
idht3(boolean scale)
Computes the 3D inverse of the discrete Hartley transform (DHT) of this
matrix.
|
void |
idst2Slices(boolean scale)
Computes the 2D inverse of the discrete sine transform (DST-III) of each
slice of this matrix.
|
void |
idst3(boolean scale)
Computes the 3D inverse of the discrete size transform (DST-III) of this
matrix.
|
void |
ifft3(boolean scale)
Computes the 3D inverse of the discrete Fourier transform (IDFT) of this
matrix.
|
DoubleMatrix3D |
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.
|
DoubleMatrix2D |
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.
|
DoubleMatrix1D |
vectorize()
Returns a vector obtained by stacking the columns of each slice of the
matrix on top of one another.
|
DoubleMatrix2D |
viewColumn(int column)
Constructs and returns a new 2-dimensional slice view representing
the slices and rows of the given column.
|
DoubleMatrix3D |
viewColumnFlip()
Constructs and returns a new flip view along the column axis.
|
DoubleMatrix3D |
viewDice(int axis0,
int axis1,
int axis2)
Constructs and returns a new dice view; Swaps dimensions (axes);
Example: 3 x 4 x 5 matrix --> 4 x 3 x 5 matrix.
|
DoubleMatrix3D |
viewPart(int slice,
int row,
int column,
int depth,
int height,
int width)
Constructs and returns a new sub-range view that is a
depth x height x width sub matrix starting at
[slice,row,column]; Equivalent to
view().part(slice,row,column,depth,height,width); Provided for
convenience only.
|
DoubleMatrix2D |
viewRow(int row)
Constructs and returns a new 2-dimensional slice view representing
the slices and columns of the given row.
|
DoubleMatrix3D |
viewRowFlip()
Constructs and returns a new flip view along the row axis.
|
DoubleMatrix3D |
viewSelection(int[] sliceIndexes,
int[] rowIndexes,
int[] columnIndexes)
Constructs and returns a new selection view that is a matrix
holding the indicated cells.
|
DoubleMatrix2D |
viewSlice(int slice)
Constructs and returns a new 2-dimensional slice view representing
the rows and columns of the given slice.
|
DoubleMatrix3D |
viewSliceFlip()
Constructs and returns a new flip view along the slice axis.
|
DoubleMatrix3D |
viewStrides(int _sliceStride,
int _rowStride,
int _columnStride)
Constructs and returns a new stride view which is a sub matrix
consisting of every i-th cell.
|
aggregate, aggregate, aggregate, aggregate, assign, assign, assign, assign, assign, assign, assign, assign, assign, cardinality, copy, equals, equals, get, getMaxLocation, getMinLocation, getNegativeValues, getNonZeros, getPositiveValues, like, normalize, set, toArray, toString, viewSelection, viewSorted, zAssign27Neighbors, zSum
checkShape, checkShape, columns, columnStride, index, rows, rowStride, size, slices, sliceStride, toStringShort
ensureCapacity, isView, trimToSize
clone
public WrapperDoubleMatrix3D(DoubleMatrix3D newContent)
public Object elements()
DoubleMatrix3D
elements
in class DoubleMatrix3D
public void dct3(boolean scale)
scale
- if true then scaling is performedpublic void dct2Slices(boolean scale)
scale
- if true then scaling is performedpublic void dst3(boolean scale)
scale
- if true then scaling is performedpublic void dst2Slices(boolean scale)
scale
- if true then scaling is performedpublic void dht3()
public void dht2Slices()
public void fft3()
this[k1][k2][2*k3] = Re[k1][k2][k3] = Re[(n1-k1)%n1][(n2-k2)%n2][n3-k3], this[k1][k2][2*k3+1] = Im[k1][k2][k3] = -Im[(n1-k1)%n1][(n2-k2)%n2][n3-k3], 0<=k1<n1, 0<=k2<n2, 0<k3<n3/2, this[k1][k2][0] = Re[k1][k2][0] = Re[(n1-k1)%n1][n2-k2][0], this[k1][k2][1] = Im[k1][k2][0] = -Im[(n1-k1)%n1][n2-k2][0], this[k1][n2-k2][1] = Re[(n1-k1)%n1][k2][n3/2] = Re[k1][n2-k2][n3/2], this[k1][n2-k2][0] = -Im[(n1-k1)%n1][k2][n3/2] = Im[k1][n2-k2][n3/2], 0<=k1<n1, 0<k2<n2/2, this[k1][0][0] = Re[k1][0][0] = Re[n1-k1][0][0], this[k1][0][1] = Im[k1][0][0] = -Im[n1-k1][0][0], this[k1][n2/2][0] = Re[k1][n2/2][0] = Re[n1-k1][n2/2][0], this[k1][n2/2][1] = Im[k1][n2/2][0] = -Im[n1-k1][n2/2][0], this[n1-k1][0][1] = Re[k1][0][n3/2] = Re[n1-k1][0][n3/2], this[n1-k1][0][0] = -Im[k1][0][n3/2] = Im[n1-k1][0][n3/2], this[n1-k1][n2/2][1] = Re[k1][n2/2][n3/2] = Re[n1-k1][n2/2][n3/2], this[n1-k1][n2/2][0] = -Im[k1][n2/2][n3/2] = Im[n1-k1][n2/2][n3/2], 0<k1<n1/2, this[0][0][0] = Re[0][0][0], this[0][0][1] = Re[0][0][n3/2], this[0][n2/2][0] = Re[0][n2/2][0], this[0][n2/2][1] = Re[0][n2/2][n3/2], this[n1/2][0][0] = Re[n1/2][0][0], this[n1/2][0][1] = Re[n1/2][0][n3/2], this[n1/2][n2/2][0] = Re[n1/2][n2/2][0], this[n1/2][n2/2][1] = Re[n1/2][n2/2][n3/2]This method computes only half of the elements of the real transform. The other half satisfies the symmetry condition. If you want the full real forward transform, use
getFft3
. To get back the original
data, use ifft3
.IllegalArgumentException
- if the slice size or the row size or the column size of this
matrix is not a power of 2 number.public DenseLargeDComplexMatrix3D getFft3()
public DenseLargeDComplexMatrix3D getIfft3(boolean scale)
public DenseLargeDComplexMatrix3D getFft2Slices()
public DenseLargeDComplexMatrix3D getIfft2Slices(boolean scale)
public void idct3(boolean scale)
scale
- if true then scaling is performedpublic void idct2Slices(boolean scale)
scale
- if true then scaling is performedpublic void idst3(boolean scale)
scale
- if true then scaling is performedpublic void idst2Slices(boolean scale)
scale
- if true then scaling is performedpublic void idht3(boolean scale)
scale
- if true then scaling is performedpublic void idht2Slices(boolean scale)
scale
- if true then scaling is performedpublic void ifft3(boolean scale)
this[k1][k2][2*k3] = Re[k1][k2][k3] = Re[(n1-k1)%n1][(n2-k2)%n2][n3-k3], this[k1][k2][2*k3+1] = Im[k1][k2][k3] = -Im[(n1-k1)%n1][(n2-k2)%n2][n3-k3], 0<=k1<n1, 0<=k2<n2, 0<k3<n3/2, this[k1][k2][0] = Re[k1][k2][0] = Re[(n1-k1)%n1][n2-k2][0], this[k1][k2][1] = Im[k1][k2][0] = -Im[(n1-k1)%n1][n2-k2][0], this[k1][n2-k2][1] = Re[(n1-k1)%n1][k2][n3/2] = Re[k1][n2-k2][n3/2], this[k1][n2-k2][0] = -Im[(n1-k1)%n1][k2][n3/2] = Im[k1][n2-k2][n3/2], 0<=k1<n1, 0<k2<n2/2, this[k1][0][0] = Re[k1][0][0] = Re[n1-k1][0][0], this[k1][0][1] = Im[k1][0][0] = -Im[n1-k1][0][0], this[k1][n2/2][0] = Re[k1][n2/2][0] = Re[n1-k1][n2/2][0], this[k1][n2/2][1] = Im[k1][n2/2][0] = -Im[n1-k1][n2/2][0], this[n1-k1][0][1] = Re[k1][0][n3/2] = Re[n1-k1][0][n3/2], this[n1-k1][0][0] = -Im[k1][0][n3/2] = Im[n1-k1][0][n3/2], this[n1-k1][n2/2][1] = Re[k1][n2/2][n3/2] = Re[n1-k1][n2/2][n3/2], this[n1-k1][n2/2][0] = -Im[k1][n2/2][n3/2] = Im[n1-k1][n2/2][n3/2], 0<k1<n1/2, this[0][0][0] = Re[0][0][0], this[0][0][1] = Re[0][0][n3/2], this[0][n2/2][0] = Re[0][n2/2][0], this[0][n2/2][1] = Re[0][n2/2][n3/2], this[n1/2][0][0] = Re[n1/2][0][0], this[n1/2][0][1] = Re[n1/2][0][n3/2], this[n1/2][n2/2][0] = Re[n1/2][n2/2][0], this[n1/2][n2/2][1] = Re[n1/2][n2/2][n3/2]This method computes only half of the elements of the real transform. The other half satisfies the symmetry condition. If you want the full real inverse transform, use
getIfft3
.scale
- if true then scaling is performedIllegalArgumentException
- if the slice size or the row size or the column size of this
matrix is not a power of 2 number.public double getQuick(int slice, int row, int column)
DoubleMatrix3D
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 DoubleMatrix3D
slice
- the index of the slice-coordinate.row
- the index of the row-coordinate.column
- the index of the column-coordinate.public DoubleMatrix3D like(int slices, int rows, int columns)
DoubleMatrix3D
like
in class DoubleMatrix3D
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 void setQuick(int slice, int row, int column, double value)
DoubleMatrix3D
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 DoubleMatrix3D
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 DoubleMatrix1D vectorize()
DoubleMatrix3D
vectorize
in class DoubleMatrix3D
public DoubleMatrix2D viewColumn(int column)
DoubleMatrix3D
To obtain a slice view on subranges, construct a sub-ranging view ( view().part(...)), then apply this method to the sub-range view. To obtain 1-dimensional views, apply this method, then apply another slice view (methods viewColumn, viewRow) on the intermediate 2-dimensional view. To obtain 1-dimensional views on subranges, apply both steps.
viewColumn
in class DoubleMatrix3D
column
- the index of the column to fix.DoubleMatrix3D.viewSlice(int)
,
DoubleMatrix3D.viewRow(int)
public DoubleMatrix3D viewColumnFlip()
DoubleMatrix3D
viewColumnFlip
in class DoubleMatrix3D
DoubleMatrix3D.viewSliceFlip()
,
DoubleMatrix3D.viewRowFlip()
public DoubleMatrix2D viewSlice(int slice)
DoubleMatrix3D
To obtain a slice view on subranges, construct a sub-ranging view ( view().part(...)), then apply this method to the sub-range view. To obtain 1-dimensional views, apply this method, then apply another slice view (methods viewColumn, viewRow) on the intermediate 2-dimensional view. To obtain 1-dimensional views on subranges, apply both steps.
viewSlice
in class DoubleMatrix3D
slice
- the index of the slice to fix.DoubleMatrix3D.viewRow(int)
,
DoubleMatrix3D.viewColumn(int)
public DoubleMatrix3D viewSliceFlip()
DoubleMatrix3D
viewSliceFlip
in class DoubleMatrix3D
DoubleMatrix3D.viewRowFlip()
,
DoubleMatrix3D.viewColumnFlip()
public DoubleMatrix3D viewDice(int axis0, int axis1, int axis2)
DoubleMatrix3D
viewDice
in class DoubleMatrix3D
axis0
- the axis that shall become axis 0 (legal values 0..2).axis1
- the axis that shall become axis 1 (legal values 0..2).axis2
- the axis that shall become axis 2 (legal values 0..2).public DoubleMatrix3D viewPart(int slice, int row, int column, int depth, int height, int width)
DoubleMatrix3D
viewPart
in class DoubleMatrix3D
slice
- The index of the slice-coordinate.row
- The index of the row-coordinate.column
- The index of the column-coordinate.depth
- The depth of the box.height
- The height of the box.width
- The width of the box.public DoubleMatrix2D viewRow(int row)
DoubleMatrix3D
To obtain a slice view on subranges, construct a sub-ranging view ( view().part(...)), then apply this method to the sub-range view. To obtain 1-dimensional views, apply this method, then apply another slice view (methods viewColumn, viewRow) on the intermediate 2-dimensional view. To obtain 1-dimensional views on subranges, apply both steps.
viewRow
in class DoubleMatrix3D
row
- the index of the row to fix.DoubleMatrix3D.viewSlice(int)
,
DoubleMatrix3D.viewColumn(int)
public DoubleMatrix3D viewRowFlip()
DoubleMatrix3D
viewRowFlip
in class DoubleMatrix3D
DoubleMatrix3D.viewSliceFlip()
,
DoubleMatrix3D.viewColumnFlip()
public DoubleMatrix3D viewSelection(int[] sliceIndexes, int[] rowIndexes, int[] columnIndexes)
DoubleMatrix3D
DoubleMatrix2D.viewSelection(int[],int[])
.
Note that modifying the index arguments after this call has returned has no effect on the view. The returned view is backed by this matrix, so changes in the returned view are reflected in this matrix, and vice-versa.
viewSelection
in class DoubleMatrix3D
sliceIndexes
- The slices of the cells that shall be visible in the new view.
To indicate that all slices shall be visible, simply
set this parameter to null.rowIndexes
- The rows of the cells that shall be visible in the new view.
To indicate that all rows shall be visible, simply set
this parameter to null.columnIndexes
- The columns of the cells that shall be visible in the new
view. To indicate that all columns shall be visible,
simply set this parameter to null.public DoubleMatrix3D viewStrides(int _sliceStride, int _rowStride, int _columnStride)
DoubleMatrix3D
viewStrides
in class DoubleMatrix3D
_sliceStride
- the slice step factor._rowStride
- the row step factor._columnStride
- the column step factor.public DoubleMatrix2D like2D(int rows, int columns)
DoubleMatrix3D
like2D
in class DoubleMatrix3D
rows
- the number of rows the matrix shall have.columns
- the number of columns the matrix shall have.Jump to the Parallel Colt Homepage