Commit 4cba3dc1 authored by msurl's avatar msurl
Browse files

deleted outcommented code

parent 89a50a18
......@@ -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})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment