Class MatlabDoubleMatrix<T>


  • public abstract class MatlabDoubleMatrix<T>
    extends java.lang.Object
    Since:
    4.2.0
    • Method Detail

      • getSparse

        public static MatlabDoubleMatrix<double[][]> getSparse​(int[] rowIndices,
                                                               int[] colIndices,
                                                               double[] real,
                                                               double[] imag,
                                                               int numRows,
                                                               int numCols)
      • getRealElementAtLinearIndex

        public abstract double getRealElementAtLinearIndex​(int linearIndex)
      • getImaginaryElementAtLinearIndex

        public abstract double getImaginaryElementAtLinearIndex​(int linearIndex)
      • getRealElementAtIndices

        public abstract double getRealElementAtIndices​(int row,
                                                       int column)
      • getRealElementAtIndices

        public abstract double getRealElementAtIndices​(int row,
                                                       int column,
                                                       int page)
      • getRealElementAtIndices

        public abstract double getRealElementAtIndices​(int row,
                                                       int column,
                                                       int[] pages)
      • getImaginaryElementAtIndices

        public abstract double getImaginaryElementAtIndices​(int row,
                                                            int column)
      • getImaginaryElementAtIndices

        public abstract double getImaginaryElementAtIndices​(int row,
                                                            int column,
                                                            int page)
      • getImaginaryElementAtIndices

        public abstract double getImaginaryElementAtIndices​(int row,
                                                            int column,
                                                            int[] pages)
      • getElementAtLinearIndex

        public abstract MatlabDouble getElementAtLinearIndex​(int linearIndex)
        Gets the element at index treating this array as a MATLAB column vector. This is equivalent to indexing into a MATLAB array with just one subscript.
        Returns:
        element at index
      • getElementAtIndices

        public abstract MatlabDouble getElementAtIndices​(int row,
                                                         int column)
      • getElementAtIndices

        public abstract MatlabDouble getElementAtIndices​(int row,
                                                         int column,
                                                         int page)
      • getElementAtIndices

        public abstract MatlabDouble getElementAtIndices​(int row,
                                                         int column,
                                                         int... pages)
        Gets the element at the specified row, column, and pages.
        Returns:
        element at row, column, and pages
      • isReal

        public boolean isReal()
        Returns true if the array has no imaginary values, false otherwise. Equivalent to the MATLAB isreal function.
        Returns:
      • toRealArray

        public T toRealArray()
        Returns an array that holds the real values from the MATLAB array. Each call returns a new copy which may be used in any manner; modifications to it will have no effect on this instance.
        Returns:
        real array
      • toImaginaryArray

        public T toImaginaryArray()
        Returns an array that holds the imaginary values from the MATLAB array. Each call returns a new copy which may be used in any manner; modifications to it will have no effect on this instance. If this array is real then the returned array will be have 0 as all of its base elements.
        Returns:
        imaginary array
      • getNumberOfElements

        public int getNumberOfElements()
        The number of elements in the array. The real and imaginary components of a number are together considered one element. This is equivalent to MATLAB's numel function.
        Returns:
        number of elements
      • getLengthOfDimension

        public int getLengthOfDimension​(int dimension)
        Returns the length of the dimension specified by dimension. Dimensions use 0-based indexing. So the first dimension, which is dimension 0, is the row length. The second dimension is the column length. The third dimension and beyond are pages.
        Parameters:
        dimension -
        Returns:
        length of dimension
        Throws:
        java.lang.IllegalArgumentException - if dimension is not a dimension of the array
      • getNumberOfDimensions

        public int getNumberOfDimensions()
        Returns the number of dimensions of the array.
        Returns:
        number of dimensions