|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BitMatrix
Interface specifying a simple matrix of booleans. Operations are limited to setting, getting, clearing and counting.
This implementation is part of the master's thesis: "Studie en implementatie van instantie-gebaseerde algoritmen voor gesuperviseerd rangschikken", Stijn Lievens, Ghent University, 2004.
Method Summary | |
---|---|
boolean |
clear(int row,
int column)
Clears the bit at the specified position. |
int |
columnCount(int column)
Counts the number of bits that are set in the specified column. |
int |
columns()
Gets the number of columns. |
boolean |
get(int row,
int column)
Return the element a the specified position. |
int |
rowCount(int row)
Counts the number of bits that are set in the specified row. |
int |
rows()
Gets the number of rows. |
boolean |
set(int row,
int column)
Sets the bit at the specified position to true. |
boolean |
set(int row,
int column,
boolean bool)
Sets the bit at the specified position to the specified value. |
Method Detail |
---|
boolean get(int row, int column)
row
- the row of the positioncolumn
- the column of the position
true
if the bit at the
specified position is set, false
otherwiseboolean set(int row, int column, boolean bool)
row
- the row of the positioncolumn
- the column of the positionbool
- the value to fill in
bool
boolean set(int row, int column)
true.
The return value indicates whether anything has changed,
i.e. if the bit at the specified position was true
before calling this method, then false
is
returned (and the bit remains true
of course).
In the other case true
is returned.
row
- the row of the positioncolumn
- the column of the position
true
if the bit was actually
set, false
otherwiseboolean clear(int row, int column)
true
then true
is returned.
In the other case false
is returned.
row
- the row of the positioncolumn
- the column of the position
true
if the bit was actually
cleared, false
otherwiseint rows()
int columns()
int columnCount(int column)
column
- index of the column
int rowCount(int row)
row
- index of the row
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |