From 4c4ebb87ead363d6d6e11a8b95b07a0f93af5c88 Mon Sep 17 00:00:00 2001 From: pants Date: Tue, 6 Sep 2016 15:05:27 -0400 Subject: finished implementing embedded systems, refactored a bunch --- src/bin_values.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bin_values.c') diff --git a/src/bin_values.c b/src/bin_values.c index 2cb9cf6..8cde548 100644 --- a/src/bin_values.c +++ b/src/bin_values.c @@ -1,10 +1,10 @@ #include "fracture.h" -double *bin_values(fnet *network, unsigned int width, double *values) { +double *bin_values(graph_t *network, unsigned int width, double *values) { double *binned = calloc(pow(width, 2), sizeof(double)); unsigned int *num_binned = calloc(pow(width, 2), sizeof(unsigned int)); - for (unsigned int i = 0; i < network->num_edges; i++) { + for (unsigned int i = 0; i < network->ne; i++) { if (values[i] != 0) { unsigned int x = ((int)(network->edge_coords[2 * i] * width)) % width; unsigned int y = ((int)(network->edge_coords[2 * i + 1] * width)) % width; -- cgit v1.2.3-70-g09d2