|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.ut2004.agent.module.sensor.visibility.model.BitMatrix
public class BitMatrix
Simple class to store bit-matrix for visibility between VisibilityLocations.
THREAD-UNSAFE
| Constructor Summary | |
|---|---|
BitMatrix(int columns,
int rows)
|
|
| Method Summary | |
|---|---|
BitSet |
and(Collection<Integer> columns)
Return logical-and of 'columns'. |
BitSet |
and(int... columns)
Return logical-and of 'columns'. |
int |
columns()
|
static void |
flip(BitSet bitSet)
Flips whole bitset passed. |
void |
flip(int column,
int row)
Flips value in matrix[column, row] |
boolean |
get(int column,
int row)
Returns matrix[column, row] |
BitSet |
getColumn(int column)
Returns 'column' of the matrix. |
static BitMatrix |
loadFromFile(File file)
|
BitSet |
or(Collection<Integer> columns)
Return logical-and of 'columns'. |
BitSet |
or(int... columns)
Return logical-or of 'columns'. |
int |
rows()
|
void |
saveToFile(File file)
|
void |
set(int column,
int row)
Sets matrix[column, row] to TRUE |
void |
set(int column,
int row,
boolean state)
Sets matrix[column, row] to 'state' |
String |
toString()
|
void |
unset(int column,
int row)
Sets matrix[column, row] to FALSE |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BitMatrix(int columns,
int rows)
| Method Detail |
|---|
public void set(int column,
int row)
column - row -
public void set(int column,
int row,
boolean state)
column - row - state - to set
public void flip(int column,
int row)
column - row -
public void unset(int column,
int row)
column - row - public BitSet getColumn(int column)
column -
public boolean get(int column,
int row)
public BitSet and(int... columns)
columns -
public BitSet and(Collection<Integer> columns)
columns -
public BitSet or(int... columns)
columns -
public BitSet or(Collection<Integer> columns)
columns -
public int columns()
public int rows()
public String toString()
toString in class Objectpublic void saveToFile(File file)
public static BitMatrix loadFromFile(File file)
public static void flip(BitSet bitSet)
bitSet -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||