jds.collection
Class BitMatrix
java.lang.Object
|
+--jds.collection.BitMatrix
- public class BitMatrix
- extends java.lang.Object
BitMatrix - two dimensional indexed collection of bit values;
for use with book
Classic Data Structures
in Java
by Timothy A Budd,
published by Addison-Wesley, 2001.
- See Also:
Collection
|
Constructor Summary |
BitMatrix(int numRows,
int numColumns)
initialize a newly created matrix of bit values |
|
Method Summary |
void |
clear(int i,
int j)
clear a value in the bit matrix |
boolean |
get(int i,
int j)
get a value from the bit matrix |
void |
set(int i,
int j)
set a value in the bit matrix |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
BitMatrix
public BitMatrix(int numRows,
int numColumns)
- initialize a newly created matrix of bit values
- Parameters:
numRows - number of rows in new matrixnumColumns - number of columns in new matrix
clear
public void clear(int i,
int j)
- clear a value in the bit matrix
- Parameters:
i - row indexj - column index
get
public boolean get(int i,
int j)
- get a value from the bit matrix
- Parameters:
i - row indexj - column index- Returns:
- true if the bit is set, false otherwise
set
public void set(int i,
int j)
- set a value in the bit matrix
- Parameters:
i - row indexj - column index