|
carl
25.04
Computer ARithmetic Library
|
Represents a set cover problem where a set is represented by some type. More...
#include <TypedSetCover.h>

Public Member Functions | |
| void | set (const Set &s, std::size_t element) |
| States that s covers the given element. More... | |
| void | set (const Set &s, const Bitset &elements) |
| States that s covers the given elements. More... | |
| const Set & | get_set (std::size_t sid) const |
| operator const SetCover & () const | |
| Returns the underlying set cover. More... | |
| const auto & | set_cover () const |
| Returns the underlying set cover. More... | |
| auto & | set_cover () |
| Returns the underlying set cover. More... | |
| template<typename F > | |
| std::vector< Set > | get_cover (F &&heuristic) |
| Convenience function to run the given heuristic on this set cover. More... | |
Private Member Functions | |
| std::size_t | get_set_id (const Set &s) |
| Gets id for a set, creates a new id if necessary. More... | |
Private Attributes | |
| SetCover | mSetCover |
| The actual set cover. More... | |
| std::vector< Set > | mSets |
| Maps id to set. More... | |
| std::map< Set, std::size_t > | mSetMap |
| Maps set to id. More... | |
Friends | |
| template<typename T > | |
| std::ostream & | operator<< (std::ostream &os, const TypedSetCover< T > &tsc) |
| Print the typed set cover to os. More... | |
Represents a set cover problem where a set is represented by some type.
It actually wraps a SetCover class and takes care of mapping the custom set type to an id type.
Definition at line 16 of file TypedSetCover.h.
|
inline |
Convenience function to run the given heuristic on this set cover.
Definition at line 67 of file TypedSetCover.h.
|
inline |
|
inlineprivate |
Gets id for a set, creates a new id if necessary.
Definition at line 29 of file TypedSetCover.h.

|
inlineexplicit |
Returns the underlying set cover.
Definition at line 53 of file TypedSetCover.h.
|
inline |
States that s covers the given elements.
Definition at line 43 of file TypedSetCover.h.

|
inline |
States that s covers the given element.
Definition at line 39 of file TypedSetCover.h.

|
inline |
Returns the underlying set cover.
Definition at line 61 of file TypedSetCover.h.
|
inline |
Returns the underlying set cover.
Definition at line 57 of file TypedSetCover.h.

|
friend |
Print the typed set cover to os.
Definition at line 78 of file TypedSetCover.h.
|
private |
The actual set cover.
Definition at line 22 of file TypedSetCover.h.
|
private |
Maps set to id.
Definition at line 26 of file TypedSetCover.h.
|
private |
Maps id to set.
Definition at line 24 of file TypedSetCover.h.