org.ejml.data
Class CDenseMatrix64F
- java.lang.Object
-
- org.ejml.data.CD1Matrix64F
-
- org.ejml.data.CDenseMatrix64F
-
- All Implemented Interfaces:
- java.io.Serializable, ComplexMatrix64F, Matrix, ReshapeMatrix
public class CDenseMatrix64F extends CD1Matrix64F
Dense matrix for complex numbers. Internally it stores its data in a single row-major array with the real and imaginary components interlaces, in that order. The total number of elements in the array will be numRows*numColumns*2.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.ejml.data.CD1Matrix64F
data, numCols, numRows
-
-
Constructor Summary
Constructors Constructor and Description CDenseMatrix64F(CDenseMatrix64F original)Creates a newCDenseMatrix64Fwhich is a copy of the passed in matrix.CDenseMatrix64F(double[][] data)Creates a matrix with the values and shape defined by the 2D array 'data'.CDenseMatrix64F(int numRows, int numCols)Creates a new matrix with the specified number of rows and columnsCDenseMatrix64F(int numRows, int numCols, boolean rowMajor, double... data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description CDenseMatrix64Fcopy()Creates an exact copy of the matrixvoidget(int row, int col, Complex64F output)Returns the complex value of the matrix's elementintgetDataLength()Returns the number of elements in the internal data arraydoublegetImaginary(int row, int col)Returns the imaginary component of the matrix's element.intgetIndex(int row, int col)Returns the internal array index for the specified row and column.doublegetReal(int row, int col)Returns the real component of the matrix's element.intgetRowStride()Number of array elements in the matrix's row.voidprint()Prints the matrix to standard out.voidreshape(int numRows, int numCols)Equivalent to invoking reshape(numRows,numCols,false);voidset(CDenseMatrix64F original)voidset(int numRows, int numCols, boolean rowMajor, double... data)Sets this matrix equal to the matrix encoded in the array.voidset(int row, int col, double real, double imaginary)Set's the complex value of the matrix's elementvoidset(Matrix original)Sets this matrix to be identical to the 'original' matrix passed in.voidsetImaginary(int row, int col, double val)Sets the imaginary component of the matrix's element.voidsetReal(int row, int col, double val)Sets the real component of the matrix's element.-
Methods inherited from class org.ejml.data.CD1Matrix64F
getData, getNumCols, getNumRows, set, setData, setNumCols, setNumRows
-
-
-
-
Constructor Detail
-
CDenseMatrix64F
public CDenseMatrix64F(double[][] data)
Creates a matrix with the values and shape defined by the 2D array 'data'. It is assumed that 'data' has a row-major formatting:
data[ row ][ column ]- Parameters:
data- 2D array representation of the matrix. Not modified.
-
CDenseMatrix64F
public CDenseMatrix64F(int numRows, int numCols, boolean rowMajor, double... data)
-
CDenseMatrix64F
public CDenseMatrix64F(CDenseMatrix64F original)
Creates a newCDenseMatrix64Fwhich is a copy of the passed in matrix.- Parameters:
original- Matrix which is to be copied
-
CDenseMatrix64F
public CDenseMatrix64F(int numRows, int numCols)Creates a new matrix with the specified number of rows and columns- Parameters:
numRows- number of rowsnumCols- number of columns
-
-
Method Detail
-
getIndex
public int getIndex(int row, int col)Description copied from class:CD1Matrix64FReturns the internal array index for the specified row and column.- Specified by:
getIndexin classCD1Matrix64F- Parameters:
row- Row index.col- Column index.- Returns:
- Internal array index.
-
reshape
public void reshape(int numRows, int numCols)Description copied from interface:ReshapeMatrixEquivalent to invoking reshape(numRows,numCols,false);- Parameters:
numRows- The new number of rows in the matrix.numCols- The new number of columns in the matrix.
-
get
public void get(int row, int col, Complex64F output)Description copied from interface:ComplexMatrix64FReturns the complex value of the matrix's element- Parameters:
row- Matrix element's row index..col- Matrix element's column index.output- Storage for the complex number
-
set
public void set(int row, int col, double real, double imaginary)Description copied from interface:ComplexMatrix64FSet's the complex value of the matrix's element- Parameters:
row- Matrix element's row index..col- Matrix element's column index.real- The real componentimaginary- The imaginary component
-
getReal
public double getReal(int row, int col)Description copied from interface:ComplexMatrix64FReturns the real component of the matrix's element.- Parameters:
row- Matrix element's row index..col- Matrix element's column index.- Returns:
- The specified element's value.
-
setReal
public void setReal(int row, int col, double val)Description copied from interface:ComplexMatrix64FSets the real component of the matrix's element.- Parameters:
row- Matrix element's row index..col- Matrix element's column index.val- The element's new value.
-
getImaginary
public double getImaginary(int row, int col)Description copied from interface:ComplexMatrix64FReturns the imaginary component of the matrix's element.- Parameters:
row- Matrix element's row index..col- Matrix element's column index.- Returns:
- The specified element's value.
-
setImaginary
public void setImaginary(int row, int col, double val)Description copied from interface:ComplexMatrix64FSets the imaginary component of the matrix's element.- Parameters:
row- Matrix element's row index..col- Matrix element's column index.val- The element's new value.
-
getDataLength
public int getDataLength()
Description copied from interface:ComplexMatrix64FReturns the number of elements in the internal data array- Returns:
- Number of elements in the data array.
-
set
public void set(CDenseMatrix64F original)
-
copy
public CDenseMatrix64F copy()
Description copied from interface:MatrixCreates an exact copy of the matrix
-
set
public void set(Matrix original)
Description copied from interface:MatrixSets this matrix to be identical to the 'original' matrix passed in.
-
print
public void print()
Description copied from interface:MatrixPrints the matrix to standard out.
-
getRowStride
public int getRowStride()
Number of array elements in the matrix's row.
-
set
public void set(int numRows, int numCols, boolean rowMajor, double... data)Sets this matrix equal to the matrix encoded in the array.- Parameters:
numRows- The number of rows.numCols- The number of columns.rowMajor- If the array is encoded in a row-major or a column-major format.data- The formatted 1D array. Not modified.
-
-
DMelt 3.0 © DataMelt by jWork.ORG