summaryrefslogtreecommitdiff
path: root/src/coursegrain.c
diff options
context:
space:
mode:
authorpants <jaron@kent-dobias.com>2016-09-08 11:54:06 -0400
committerpants <jaron@kent-dobias.com>2016-09-08 11:54:06 -0400
commitb74bf87fd7eb2e75e71f6b667bd12b0ca7a31c11 (patch)
treec3fa46f10f6ae8604c4e784febc3eaa49b51b821 /src/coursegrain.c
parenta264723b23d9ad6c3cb13450a6cf4b131f8d7338 (diff)
downloadfuse_networks-b74bf87fd7eb2e75e71f6b667bd12b0ca7a31c11.tar.gz
fuse_networks-b74bf87fd7eb2e75e71f6b667bd12b0ca7a31c11.tar.bz2
fuse_networks-b74bf87fd7eb2e75e71f6b667bd12b0ca7a31c11.zip
cleaned up old files that don't matter
Diffstat (limited to 'src/coursegrain.c')
-rw-r--r--src/coursegrain.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/coursegrain.c b/src/coursegrain.c
deleted file mode 100644
index 3e9db1a..0000000
--- a/src/coursegrain.c
+++ /dev/null
@@ -1,40 +0,0 @@
-
-#include "fracture.h"
-
-net_t *coursegrain_square(net_t *instance, graph_t *network_p, cholmod_common *c) {
- unsigned int width = sqrt(instance->graph->ne);
- assert(width % 4 == 0);
-
- net_t *instance_p = create_instance(network_p, instance->inf, 1,
- instance->voltage_bound, true, c);
-
- unsigned int width_p = width / 2;
- bool *fuses = instance->fuses;
-
- for (unsigned int i = 0; i < network_p->ne; i++) {
- int xp = i / width_p;
- int yp = i % width_p;
- unsigned int x1 = 2 * xp;
- unsigned int y1 = (2 * yp - 1) % width;
- unsigned int x2 = 2 * xp;
- unsigned int y2 = 2 * yp;
- unsigned int x3 = 2 * xp + 1;
- unsigned int y3 = (2 * yp - 1) % width;
- unsigned int x4 = 2 * xp + 1;
- unsigned int y4 = 2 * yp;
- bool f1 = fuses[width * x1 + y1];
- bool f2 = fuses[width * x2 + y2];
- bool f3 = fuses[width * x3 + y3];
- bool f4 = fuses[width * x4 + y4];
-
- if ((f1 && f2) || (f3 && f4)) {
- // instance_p->fuses[i] = true;
- // instance_p->num_remaining_edges--;
- break_edge(instance_p, i, c);
- }
- }
-
- // fin_instance(instance_p, c);
-
- return instance_p;
-}