Public Member Functions | Private Attributes | Static Private Attributes
BitMatrix Class Reference
Inheritance diagram for BitMatrix:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 BitMatrix (final int rows, final int columns)
 BitMatrix (int size)
int cardinality ()
void clear (int i, int j)
Object clone ()
int columns ()
boolean equals (Object obj)
boolean get (int i, int j)
BitSet getColumn (int j)
BitSet getRow (int i)
int hashCode ()
int rows ()
void set (int i, int j)
String toString ()

Private Attributes

BitSet[] bitsets
int columns
int rows

Static Private Attributes

static final long serialVersionUID = 2831903376066135583L

Detailed Description

This class implements a bit matrix.

Author:
Damien Pellier
Version:
1.0

Definition at line 43 of file BitMatrix.java.


Constructor & Destructor Documentation

BitMatrix.BitMatrix ( final int  rows,
final int  columns 
) [inline]

Creates a new bit matrix with a specified number of rows and columns.

Parameters:
rowsThe number of rows of the matrix.
columnsThe number of column of the matrix.

Definition at line 71 of file BitMatrix.java.

BitMatrix.BitMatrix ( int  size) [inline]

Creates a new squared matrix of a specific size.

Parameters:
sizethe size of the squared matrix.

Definition at line 85 of file BitMatrix.java.


Member Function Documentation

int BitMatrix.cardinality ( ) [inline]

Returns the cardinality of the matrix, i.e., the number of bits set to 1 in the matrix.

Returns:
Returns the cardinality of the matrix.

Definition at line 150 of file BitMatrix.java.

void BitMatrix.clear ( int  i,
int  j 
) [inline]

Sets the bit at a specified row and column position to false.

Parameters:
ithe row position.
jthe column position.

Definition at line 105 of file BitMatrix.java.

Object BitMatrix.clone ( ) [inline]

Returns a copy of the matrix.

Returns:
a copy of the matrix.
See also:
java.lang.Object::clone()

Definition at line 182 of file BitMatrix.java.

int BitMatrix.columns ( ) [inline]

Returns the number of columns of the matrix.

Returns:
the number of columns of the matrix.

Definition at line 163 of file BitMatrix.java.

boolean BitMatrix.equals ( Object  obj) [inline]

Returns true if this matrix is equals to an other object.

Parameters:
objthe object to compared.
Returns:
true if this matrix is equals to an other object; false otherwise.
See also:
java.lang.Object::equals(java.lang.Object)

Definition at line 200 of file BitMatrix.java.

boolean BitMatrix.get ( int  i,
int  j 
) [inline]

Returns the value of the bit at a specific position in the matrix.

Parameters:
iThe row of the bit.
jThe column of the bit.
Returns:
the value of the bit at a specific position in the matrix.

Definition at line 140 of file BitMatrix.java.

BitSet BitMatrix.getColumn ( int  j) [inline]

Returns the jth column of the matrix.

Parameters:
jthe index of the column.
Returns:
the jth column of the matrix.

Definition at line 125 of file BitMatrix.java.

BitSet BitMatrix.getRow ( int  i) [inline]

Returns the ith row of the matrix.

Parameters:
ithe index of the row.
Returns:
the ith row of the matrix.

Definition at line 115 of file BitMatrix.java.

int BitMatrix.hashCode ( ) [inline]

Returns the hash code value of this matrix.

Returns:
the hash code value of this matrix.
See also:
java.lang.Object::hashCode()

Definition at line 214 of file BitMatrix.java.

int BitMatrix.rows ( ) [inline]

Returns the number of rows of the matrix.

Returns:
the number of rows of the matrix.

Definition at line 172 of file BitMatrix.java.

void BitMatrix.set ( int  i,
int  j 
) [inline]

Sets the bit at a specified row and column position to true.

Parameters:
ithe row position.
jthe column position.

Definition at line 95 of file BitMatrix.java.

String BitMatrix.toString ( ) [inline]

Returns a string representation of the matrix.

Returns:
a string representation of the matrix.

Definition at line 223 of file BitMatrix.java.


Member Data Documentation

BitSet [] BitMatrix.bitsets [private]

The array of bit set used to to store the matrix.

Definition at line 63 of file BitMatrix.java.

int BitMatrix.columns [private]

The number of columns.

Definition at line 58 of file BitMatrix.java.

int BitMatrix.rows [private]

The number of rows.

Definition at line 53 of file BitMatrix.java.

final long BitMatrix.serialVersionUID = 2831903376066135583L [static, private]

The serial version id of the class.

Definition at line 48 of file BitMatrix.java.


The documentation for this class was generated from the following file:


tug_ist_diagnosis_repair
Author(s): Safdar Zaman
autogenerated on Mon Jan 6 2014 11:51:12