Class WrapperDComplexMatrix1D
- java.lang.Object
-
- cern.colt.PersistentObject
-
- cern.colt.matrix.AbstractMatrix
-
- cern.colt.matrix.AbstractMatrix1D
-
- cern.colt.matrix.tdcomplex.DComplexMatrix1D
-
- cern.colt.matrix.tdcomplex.impl.WrapperDComplexMatrix1D
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class WrapperDComplexMatrix1D extends DComplexMatrix1D
1-d matrix holding complex elements; either a view wrapping another matrix or a matrix whose views are wrappers.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description WrapperDComplexMatrix1D(DComplexMatrix1D newContent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectelements()Returns the elements of this matrix.DoubleMatrix1DgetImaginaryPart()Returns the imaginary part of this matrixdouble[]getQuick(int index)Returns the matrix cell value at coordinate index.DoubleMatrix1DgetRealPart()Returns the real part of this matrixDComplexMatrix1Dlike(int size)Construct and returns a new empty matrix of the same dynamic type as the receiver, having the specified size.DComplexMatrix2Dlike2D(int rows, int columns)Construct and returns a new 2-d matrix of the corresponding dynamic type, entirely independent of the receiver.DComplexMatrix2Dreshape(int rows, int columns)Returns new DoubleMatrix2D of size rows x columns whose elements are taken column-wise from this matrix.DComplexMatrix3Dreshape(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.voidsetQuick(int index, double[] value)Sets the matrix cell at coordinate index to the specified value.voidsetQuick(int index, double re, double im)Sets the matrix cell at coordinate index to the specified value.DComplexMatrix1DviewFlip()Constructs and returns a new flip view.DComplexMatrix1DviewPart(int index, int width)Constructs and returns a new sub-range view that is a width sub matrix starting at index.DComplexMatrix1DviewSelection(int[] indexes)Constructs and returns a new selection view that is a matrix holding the indicated cells.DComplexMatrix1DviewStrides(int _stride)Constructs and returns a new stride view which is a sub matrix consisting of every i-th cell.-
Methods inherited from class cern.colt.matrix.tdcomplex.DComplexMatrix1D
aggregate, aggregate, assign, assign, assign, assign, assign, assign, assign, assign, assignImaginary, assignReal, cardinality, copy, equals, equals, get, getNonZeros, like, set, set, swap, toArray, toArray, toString, toString, viewSelection, zDotProduct, zDotProduct, zDotProduct, zSum
-
Methods inherited from class cern.colt.matrix.AbstractMatrix1D
checkSize, index, size, stride, toStringShort
-
Methods inherited from class cern.colt.matrix.AbstractMatrix
ensureCapacity, isView, trimToSize
-
Methods inherited from class cern.colt.PersistentObject
clone
-
-
-
-
Constructor Detail
-
WrapperDComplexMatrix1D
public WrapperDComplexMatrix1D(DComplexMatrix1D newContent)
-
-
Method Detail
-
getQuick
public double[] getQuick(int index)
Description copied from class:DComplexMatrix1DReturns the matrix cell value at coordinate index.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().
- Specified by:
getQuickin classDComplexMatrix1D- Parameters:
index- the index of the cell.- Returns:
- the value of the specified cell.
-
elements
public java.lang.Object elements()
Description copied from class:DComplexMatrix1DReturns the elements of this matrix.- Specified by:
elementsin classDComplexMatrix1D- Returns:
- the elements
-
like
public DComplexMatrix1D like(int size)
Description copied from class:DComplexMatrix1DConstruct and returns a new empty matrix of the same dynamic type as the receiver, having the specified size. For example, if the receiver is an instance of type DenseDComplexMatrix1D the new matrix must also be of type DenseDComplexMatrix1D. In general, the new matrix should have internal parametrization as similar as possible.- Specified by:
likein classDComplexMatrix1D- Parameters:
size- the number of cell the matrix shall have.- Returns:
- a new empty matrix of the same dynamic type.
-
like2D
public DComplexMatrix2D like2D(int rows, int columns)
Description copied from class:DComplexMatrix1DConstruct and returns a new 2-d matrix of the corresponding dynamic type, entirely independent of the receiver. For example, if the receiver is an instance of type DenseDComplexMatrix1D the new matrix must be of type DenseDComplexMatrix2D.- Specified by:
like2Din classDComplexMatrix1D- Parameters:
rows- the number of rows the matrix shall have.columns- the number of columns the matrix shall have.- Returns:
- a new matrix of the corresponding dynamic type.
-
reshape
public DComplexMatrix2D reshape(int rows, int columns)
Description copied from class:DComplexMatrix1DReturns new DoubleMatrix2D of size rows x columns whose elements are taken column-wise from this matrix.- Specified by:
reshapein classDComplexMatrix1D- Parameters:
rows- number of rowscolumns- number of columns- Returns:
- new 2D matrix with columns being the elements of this matrix.
-
reshape
public DComplexMatrix3D reshape(int slices, int rows, int columns)
Description copied from class:DComplexMatrix1DReturns new DoubleMatrix3D of size slices x rows x columns, whose elements are taken column-wise from this matrix.- Specified by:
reshapein classDComplexMatrix1Drows- number of rowscolumns- number of columns- Returns:
- new 2D matrix with columns being the elements of this matrix.
-
setQuick
public void setQuick(int index, double[] value)Description copied from class:DComplexMatrix1DSets the matrix cell at coordinate index to the specified value.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().
- Specified by:
setQuickin classDComplexMatrix1D- Parameters:
index- the index of the cell.value- the value to be filled into the specified cell (re=value[0], im=value[1]).
-
setQuick
public void setQuick(int index, double re, double im)Description copied from class:DComplexMatrix1DSets the matrix cell at coordinate index to the specified value.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().
- Specified by:
setQuickin classDComplexMatrix1D- Parameters:
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.
-
viewFlip
public DComplexMatrix1D viewFlip()
Description copied from class:DComplexMatrix1DConstructs and returns a new flip view. What used to be index 0 is now index size()-1, ..., what used to be index size()-1 is now index 0. The returned view is backed by this matrix, so changes in the returned view are reflected in this matrix, and vice-versa.- Overrides:
viewFlipin classDComplexMatrix1D- Returns:
- a new flip view.
-
viewPart
public DComplexMatrix1D viewPart(int index, int width)
Description copied from class:DComplexMatrix1DConstructs and returns a new sub-range view that is a width sub matrix starting at index. Operations on the returned view can only be applied to the restricted range. Any attempt to access coordinates not contained in the view will throw an IndexOutOfBoundsException.Note that the view is really just a range restriction: The returned matrix is backed by this matrix, so changes in the returned matrix are reflected in this matrix, and vice-versa.
The view contains the cells from index..index+width-1. and has view.size() == width. A view's legal coordinates are again zero based, as usual. In other words, legal coordinates of the view are 0 .. view.size()-1==width-1. As usual, any attempt to access a cell at other coordinates will throw an IndexOutOfBoundsException.
- Overrides:
viewPartin classDComplexMatrix1D- Parameters:
index- The index of the first cell.width- The width of the range.- Returns:
- the new view.
-
viewSelection
public DComplexMatrix1D viewSelection(int[] indexes)
Description copied from class:DComplexMatrix1DConstructs and returns a new selection view that is a matrix holding the indicated cells. There holds view.size() == indexes.length and view.get(i) == this.get(indexes[i]). Indexes can occur multiple times and can be in arbitrary order. Note that modifying indexes 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.- Overrides:
viewSelectionin classDComplexMatrix1D- Parameters:
indexes- The indexes of the cells that shall be visible in the new view. To indicate that all cells shall be visible, simply set this parameter to null.- Returns:
- the new view.
-
viewStrides
public DComplexMatrix1D viewStrides(int _stride)
Description copied from class:DComplexMatrix1DConstructs and returns a new stride view which is a sub matrix consisting of every i-th cell. More specifically, the view has size this.size()/stride holding cells this.get(i*stride) for all i = 0..size()/stride - 1.- Overrides:
viewStridesin classDComplexMatrix1D- Parameters:
_stride- the step factor.- Returns:
- the new view.
-
getImaginaryPart
public DoubleMatrix1D getImaginaryPart()
Description copied from class:DComplexMatrix1DReturns the imaginary part of this matrix- Specified by:
getImaginaryPartin classDComplexMatrix1D- Returns:
- the imaginary part
-
getRealPart
public DoubleMatrix1D getRealPart()
Description copied from class:DComplexMatrix1DReturns the real part of this matrix- Specified by:
getRealPartin classDComplexMatrix1D- Returns:
- the real part
-
-
DMelt 3.0 © DataMelt by jWork.ORG