Class DisjunctMatrix

java.lang.Object
com.knezevic.edaf.v3.problems.discrete.disjunct.DisjunctMatrix

public final class DisjunctMatrix extends Object
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 Details

    • fromBitString

      public static DisjunctMatrix fromBitString(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 column j.
    • fromDense

      public static DisjunctMatrix fromDense(boolean[][] values)
      Builds matrix from dense row-major values where values[row][column] is matrix entry.
    • rows

      public int rows()
    • columns

      public int columns()
    • support

      public BitSet support(int columnIndex)
      Returns a defensive copy of support bitset for one column.