Sparse mask matrix
OptEnrichedSetCover.SparseMaskMatrix
— TypeSparse 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.
OptEnrichedSetCover.SparseMaskMatrix
— MethodSparseMaskMatrix(mtx::AbstractMatrix{Bool}) -> SparseMaskMatrix
Sparse representation of boolean matrix.
OptEnrichedSetCover.SparseMaskMatrix
— MethodSparseMaskMatrix(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
).
OptEnrichedSetCover.SparseMaskMatrix
— MethodSparseMaskMatrix(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 columnelm2ix
: maps set element to its index (mask row index)