This class implements matrices of bits of arbitrary dimensions. More...
static final long serialVersionUID = 2472769969919959608LThis class implements matrices of bits of arbitrary dimensions.
Basic facilities for bits operations, multiplications and exponentiations are provided.
◆ BitMatrix() [1/4]Creates a new BitMatrix
with r
rows and c
columns filled with 0’s.
Creates a new BitMatrix
with r
rows and c
columns using the data in data
.
Note that the orders of the bits for the rows are using the same order than for the BitVector. This does mean that the first bit is the lowest order bit of the last int
in the row and the last bit is the highest order bit of the first int
int the row.
BitMatrix
r the number of rows c the number of columns
Copy constructor.
Returns the BitMatrix
resulting from the application of the and
operator on the original BitMatrix
and that
.
Only bits which were at 1 in both BitMatrix
are set at 1 in the result. All others are set to 0.
and
operator
and
operator
Verifies that this
and that
are strictly identical.
They must both have the same dimensions and data.
BitMatrix
are identical
Returns the value of the bit in the specified row and column.
If the value is 1, return true
. If it is 0, return false
.
BitMatrix
Multiplies the column BitVector by a BitMatrix
and returns the result.
The result is \(A \times v\), where \(A\) is the BitMatrix
, and \(v\) is the BitVector.
Multiplies vect
, seen as a column BitVector, by a BitMatrix
.
(See BitVector to see the conversion between int
and BitVector.) The result is \(A \times v\), where \(A\) is the BitMatrix
, and \(v\) is the BitVector.
int
Multiplies two BitMatrix
’s together.
The result is \(A \times B\), where \(A\) is the this BitMatrix
and \(B\) is the that BitMatrix
.
Returns the BitMatrix
resulting from the application of the not
operator on the original BitMatrix
.
The effect is to swap all the bits of the BitMatrix
, turning all 0 into 1 and all 1 into 0.
not
operator
Returns the number of columns of the BitMatrix
.
Returns the number of rows of the BitMatrix
.
Returns the BitMatrix
resulting from the application of the or
operator on the original BitMatrix
and that
.
Only bits which were at 0 in both BitMatrix
are set at 0 in the result. All others are set to 1.
or
operator
or
operator
Raises the BitMatrix
to the power p
.
BitMatrix
BitMatrix
Raises the BitMatrix
to power \(2^{\mathtt{e}}\).
BitMatrix
BitMatrix
Creates a String containing all the data of the BitMatrix
.
The data is displayed in the same format as are the int[][]
in Java
code. This allows the user to print the representation of a BitMatrix
to be put, directly in the source code, in the constructor BitMatrix(int[][], int, int)
. The output is not designed to be human-readable.
BitMatrix
Changes the value of the bit in the specified row and column.
If value
is true
, changes it to 1. If value
is false
changes it to 0.
BitMatrix
Creates a String containing all the data of the BitMatrix
.
The result is displayed in a matrix form, with each row being put on a different line. Note that the bit at (0,0) is at the upper left of the matrix, while the bit at (0) in a BitVector is the least significant bit.
BitMatrix
Returns the transposed matrix.
The rows and columns are interchanged.
Returns the BitMatrix
resulting from the application of the xor
operator on the original BitMatrix
and that
.
Only bits which were at 1 in only one of the two BitMatrix
are set at 1 in the result. All others are set to 0.
xor
operator
xor
operator
The documentation for this class was generated from the following file:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4