From 4cba3dc151576b7b7b38d9d3ce8d5da250c36e77 Mon Sep 17 00:00:00 2001 From: msurl <masur101@hhu.de> Date: Tue, 26 May 2020 19:59:00 +0200 Subject: [PATCH] deleted outcommented code --- .../k_hop_dom_set.py | 51 ------------------- 1 file changed, 51 deletions(-) diff --git a/python/conda package/k_hop_dominating_set_gurobi/k_hop_dominating_set_gurobi/k_hop_dom_set.py b/python/conda package/k_hop_dominating_set_gurobi/k_hop_dominating_set_gurobi/k_hop_dom_set.py index 5e022f4..a832d49 100755 --- a/python/conda package/k_hop_dominating_set_gurobi/k_hop_dominating_set_gurobi/k_hop_dom_set.py +++ b/python/conda package/k_hop_dominating_set_gurobi/k_hop_dominating_set_gurobi/k_hop_dom_set.py @@ -118,57 +118,6 @@ class RootedConnectecKHopDominatingSet(ConnectedKHopDominatingSet): self.m.addConstr(self.nodes[root] >= 1) - # for i in G.nodes: - # if(i not in G.neighbors(root) and i is not root): - # min_ij_sep = ConnectedKHopDominatingSet.min_ij_separator(G, i, root, {i}) - # self.m.addConstr(gp.quicksum(self.nodes[s] for s in min_ij_sep) >= self.nodes[i]) - - # for i in G.nodes: - # for j in G.nodes: - # if i != j and j not in G.neighbors(i): - # min_ij_sep = ConnectedKHopDominatingSet.min_ij_separator(self.G, i, j, {i}) - # self.m.addConstr(gp.quicksum(self.nodes[s] for s in min_ij_sep) >= self.nodes[i] + self.nodes[j] - 1) - - - # All Neighbor separators - # for v in G.nodes: - # if v is not root and root not in G.neighbors(v) and v not in G.neighbors(root) and not set(G.neighbors(root)).intersection(set(G.neighbors(v))): - # for i in range(2,G.degree[v]): - # V = {w for w in G.neighbors(v)} - # V.update([v]) - # # for i_neighborhood in combinations(V, 2): - # for i_neighborhood in combinations(V, i): - # if v in i_neighborhood: - # min_ij_sep = ConnectedKHopDominatingSet.min_ij_separator(G, v, root, set(i_neighborhood)) - # self.m.addConstr(gp.quicksum(self.nodes[s] for s in min_ij_sep) >= self.nodes[v]) - - # All separators from single root - # for v in G.nodes: - # # if v is not root and root not in G.neighbors(v) and v not in G.neighbors(root) and not set(G.neighbors(root)).intersection(set(G.neighbors(v))): - # for i in range(2,len(G.nodes)): - # V = {w for w in G.neighbors(v)} - # V.update([v]) - # # for i_neighborhood in combinations(V, 2): - # for i_neighborhood in combinations(V, i): - # if v in i_neighborhood: - # min_ij_sep = ConnectedKHopDominatingSet.min_ij_separator(G, v, root, set(i_neighborhood)) - # if min_ij_sep: - # self.m.addConstr(gp.quicksum(self.nodes[s] for s in min_ij_sep) >= self.nodes[v]) - - # for v in G.nodes: - # # if v is not root and root not in G.neighbors(v) and v not in G.neighbors(root) and not set(G.neighbors(root)).intersection(set(G.neighbors(v))): - # for i in range(2,len(G.nodes)): - # V = {w for w in G.neighbors(v)} - # V.update([v]) - # # for i_neighborhood in combinations(V, 2): - # for i_neighborhood in combinations(V, i): - # if v in i_neighborhood: - # for h in G.nodes: - # min_ij_sep = ConnectedKHopDominatingSet.min_ij_separator(G, v, h, set(i_neighborhood)) - # if min_ij_sep: - # self.m.addConstr(gp.quicksum(self.nodes[s] for s in min_ij_sep) >= self.nodes[v]) - - def add_single_root_separators(self): for i in self.G.nodes: min_ij_sep = ConnectedKHopDominatingSet.min_ij_separator(G, i, self.root, {i}) -- GitLab