Sparse mask matrix

OptEnrichedSetCover.SparseMaskMatrixType

Sparse representation of Matrix{Bool}, when all "falses" are "structural". It uses compressed sparse column (CSC) representation, except no non-zero values need to be stored.

source
OptEnrichedSetCover.SparseMaskMatrixMethod
SparseMaskMatrix(m::Integer, rowvals_percol::Vector{Vector{Int}}) -> SparseMaskMatrix

Construct SparseMaskMatrix given the vector of true row indices per each column and the total number of rows (m).

source
OptEnrichedSetCover.SparseMaskMatrixMethod
SparseMaskMatrix(sets, elm2ix::Dict{T, Int}) where T -> SparseMaskMatrix

Construct SparseMaskMatrix from the collection of sets.

Arguments

  • sets: a collection of sets, one set per mask matrix column
  • elm2ix: maps set element to its index (mask row index)
source