summaryrefslogtreecommitdiff
path: root/src/break_edge.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/break_edge.c')
-rw-r--r--src/break_edge.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/break_edge.c b/src/break_edge.c
index 7fe7161..4e8bdcf 100644
--- a/src/break_edge.c
+++ b/src/break_edge.c
@@ -1,22 +1,14 @@
#include "fracture.h"
-bool break_edge(net_t *instance, uint_t edge, cholmod_common *c, bool refactor) {
+bool break_edge(net_t *instance, uint_t edge, cholmod_common *c) {
instance->fuses[edge] = true;
instance->num_broken++;
if (instance->factor != NULL) {
- if (refactor) {
- cholmod_sparse *laplacian = gen_laplacian(instance, c, true);
- CHOL_F(free_factor)(&instance->factor, c);
- instance->factor = CHOL_F(analyze)(laplacian, c);
- CHOL_F(factorize)(laplacian, instance->factor, c);
- CHOL_F(free_sparse)(&laplacian, c);
- } else {
- uint_t w1 = instance->graph->ev_break[2 * edge];
- uint_t w2 = instance->graph->ev_break[2 * edge + 1];
- factor_update(instance->factor, w1, w2, c);
- }
+ uint_t w1 = instance->graph->ev_break[2 * edge];
+ uint_t w2 = instance->graph->ev_break[2 * edge + 1];
+ factor_update(instance->factor, w1, w2, c);
}
uint_t v1, v2, s1, s2, dv1, dv2, ds1, ds2;