File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed
Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 1+ ::: flowpaths.minsetcover
2+ options:
3+ filters:
4+ - "!^__ "
Original file line number Diff line number Diff line change @@ -10,23 +10,23 @@ def __init__(
1010 ):
1111 """
1212 This class solves the minimum set cover problem. Given a universe `universe` and a list of subsets `subsets`,
13- the goal is to find the smallest list of subsets `set_cover` such that:
13+ the goal is to find the minimum-weight list of subsets `set_cover` such that:
1414
1515 - every element in `universe` is in at least one subset in `set_cover`.
1616 - the sum of the weights of the subsets in `set_cover` is minimized.
1717
1818 Parameters
1919 ----------
2020
21- - `universe` : list`
21+ - `universe: list`
2222
2323 The universe of elements that must be covered.
2424
25- - `subsets : list`
25+ - `subsets: list`
2626
2727 A list of subsets that can be used to cover the universe.
2828
29- - `subset_weights : list`
29+ - `subset_weights: list`
3030
3131 The weight of each subset, as a list in the same order that the subsets appear in the list `subsets`.
3232 If not provided, each subset is assumed to have a weight of 1.
@@ -129,6 +129,12 @@ def check_is_solved(self):
129129 def get_solution (self , as_subsets : bool = False ):
130130 """
131131 Returns the solution to the minimum generating set problem, if the model was solved.
132+
133+ Parameters
134+ ----------
135+ - `as_subsets: bool`
136+
137+ If `True`, returns the subsets themselves. If `False`, returns the indices of the subsets in the list `subsets`.
132138
133139 !!! warning "Warning"
134140 Call the `solve` method first.
Original file line number Diff line number Diff line change 2323 - Solver Wrapper : solver-wrapper.md
2424 - stDiGraph : stdigraph.md
2525 - Minimum Generating Set : minimum-generating-set.md
26+ - Minimum Set Cover : minimum-set-cover.md
2627
2728use_directory_urls : false
2829
You can’t perform that action at this time.
0 commit comments