cover.valid_cover

cover.valid_cover(subsets, ind=None)

Determines whether given sets form a feasible cover over the universe.

This function is used to check whether a set family fully contains its universe of elements, i.e. forms a cover over its elements. This effectively reduces to ensuring the coverage of each element is strictly positive.

Parameters

Name Type Description Default
subsets sparray (n x J) sparse matrix describing J sets covering n elements. required
ind Optional[np.ndarray] index vector indicating which sets to check for cover feasibility. Defaults to all sets. None

Returns

Type Description
bool a boolean indicating whether the subsets indexed by ind cover every element.