Camargue
witness.hpp
1 #ifndef CMR_WITNESS_H
2 #define CMR_WITNESS_H
3 
4 #include "datagroups.hpp"
5 #include "tooth.hpp"
6 #include "process_cuts.hpp"
7 
8 
9 #include <vector>
10 
11 extern "C" {
12 #include <concorde/INCLUDE/cut.h>
13 }
14 
15 namespace CMR {
16 namespace Sep {
17 
19 class DPwitness {
20 public:
23  const std::vector<int> &partition_nodes, int seed);
24  ~DPwitness();
25 
27  bool simple_DP_sep(CutQueue<dominoparity> &domino_q);
28 
29 private:
30  void build_light_tree();
31  void add_web_edges();
32  void build_gh_tree();
33 
34  void dfs_odd_cuts(CC_GHnode *n);
35 
37  void expand_cut(CC_GHnode *n, std::vector<int> &cut_nodes);
38 
40  void grab_dominos(CutQueue<dominoparity> &domino_q);
41 
42  std::vector<std::vector<SimpleTooth>> light_teeth;
43 
44  const Data::SupportGroup &supp_dat;
45 
46  const std::vector<int> &perm;
47 
48  std::vector<SimpleTooth*> cutgraph_nodes;
49 
50  std::vector<int> cut_elist;
51  std::vector<double> cut_ecap;
52  std::vector<int> odd_nodes_list;
53  std::vector<bool> node_marks;
54 
55  CutQueue<CC_GHnode *> CC_gh_q;
56 
57  CC_GHtree gh_tree;
58  const int random_seed;
59 
60  void grab_cuts(CutQueue<dominoparity> &domino_q);
61 
62 };
63 
64 }
65 }
66 
67 #endif
Support graph data for an LP solution.
Definition: datagroups.hpp:174
Class for building miniature simple DP witness cutgraphs.
Definition: witness.hpp:19
DPwitness(CandidateTeeth &cands, const std::vector< int > &partition_nodes, int seed)
Construct a mini cutgraph induced by a partition.
Definition: witness.cpp:24
void expand_cut(CC_GHnode *n, std::vector< int > &cut_nodes)
Expand a Gomory-Hu node into a cut.
Definition: witness.cpp:300
bool simple_DP_sep(CutQueue< dominoparity > &domino_q)
Create a cutgraph and grab odd cuts from it.
Definition: witness.cpp:45
Data group structures.
Class template for queue of cuts in some form.
Definition: process_cuts.hpp:30
void dfs_odd_cuts(CC_GHnode *n)
Search tree for odd cuts.
Definition: witness.cpp:288
void grab_dominos(CutQueue< dominoparity > &domino_q)
Get simple DP inequalities from fundamental cuts of the GH tree.
Definition: witness.cpp:215
void build_gh_tree()
Construct the Gomory-Hu tree.
Definition: witness.cpp:194
Structures for storing and processing cuts.
void build_light_tree()
Build the tooth inequality tree.
Definition: witness.cpp:64
The namespace for this project.
Definition: abc_nodesel.hpp:20
void add_web_edges()
Add nonnegativity inequality edges.
Definition: witness.cpp:155
Definition: tooth.hpp:21