-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomplete_graph.h
More file actions
60 lines (50 loc) · 2.45 KB
/
Copy pathcomplete_graph.h
File metadata and controls
60 lines (50 loc) · 2.45 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
/***************************************************************************
complete_graph.h - description
-------------------
begin : Wed Mar 08 2006
copyright : (C) 2005 by Knut-Helge Vik
email : knuthelv@ifi.uio.no
***************************************************************************/
#ifndef GRAPHALGO_COMPLETE_GRAPH_KHV
#define GRAPHALGO_COMPLETE_GRAPH_KHV
#include "../boostprop.h"
#include "../network/vertex_set.h"
#include "../network/group_info.h"
#include "../treealgs/treealgs.h"
using namespace TreeAlgorithms;
class SteinerPoints;
/*-----------------------------------------------------------------------
class CompleteGraph: Input is a complete graph, produces a complete
graph, complete member graph, complete member graph with k
steiner points.
----------------------------------------------------------------------- */
class CompleteGraph
{
public:
CompleteGraph(GraphLib::GroupInformation& groupInfo, int newV)
: groupMembers_(groupInfo.getMembers())
, steinerPoints_(groupInfo.getSteinerPoints())
, groupInfo_(groupInfo)
, newMember_(newV) {}
CompleteGraph(VertexSet &groupMembers, VertexSet& steinerPoints, GraphLib::GroupInformation& groupInfo, int newV)
: groupMembers_(groupMembers)
, steinerPoints_(steinerPoints)
, groupInfo_(groupInfo)
, newMember_(newV) {}
~CompleteGraph() {}
void compGraph(TreeStructure &inputT, const GraphN &global_g, SteinerPoints& fifoSteiner, bool);
// create complete graphs
void createCGraph(TreeStructure &inputT, const GraphN &g, const VertexSet &groupMembers);
void createCMGraph(TreeStructure &inputT, const GraphN &g, const VertexSet &groupMembers);
void createCMGraphSteinerSet(TreeStructure &inputT, const GraphN &g, const VertexSet &groupMembers, VertexSet &steinerSet);
// update complete graph from GroupInformation
void updateCTree(TreeStructure &inputT, const GraphN &g, const VertexSet &groupMembers, int new_v);
void updateCMTree(TreeStructure &inputT, const GraphN &g, const VertexSet &groupMembers, int new_v);
void updateCMGraphSteinerSet(TreeStructure &inputT, const GraphN &g, const VertexSet &groupMembers, VertexSet &steinerSet);
private:
const VertexSet &groupMembers_;
const VertexSet &steinerPoints_;
const GraphLib::GroupInformation &groupInfo_;
int newMember_;
};
#endif // GRAPHALGO_COMPLETE_GRAPH_KHV