Class DisjunctMatrix
java.lang.Object
com.knezevic.edaf.v3.problems.discrete.disjunct.DisjunctMatrix
Immutable binary matrix view optimized for column-support operations used by
disjunct/resolvable/almost-disjunct definitions.
The matrix is represented by support bitsets of each column:
supp(x_j) = { i in [M] : A[i,j] = 1 }.
-
Method Summary
Modifier and TypeMethodDescriptionintcolumns()static DisjunctMatrixfromBitString(BitString genotype, int rows, int columns) Builds matrix from a bitstring encoded in column-major layout: bits[j * M, j * M + 1, ..., j * M + (M-1)]correspond to columnj.static DisjunctMatrixfromDense(boolean[][] values) Builds matrix from dense row-major values wherevalues[row][column]is matrix entry.introws()support(int columnIndex) Returns a defensive copy of support bitset for one column.
-
Method Details
-
fromBitString
Builds matrix from a bitstring encoded in column-major layout: bits[j * M, j * M + 1, ..., j * M + (M-1)]correspond to columnj. -
fromDense
Builds matrix from dense row-major values wherevalues[row][column]is matrix entry. -
rows
public int rows() -
columns
public int columns() -
support
Returns a defensive copy of support bitset for one column.
-