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[]
columnIndexes
private int
columns
private boolean[]
data
private int
nnz
private static int
PRIME
private int[]
rowIndexes
private int
rows
-
Constructor Summary
Constructors Modifier Constructor Description OctaveSparseBoolean(int rows, int columns, int nnz)
private
OctaveSparseBoolean(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 boolean
equals(Object obj)
int[]
getColumnIndexes()
int
getColumns()
boolean[]
getData()
int
getNnz()
int[]
getRowIndexes()
int
getRows()
int
hashCode()
void
set(boolean value, int row, int column)
OctaveSparseBoolean
shallowCopy()
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:OctaveObject
Make a shallow copy of this object. In general when anOctaveObject
is returned from a getter, e.g. onOctaveStruct
orOctaveStruct
, a shallow copy is returned in order to follow the way octave behaves. This method is used to make that copy.- Specified by:
shallowCopy
in 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
-
-