-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpartitions_list.h
65 lines (56 loc) · 1.65 KB
/
partitions_list.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
* partitions_list.h
* Edmondstest
*
* Created by Jon Lederman on 2/8/10.
* Copyright 2010 __MyCompanyName__. All rights reserved.
*
*/
#ifndef PARTITIONS_LIST_DEF_H
#define PARTITIONS_LIST_DEF_H
#include <map>
#include <vector>
#include <set>
#include <boost/property_map/property_map.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/tuple/tuple.hpp>
#include "graph_def.h"
using namespace std;
class partitions_list
{
public:
// partitions_list(Graph const &G, Vertex_Indices const &vertex_indices, Weights const &weights)
// :Graph(G), graph_vertices(vertex_indices), graph_weights(weights);
partitions_list(Graph G, Vertex_Indices vertex_indices, Weights weights, int root, bool reversed);
void insert(vector<vector<Edge > > elem, double key);
vector<vector<Edge> > &get_entry(int entry);
vector<Edge>& get_included (int entry);
set<Edge> get_included1 (int entry);
vector<Edge>& get_excluded(int entry);
set<Edge> get_excluded1 (int entry);
vector<Edge>& get_msa (int entry);
vector<Edge> next_best_msa();
set<Edge> get_msa1 (int entry);
vector<vector<Edge> > &get_msas();
void partition(int entry);
void print(int entry, Graph G);
bool is_empty();
double get_weight (int entry);
class no_msa {};
EdgeCol get_cur_best_msa();
bool exhausted_msa();
private:
multimap<double, vector<vector<Edge> > > partitions;
multimap<Weights::value_type, vector<set<Edge> > > new_partitions;
vector<vector<Edge> > msas;
vector<vector<int> > machine_msas;
Graph graph;
Vertex_Indices graph_vertices;
Vertices the_vertices;
Weights graph_weights;
EdgeCol cur_best_msa;
int root;
bool is_reversed;
vector<Edge> branching;
};
#endif