-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathSetCover.h
47 lines (31 loc) · 1.12 KB
/
SetCover.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Models set cover algorithms.
//
//////////////////////////////////////////////////////////////////////
#if !defined(CLS_SETCOVER)
#define CLS_SETCOVER
#include <set>
#include "Globals.h"
#include "Vertex.h"
#include "Hyperedge.h"
#include "Hypergraph.h"
class SetCover
{
private:
HypergraphSharedPtr MyH;
// Covers a set of nodes by a set of hyperedges
HyperedgeSet NodeCover1(const VertexSet &Vertices, const HyperedgeSet &HEdges, bool bDeterm);
// Covers a set of nodes by a set of hyperedges
HyperedgeSet NodeCover2(const VertexSet &Vertices, const HyperedgeSet &HEdges, bool bDeterm);
public:
// Constructor
SetCover(const HypergraphSharedPtr &H);
// Destructor
virtual ~SetCover();
// Checks whether a set of nodes can be covered by a set of hyperedges
bool covers(const VertexSet &Vertices, const HyperedgeSet &HEdges);
// Checks whether a set of nodes can be covered by a set of hyperedges
//bool covers(Vertex **Nodes, Hyperedge **HEdges);
// Covers a set of nodes by a set of hyperedges
HyperedgeSet cover(const VertexSet &Vertices, const HyperedgeSet &HEdges);
};
#endif // !defined(CLS_SETCOVER)