Package eu.simuline.octave.type
Class OctaveSparseBoolean
- java.lang.Object
-
- eu.simuline.octave.type.OctaveSparseBoolean
-
- All Implemented Interfaces:
OctaveObject
public final class OctaveSparseBoolean extends Object implements OctaveObject
Represents a Boolean matrix and is appropriate for sparse matrices.- See Also:
OctaveBoolean
-
-
Field Summary
Fields Modifier and Type Field Description private int[]columnIndexesprivate intcolumnsprivate boolean[]dataprivate intnnzprivate static intPRIMEprivate int[]rowIndexesprivate introws
-
Constructor Summary
Constructors Modifier Constructor Description OctaveSparseBoolean(int rows, int columns, int nnz)privateOctaveSparseBoolean(int rows, int columns, int nnz, int[] rowIndexes, int[] columnIndexes, boolean[] data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)int[]getColumnIndexes()intgetColumns()boolean[]getData()intgetNnz()int[]getRowIndexes()intgetRows()inthashCode()voidset(boolean value, int row, int column)OctaveSparseBooleanshallowCopy()Make a shallow copy of this object.
-
-
-
Field Detail
-
PRIME
private static final int PRIME
- See Also:
- Constant Field Values
-
rows
private final int rows
-
columns
private final int columns
-
nnz
private int nnz
-
rowIndexes
private final int[] rowIndexes
-
columnIndexes
private final int[] columnIndexes
-
data
private final boolean[] data
-
-
Method Detail
-
shallowCopy
public OctaveSparseBoolean shallowCopy()
Description copied from interface:OctaveObjectMake a shallow copy of this object. In general when anOctaveObjectis returned from a getter, e.g. onOctaveStructorOctaveStruct, a shallow copy is returned in order to follow the way octave behaves. This method is used to make that copy.- Specified by:
shallowCopyin interfaceOctaveObject- Returns:
- a shallow copy of this
-
set
public void set(boolean value, int row, int column)- Parameters:
value-row-column-
-
getRows
public int getRows()
- Returns:
- the rows
-
getColumns
public int getColumns()
- Returns:
- the columns
-
getNnz
public int getNnz()
- Returns:
- the nnz
-
getRowIndexes
public int[] getRowIndexes()
- Returns:
- the rowIndexes
-
getColumnIndexes
public int[] getColumnIndexes()
- Returns:
- the columnIndexes
-
getData
public boolean[] getData()
- Returns:
- the data
-
-