summaryrefslogtreecommitdiff
path: root/src/net.c
diff options
context:
space:
mode:
authorJaron <jaron@kent-dobias.com>2016-11-08 08:17:26 -0500
committerJaron <jaron@kent-dobias.com>2016-11-08 08:17:26 -0500
commit0ad947f800bcbe2c488d2d5cbcdb16c46e6d3857 (patch)
tree225b77daf1eefbf38457696172b5b8cd6095b155 /src/net.c
parentbaae7b05b59917df132fde049a56357a09d45caa (diff)
downloadfuse_networks-0ad947f800bcbe2c488d2d5cbcdb16c46e6d3857.tar.gz
fuse_networks-0ad947f800bcbe2c488d2d5cbcdb16c46e6d3857.tar.bz2
fuse_networks-0ad947f800bcbe2c488d2d5cbcdb16c46e6d3857.zip
various changes, including adding central moments and changing the fuse thresholds to long doubles
Diffstat (limited to 'src/net.c')
-rw-r--r--src/net.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net.c b/src/net.c
index f3aeda9..444e76c 100644
--- a/src/net.c
+++ b/src/net.c
@@ -1,8 +1,8 @@
#include "fracture.h"
-double *get_thres(uint_t ne, double beta) {
- double *thres = (double *)malloc(ne * sizeof(double));
+long double *get_thres(uint_t ne, double beta) {
+ long double *thres = (long double *)malloc(ne * sizeof(long double));
assert(thres != NULL);
gsl_rng *r = gsl_rng_alloc(GSL_RAND_GEN);
@@ -39,7 +39,7 @@ void net_notch(net_t *net, double notch_len, cholmod_common *c) {
correct_length = v1x < notch_len && v2x < notch_len;
if (crosses_center && not_wrapping && correct_length) {
- break_edge(net, i, c);
+ break_edge(net, i, c, false);
}
}
}
@@ -96,8 +96,8 @@ net_t *net_copy(const net_t *net, cholmod_common *c) {
assert(net_copy->fuses != NULL);
memcpy(net_copy->fuses, net->fuses, fuses_size);
- size_t thres_size = (net->graph)->ne * sizeof(double);
- net_copy->thres = (double *)malloc(thres_size);
+ size_t thres_size = (net->graph)->ne * sizeof(long double);
+ net_copy->thres = (long double *)malloc(thres_size);
assert(net_copy->thres != NULL);
memcpy(net_copy->thres, net->thres, thres_size);