Package matlabcontrol.link
Class MatlabLogicalMatrix<T>
- java.lang.Object
-
- matlabcontrol.link.MatlabLogicalMatrix<T>
-
public abstract class MatlabLogicalMatrix<T> extends java.lang.Object- Since:
- 4.2.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleangetElementAtIndices(int row, int column)abstract booleangetElementAtIndices(int row, int column, int page)abstract booleangetElementAtIndices(int row, int column, int[] pages)abstract booleangetElementAtLinearIndex(int linearIndex)static <T> MatlabLogicalMatrix<T>getFull(T values)intgetLengthOfDimension(int dimension)Returns the length of the dimension specified bydimension.intgetNumberOfDimensions()Returns the number of dimensions of the array.intgetNumberOfElements()The number of elements in the array.static MatlabLogicalMatrix<boolean[][]>getSparse(int[] rowIndices, int[] colIndices, boolean[] values, int numRows, int numCols)TtoArray()Returns an array that holds the values from the MATLAB matrix.
-
-
-
Method Detail
-
getFull
public static <T> MatlabLogicalMatrix<T> getFull(T values)
-
getSparse
public static MatlabLogicalMatrix<boolean[][]> getSparse(int[] rowIndices, int[] colIndices, boolean[] values, int numRows, int numCols)
-
getElementAtLinearIndex
public abstract boolean getElementAtLinearIndex(int linearIndex)
-
getElementAtIndices
public abstract boolean getElementAtIndices(int row, int column)
-
getElementAtIndices
public abstract boolean getElementAtIndices(int row, int column, int page)
-
getElementAtIndices
public abstract boolean getElementAtIndices(int row, int column, int[] pages)
-
toArray
public T toArray()
Returns an array that holds the values from the MATLAB matrix. Each call returns a new copy which may be used in any manner; modifications to it will have no effect on this instance.- Returns:
- 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'snumelfunction.- Returns:
- number of elements
-
getLengthOfDimension
public int getLengthOfDimension(int dimension)
Returns the length of the dimension specified bydimension. 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- ifdimensionis not a dimension of the array
-
getNumberOfDimensions
public int getNumberOfDimensions()
Returns the number of dimensions of the array.- Returns:
- number of dimensions
-
-