Skip to content

Commit da686e2

Browse files
two kinds of vertex weights on hypergraphs
1 parent 4fc5cc7 commit da686e2

File tree

9 files changed

+135
-54
lines changed

9 files changed

+135
-54
lines changed

include/osp/auxiliary/io/mtx_hypergraph_file_reader.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ bool readHypergraphMartixMarketFormat(std::ifstream& infile, Hypergraph& hgraph)
7979

8080
hgraph.reset(num_nodes, 0);
8181
for (unsigned node = 0; node < num_nodes; ++node) {
82-
hgraph.set_vertex_weight(node, 1);
82+
hgraph.set_vertex_work_weight(node, 1);
83+
hgraph.set_vertex_memory_weight(node, 1);
8384
}
8485

8586
std::vector<std::vector<unsigned>> row_hyperedges(static_cast<unsigned>(M_row));

include/osp/partitioning/model/hypergraph.hpp

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ class Hypergraph {
3030
Hypergraph() = default;
3131

3232
Hypergraph(unsigned num_vertices_, unsigned num_hyperedges_)
33-
: Num_vertices(num_vertices_), Num_hyperedges(num_hyperedges_), vertex_weights(num_vertices_, 1), hyperedge_weights(num_hyperedges_, 1),
33+
: Num_vertices(num_vertices_), Num_hyperedges(num_hyperedges_), vertex_work_weights(num_vertices_, 1),
34+
vertex_memory_weights(num_vertices_, 1), hyperedge_weights(num_hyperedges_, 1),
3435
incident_hyperedges_to_vertex(num_vertices_), vertices_in_hyperedge(num_hyperedges_){}
3536

3637
Hypergraph(const Hypergraph &other) = default;
@@ -41,17 +42,20 @@ class Hypergraph {
4142
inline unsigned num_vertices() const { return Num_vertices; }
4243
inline unsigned num_hyperedges() const { return Num_hyperedges; }
4344
inline unsigned num_pins() const { return Num_pins; }
44-
inline int get_vertex_weight(unsigned node) const { return vertex_weights[node]; }
45+
inline int get_vertex_work_weight(unsigned node) const { return vertex_work_weights[node]; }
46+
inline int get_vertex_memory_weight(unsigned node) const { return vertex_memory_weights[node]; }
4547
inline int get_hyperedge_weight(unsigned hyperedge) const { return hyperedge_weights[hyperedge]; }
4648

4749
void add_pin(unsigned vertex_idx, unsigned hyperedge_idx);
48-
void add_vertex(int weight = 1);
50+
void add_vertex(int work_weight = 1, int memory_weight = 1);
4951
void add_empty_hyperedge(int weight = 1);
5052
void add_hyperedge(const std::vector<unsigned>& pins, int weight = 1);
51-
void set_vertex_weight(unsigned vertex_idx, int weight);
53+
void set_vertex_work_weight(unsigned vertex_idx, int weight);
54+
void set_vertex_memory_weight(unsigned vertex_idx, int weight);
5255
void set_hyperedge_weight(unsigned hyperedge_idx, int weight);
5356

54-
int compute_total_vertex_weight() const;
57+
int compute_total_vertex_work_weight() const;
58+
int compute_total_vertex_memory_weight() const;
5559

5660
void clear();
5761
void reset(unsigned num_vertices_, unsigned num_hyperedges_);
@@ -68,7 +72,8 @@ class Hypergraph {
6872
private:
6973
unsigned Num_vertices = 0, Num_hyperedges = 0, Num_pins = 0;
7074

71-
std::vector<int> vertex_weights;
75+
std::vector<int> vertex_work_weights;
76+
std::vector<int> vertex_memory_weights;
7277
std::vector<int> hyperedge_weights;
7378

7479
std::vector<std::vector<unsigned>> incident_hyperedges_to_vertex;
@@ -92,9 +97,10 @@ void Hypergraph::add_pin(unsigned vertex_idx, unsigned hyperedge_idx)
9297
}
9398
}
9499

95-
void Hypergraph::add_vertex(int weight)
100+
void Hypergraph::add_vertex(int work_weight, int memory_weight)
96101
{
97-
vertex_weights.push_back(weight);
102+
vertex_work_weights.push_back(work_weight);
103+
vertex_memory_weights.push_back(memory_weight);
98104
incident_hyperedges_to_vertex.emplace_back();
99105
++Num_vertices;
100106
}
@@ -116,12 +122,20 @@ void Hypergraph::add_hyperedge(const std::vector<unsigned>& pins, int weight)
116122
Num_pins += static_cast<unsigned>(pins.size());
117123
}
118124

119-
void Hypergraph::set_vertex_weight(unsigned vertex_idx, int weight)
125+
void Hypergraph::set_vertex_work_weight(unsigned vertex_idx, int weight)
120126
{
121127
if(vertex_idx >= Num_vertices)
122128
throw std::invalid_argument("Invalid Argument while setting vertex weight: vertex index out of range.");
123129
else
124-
vertex_weights[vertex_idx] = weight;
130+
vertex_work_weights[vertex_idx] = weight;
131+
}
132+
133+
void Hypergraph::set_vertex_memory_weight(unsigned vertex_idx, int weight)
134+
{
135+
if(vertex_idx >= Num_vertices)
136+
throw std::invalid_argument("Invalid Argument while setting vertex weight: vertex index out of range.");
137+
else
138+
vertex_memory_weights[vertex_idx] = weight;
125139
}
126140

127141
void Hypergraph::set_hyperedge_weight(unsigned hyperedge_idx, int weight)
@@ -132,11 +146,19 @@ void Hypergraph::set_hyperedge_weight(unsigned hyperedge_idx, int weight)
132146
hyperedge_weights[hyperedge_idx] = weight;
133147
}
134148

135-
int Hypergraph::compute_total_vertex_weight() const
149+
int Hypergraph::compute_total_vertex_work_weight() const
150+
{
151+
int total = 0;
152+
for(unsigned node = 0; node < Num_vertices; ++node)
153+
total += vertex_work_weights[node];
154+
return total;
155+
}
156+
157+
int Hypergraph::compute_total_vertex_memory_weight() const
136158
{
137159
int total = 0;
138160
for(unsigned node = 0; node < Num_vertices; ++node)
139-
total += vertex_weights[node];
161+
total += vertex_memory_weights[node];
140162
return total;
141163
}
142164

@@ -146,7 +168,8 @@ void Hypergraph::clear()
146168
Num_hyperedges = 0;
147169
Num_pins = 0;
148170

149-
vertex_weights.clear();
171+
vertex_work_weights.clear();
172+
vertex_memory_weights.clear();
150173
hyperedge_weights.clear();
151174
incident_hyperedges_to_vertex.clear();
152175
vertices_in_hyperedge.clear();
@@ -159,7 +182,8 @@ void Hypergraph::reset(unsigned num_vertices_, unsigned num_hyperedges_)
159182
Num_vertices = num_vertices_;
160183
Num_hyperedges = num_hyperedges_;
161184

162-
vertex_weights.resize(num_vertices_, 1);
185+
vertex_work_weights.resize(num_vertices_, 1);
186+
vertex_memory_weights.resize(num_vertices_, 1);
163187
hyperedge_weights.resize(num_hyperedges_, 1);
164188
incident_hyperedges_to_vertex.resize(num_vertices_);
165189
vertices_in_hyperedge.resize(num_hyperedges_);
@@ -171,7 +195,8 @@ void Hypergraph::convert_from_cdag_as_dag(const Graph_t& dag)
171195
reset(static_cast<unsigned>(dag.num_vertices()), 0);
172196
for(const auto &node : dag.vertices())
173197
{
174-
set_vertex_weight(static_cast<unsigned>(node), static_cast<int>(dag.vertex_work_weight(node)));
198+
set_vertex_work_weight(static_cast<unsigned>(node), static_cast<int>(dag.vertex_work_weight(node)));
199+
set_vertex_memory_weight(static_cast<unsigned>(node), static_cast<int>(dag.vertex_mem_weight(node)));
175200
for (const auto &child : dag.children(node))
176201
add_hyperedge({static_cast<unsigned>(node), static_cast<unsigned>(child)}); // TODO add edge weights if present
177202
}
@@ -183,7 +208,8 @@ void Hypergraph::convert_from_cdag_as_hyperdag(const Graph_t& dag)
183208
reset(static_cast<unsigned>(dag.num_vertices()), 0);
184209
for(const auto &node : dag.vertices())
185210
{
186-
set_vertex_weight(static_cast<unsigned>(node), static_cast<int>(dag.vertex_work_weight(node)));
211+
set_vertex_work_weight(static_cast<unsigned>(node), static_cast<int>(dag.vertex_work_weight(node)));
212+
set_vertex_memory_weight(static_cast<unsigned>(node), static_cast<int>(dag.vertex_mem_weight(node)));
187213
if(dag.out_degree(node) == 0)
188214
continue;
189215
std::vector<unsigned> new_hyperedge({static_cast<unsigned>(node)});

include/osp/partitioning/model/partitioning.hpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,25 @@ int Partitioning::computeCutNetCost() const {
150150
}
151151

152152
bool Partitioning::satisfiesBalanceConstraint() const {
153-
std::vector<int> weight(instance->getNumberOfPartitions(), 0);
153+
std::vector<int> work_weight(instance->getNumberOfPartitions(), 0);
154+
std::vector<int> memory_weight(instance->getNumberOfPartitions(), 0);
154155
for (unsigned node = 0; node < node_to_partition_assignment.size(); ++node) {
155156
if (node_to_partition_assignment[node] > instance->getNumberOfPartitions())
156157
throw std::invalid_argument("Invalid Argument while checking balance constraint: partition ID out of range.");
157158
else
158-
weight[node_to_partition_assignment[node]] += instance->getHypergraph().get_vertex_weight(node);
159+
{
160+
work_weight[node_to_partition_assignment[node]] += instance->getHypergraph().get_vertex_work_weight(node);
161+
memory_weight[node_to_partition_assignment[node]] += instance->getHypergraph().get_vertex_memory_weight(node);
162+
}
159163
}
160164

161165
for(unsigned part = 0; part < instance->getNumberOfPartitions(); ++part)
162-
if(weight[part] > instance->getMaxWeightPerPartition())
166+
{
167+
if(work_weight[part] > instance->getMaxWorkWeightPerPartition())
163168
return false;
169+
if(memory_weight[part] > instance->getMaxMemoryWeightPerPartition())
170+
return false;
171+
}
164172

165173
return true;
166174
};

include/osp/partitioning/model/partitioning_problem.hpp

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,22 @@ class PartitioningProblem {
3232
Hypergraph hgraph;
3333

3434
unsigned nr_of_partitions;
35-
int max_weight_per_partition;
35+
int max_work_weight_per_partition;
36+
int max_memory_weight_per_partition;
3637

3738
bool allows_replication = false;
3839

3940
public:
4041

4142
PartitioningProblem() = default;
4243

43-
PartitioningProblem(const Hypergraph &hgraph_, unsigned nr_parts_ = 2, int max_weight_ = std::numeric_limits<int>::max())
44-
: hgraph(hgraph_), nr_of_partitions(nr_parts_), max_weight_per_partition(max_weight_) {}
44+
PartitioningProblem(const Hypergraph &hgraph_, unsigned nr_parts_ = 2, int max_work_weight_ = std::numeric_limits<int>::max(),
45+
int max_memory_weight_ = std::numeric_limits<int>::max()) : hgraph(hgraph_), nr_of_partitions(nr_parts_),
46+
max_work_weight_per_partition(max_work_weight_), max_memory_weight_per_partition(max_memory_weight_) {}
4547

46-
PartitioningProblem(const Hypergraph &&hgraph_, unsigned nr_parts_ = 2, int max_weight_ = std::numeric_limits<int>::max())
47-
: hgraph(hgraph_), nr_of_partitions(nr_parts_), max_weight_per_partition(max_weight_) {}
48+
PartitioningProblem(const Hypergraph &&hgraph_, unsigned nr_parts_ = 2, int max_work_weight_ = std::numeric_limits<int>::max(),
49+
int max_memory_weight_ = std::numeric_limits<int>::max()) : hgraph(hgraph_), nr_of_partitions(nr_parts_),
50+
max_work_weight_per_partition(max_work_weight_), max_memory_weight_per_partition(max_memory_weight_) {}
4851

4952
PartitioningProblem(const PartitioningProblem &other) = default;
5053
PartitioningProblem(PartitioningProblem &&other) = default;
@@ -57,7 +60,8 @@ class PartitioningProblem {
5760
inline Hypergraph &getHypergraph() { return hgraph; }
5861

5962
inline unsigned getNumberOfPartitions() const { return nr_of_partitions; }
60-
inline int getMaxWeightPerPartition() const { return max_weight_per_partition; }
63+
inline int getMaxWorkWeightPerPartition() const { return max_work_weight_per_partition; }
64+
inline int getMaxMemoryWeightPerPartition() const { return max_memory_weight_per_partition; }
6165
inline bool getAllowsReplication() const { return allows_replication; }
6266

6367
// setters
@@ -66,12 +70,19 @@ class PartitioningProblem {
6670
inline void setNumberOfPartitions(unsigned nr_parts_) { nr_of_partitions = nr_parts_; }
6771
inline void setAllowsReplication(bool allowed_) { allows_replication = allowed_; }
6872

69-
inline void setMaxWeightExplicitly(int max_weight_) { max_weight_per_partition = max_weight_; }
70-
void setMaxWeightViaImbalanceFactor(double imbalance){
73+
inline void setMaxWorkWeightExplicitly(int max_weight_) { max_work_weight_per_partition = max_weight_; }
74+
void setMaxWorkWeightViaImbalanceFactor(double imbalance){
7175
if(imbalance < 0 )
7276
throw std::invalid_argument("Invalid Argument while setting imbalance parameter: parameter is negative.");
7377
else
74-
max_weight_per_partition = static_cast<int>(ceil(hgraph.compute_total_vertex_weight()/ static_cast<double>(nr_of_partitions) * (1.0+imbalance)));
78+
max_work_weight_per_partition = static_cast<int>(ceil(hgraph.compute_total_vertex_work_weight()/ static_cast<double>(nr_of_partitions) * (1.0+imbalance)));
79+
}
80+
inline void setMaxMemoryWeightExplicitly(int max_weight_) { max_memory_weight_per_partition = max_weight_; }
81+
void setMaxMemoryWeightViaImbalanceFactor(double imbalance){
82+
if(imbalance < 0 )
83+
throw std::invalid_argument("Invalid Argument while setting imbalance parameter: parameter is negative.");
84+
else
85+
max_memory_weight_per_partition = static_cast<int>(ceil(hgraph.compute_total_vertex_memory_weight()/ static_cast<double>(nr_of_partitions) * (1.0+imbalance)));
7586
}
7687
};
7788

include/osp/partitioning/model/partitioning_replication.hpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,18 +191,26 @@ int PartitioningWithReplication::computeCutNetCost() const {
191191
}
192192

193193
bool PartitioningWithReplication::satisfiesBalanceConstraint() const {
194-
std::vector<int> weight(instance->getNumberOfPartitions(), 0);
194+
std::vector<int> work_weight(instance->getNumberOfPartitions(), 0);
195+
std::vector<int> memory_weight(instance->getNumberOfPartitions(), 0);
195196
for (unsigned node = 0; node < node_to_partitions_assignment.size(); ++node)
196197
for(unsigned part : node_to_partitions_assignment[node]){
197198
if (part > instance->getNumberOfPartitions())
198199
throw std::invalid_argument("Invalid Argument while checking balance constraint: partition ID out of range.");
199200
else
200-
weight[part] += instance->getHypergraph().get_vertex_weight(node);
201+
{
202+
work_weight[part] += instance->getHypergraph().get_vertex_work_weight(node);
203+
memory_weight[part] += instance->getHypergraph().get_vertex_memory_weight(node);
204+
}
201205
}
202206

203207
for(unsigned part = 0; part < instance->getNumberOfPartitions(); ++part)
204-
if(weight[part] > instance->getMaxWeightPerPartition())
208+
{
209+
if(work_weight[part] > instance->getMaxWorkWeightPerPartition())
205210
return false;
211+
if(memory_weight[part] > instance->getMaxMemoryWeightPerPartition())
212+
return false;
213+
}
206214

207215
return true;
208216
};

include/osp/partitioning/partitioners/generic_FM.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ void GenericFM::ImprovePartitioning(Partitioning& partition)
6363
max_degree = std::max(max_degree, static_cast<unsigned>(Hgraph.get_incident_hyperedges(node).size()));
6464

6565
if(max_nodes_in_part == 0) // if not initialized
66-
max_nodes_in_part = static_cast<unsigned>(ceil(static_cast<double>(Hgraph.num_vertices()) * static_cast<double>(partition.getInstance().getMaxWeightPerPartition())
67-
/ static_cast<double>(Hgraph.compute_total_vertex_weight()) ));
66+
max_nodes_in_part = static_cast<unsigned>(ceil(static_cast<double>(Hgraph.num_vertices()) * static_cast<double>(partition.getInstance().getMaxWorkWeightPerPartition())
67+
/ static_cast<double>(Hgraph.compute_total_vertex_work_weight()) ));
6868

6969
for(unsigned pass_idx = 0; pass_idx < max_number_of_passes; ++pass_idx)
7070
{

include/osp/partitioning/partitioners/partitioning_ILP_base.hpp

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,28 @@ void HypergraphPartitioningILPBase::setupFundamentalVariablesConstraintsObjectiv
8989
hyperedge_uses_partition[hyperedge] = model.AddVars(static_cast<int>(numberOfParts), COPT_BINARY, "hyperedge_uses_partition");
9090

9191
// partition size constraints
92-
for (unsigned part = 0; part < numberOfParts; part++)
92+
if(instance.getMaxWorkWeightPerPartition() < std::numeric_limits<int>::max())
9393
{
94-
Expr expr;
95-
for (unsigned node = 0; node < numberOfVertices; node++)
96-
expr += instance.getHypergraph().get_vertex_weight(node) * node_in_partition[node][static_cast<int>(part)];
94+
for (unsigned part = 0; part < numberOfParts; part++)
95+
{
96+
Expr expr;
97+
for (unsigned node = 0; node < numberOfVertices; node++)
98+
expr += instance.getHypergraph().get_vertex_work_weight(node) * node_in_partition[node][static_cast<int>(part)];
9799

98-
model.AddConstr(expr <= instance.getMaxWeightPerPartition());
100+
model.AddConstr(expr <= instance.getMaxWorkWeightPerPartition());
101+
}
99102
}
103+
if(instance.getMaxMemoryWeightPerPartition() < std::numeric_limits<int>::max())
104+
{
105+
for (unsigned part = 0; part < numberOfParts; part++)
106+
{
107+
Expr expr;
108+
for (unsigned node = 0; node < numberOfVertices; node++)
109+
expr += instance.getHypergraph().get_vertex_memory_weight(node) * node_in_partition[node][static_cast<int>(part)];
110+
111+
model.AddConstr(expr <= instance.getMaxMemoryWeightPerPartition());
112+
}
113+
}
100114

101115
// set objective
102116
Expr expr;

tests/hypergraph_and_partition.cpp

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ BOOST_AUTO_TEST_CASE(Hypergraph_and_Partition_test) {
9393
BOOST_CHECK(connectivityCost >= cutNetCost);
9494

9595
for(unsigned node = 0; node < Hgraph.num_vertices(); ++node)
96-
instance.getHypergraph().set_vertex_weight(node, 1);
96+
instance.getHypergraph().set_vertex_work_weight(node, 1);
9797

98-
instance.setMaxWeightViaImbalanceFactor(0);
98+
instance.setMaxWorkWeightViaImbalanceFactor(0);
9999
BOOST_CHECK(partition.satisfiesBalanceConstraint());
100100

101101
instance.setNumberOfPartitions(5);
102-
instance.setMaxWeightViaImbalanceFactor(0);
102+
instance.setMaxWorkWeightViaImbalanceFactor(0);
103103
BOOST_CHECK(!partition.satisfiesBalanceConstraint());
104104

105105
for(unsigned node = 0; node < Hgraph.num_vertices(); ++node)
@@ -108,14 +108,20 @@ BOOST_AUTO_TEST_CASE(Hypergraph_and_Partition_test) {
108108
BOOST_CHECK(partition.satisfiesBalanceConstraint());
109109
BOOST_CHECK(partition.computeConnectivityCost() >= partition.computeCutNetCost());
110110

111+
for(unsigned node = 0; node < Hgraph.num_vertices(); ++node)
112+
instance.getHypergraph().set_vertex_memory_weight(node, 1);
113+
instance.setMaxMemoryWeightExplicitly(10);
114+
BOOST_CHECK(partition.satisfiesBalanceConstraint() == false);
115+
instance.setMaxMemoryWeightExplicitly(std::numeric_limits<int>::max());
116+
111117
file_writer::write_txt(std::cout, partition);
112118

113119

114120
// Dummy partitioning with replication
115121

116122
instance.getHypergraph().convert_from_cdag_as_hyperdag(DAG);
117123
instance.setNumberOfPartitions(3);
118-
instance.setMaxWeightExplicitly(30);
124+
instance.setMaxWorkWeightExplicitly(30);
119125
PartitioningWithReplication partition_with_rep(instance);
120126
for(unsigned node = 0; node < Hgraph.num_vertices(); ++node)
121127
partition_with_rep.setAssignedPartitions(node, {node % 3});
@@ -124,14 +130,14 @@ BOOST_AUTO_TEST_CASE(Hypergraph_and_Partition_test) {
124130
BOOST_CHECK(partition_with_rep.computeCutNetCost() == cutNetCost);
125131
BOOST_CHECK(partition_with_rep.computeConnectivityCost() == connectivityCost);
126132

127-
instance.setMaxWeightExplicitly(60);
133+
instance.setMaxWorkWeightExplicitly(60);
128134
for(unsigned node = 0; node < Hgraph.num_vertices(); ++node)
129135
partition_with_rep.setAssignedPartitions(node, {node % 3, (node+1)%3});
130136

131137
BOOST_CHECK(partition_with_rep.satisfiesBalanceConstraint());
132138
BOOST_CHECK(partition_with_rep.computeConnectivityCost() >= partition_with_rep.computeCutNetCost());
133139

134-
instance.setMaxWeightExplicitly(Hgraph.compute_total_vertex_weight());
140+
instance.setMaxWorkWeightExplicitly(Hgraph.compute_total_vertex_work_weight());
135141
for(unsigned node = 0; node < Hgraph.num_vertices(); ++node)
136142
partition_with_rep.setAssignedPartitions(node, {0, 1, 2});
137143

@@ -145,9 +151,9 @@ BOOST_AUTO_TEST_CASE(Hypergraph_and_Partition_test) {
145151
// Generic FM
146152

147153
instance.setNumberOfPartitions(2);
148-
instance.setMaxWeightExplicitly(/*35*/ 4000);
154+
instance.setMaxWorkWeightExplicitly(/*35*/ 4000);
149155
for(unsigned node = 0; node < instance.getHypergraph().num_vertices(); ++node)
150-
instance.getHypergraph().set_vertex_weight(node, 1);
156+
instance.getHypergraph().set_vertex_work_weight(node, 1);
151157

152158
Partitioning partition_to_improve(instance);
153159
for(unsigned node = 0; node < instance.getHypergraph().num_vertices(); ++node)
@@ -168,9 +174,9 @@ BOOST_AUTO_TEST_CASE(Hypergraph_and_Partition_test) {
168174
(cwd / "data/spaa/large/instance_CG_N24_K22_nzP0d2.hdag").string(), larger_DAG);
169175
instance.getHypergraph().convert_from_cdag_as_hyperdag(larger_DAG);
170176

171-
instance.setMaxWeightExplicitly(4000);
177+
instance.setMaxWorkWeightExplicitly(4000);
172178
for(unsigned node = 0; node < instance.getHypergraph().num_vertices(); ++node)
173-
instance.getHypergraph().set_vertex_weight(node, 1);
179+
instance.getHypergraph().set_vertex_work_weight(node, 1);
174180

175181
partition_to_improve.resetPartition();
176182
for(unsigned node = 0; node < instance.getHypergraph().num_vertices(); ++node)

0 commit comments

Comments
 (0)