org.ejml.data
Class CD1Matrix64F
- java.lang.Object
-
- org.ejml.data.CD1Matrix64F
-
- All Implemented Interfaces:
- java.io.Serializable, ComplexMatrix64F, Matrix, ReshapeMatrix
- Direct Known Subclasses:
- CDenseMatrix64F
public abstract class CD1Matrix64F extends java.lang.Object implements ComplexMatrix64F, ReshapeMatrix
A generic abstract class for matrices whose data is stored in a single 1D array of doubles. The format of the elements in this array is not specified. For example row major, column major, and block row major are all common formats.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description double[]dataWhere the raw data for the matrix is stored.intnumColsNumber of columns in the matrix.intnumRowsNumber of rows in the matrix.
-
Constructor Summary
Constructors Constructor and Description CD1Matrix64F()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description double[]getData()Used to get a reference to the internal data.abstract intgetIndex(int row, int col)Returns the internal array index for the specified row and column.intgetNumCols()Returns the number of columns in this matrix.intgetNumRows()Returns the number of rows in this matrix.voidset(CD1Matrix64F b)Sets the value of this matrix to be the same as the value of the provided matrix.voidsetData(double[] data)Changes the internal array reference.voidsetNumCols(int numCols)Sets the number of columns.voidsetNumRows(int numRows)Sets the number of rows.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ejml.data.ComplexMatrix64F
get, getDataLength, getImaginary, getReal, set, setImaginary, setReal
-
Methods inherited from interface org.ejml.data.ReshapeMatrix
reshape
-
-
-
-
Field Detail
-
data
public double[] data
Where the raw data for the matrix is stored. The format is type dependent.
-
numRows
public int numRows
Number of rows in the matrix.
-
numCols
public int numCols
Number of columns in the matrix.
-
-
Method Detail
-
getData
public double[] getData()
Used to get a reference to the internal data.- Returns:
- Reference to the matrix's data.
-
setData
public void setData(double[] data)
Changes the internal array reference.
-
getIndex
public abstract int getIndex(int row, int col)Returns the internal array index for the specified row and column.- Parameters:
row- Row index.col- Column index.- Returns:
- Internal array index.
-
set
public void set(CD1Matrix64F b)
Sets the value of this matrix to be the same as the value of the provided matrix. Both matrices must have the same shape:
aij = bij
- Parameters:
b- The matrix that this matrix is to be set equal to.
-
getNumRows
public int getNumRows()
Returns the number of rows in this matrix.- Specified by:
getNumRowsin interfaceMatrix- Returns:
- Number of rows.
-
getNumCols
public int getNumCols()
Returns the number of columns in this matrix.- Specified by:
getNumColsin interfaceMatrix- Returns:
- Number of columns.
-
setNumRows
public void setNumRows(int numRows)
Sets the number of rows.- Parameters:
numRows- Number of rows
-
setNumCols
public void setNumCols(int numCols)
Sets the number of columns.- Parameters:
numCols- Number of columns
-
-
DMelt 3.0 © DataMelt by jWork.ORG