diff options
author | Jaron <jaron@kent-dobias.com> | 2017-06-22 22:40:47 -0400 |
---|---|---|
committer | Jaron <jaron@kent-dobias.com> | 2017-06-22 22:40:47 -0400 |
commit | d59fc339a40a47405bfef8c1313e324adca70479 (patch) | |
tree | addf46044c3a1507bd4069797c6218c457b67e5f /src/factor_update.c | |
parent | f4a50f1332ff323c42aa9664292910fd78933c15 (diff) | |
parent | 4764d5d407347d4dd5990411b243b3ec4bd75bff (diff) | |
download | fuse_networks-d59fc339a40a47405bfef8c1313e324adca70479.tar.gz fuse_networks-d59fc339a40a47405bfef8c1313e324adca70479.tar.bz2 fuse_networks-d59fc339a40a47405bfef8c1313e324adca70479.zip |
lots of changes for merge
Diffstat (limited to 'src/factor_update.c')
-rw-r--r-- | src/factor_update.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/src/factor_update.c b/src/factor_update.c deleted file mode 100644 index a51705a..0000000 --- a/src/factor_update.c +++ /dev/null @@ -1,68 +0,0 @@ - -#include "fracture.h" - -void factor_update(cholmod_factor *factor, uint_t v1, uint_t v2, cholmod_common *c) { - uint_t n = factor->n; - - cholmod_sparse *update_mat = - CHOL_F(allocate_sparse)(n, n, 2, true, true, 0, CHOLMOD_REAL, c); - - uint_t s1, s2; - s1 = v1 < v2 ? v1 : v2; - s2 = v1 > v2 ? v1 : v2; - - int_t *pp = (int_t *)update_mat->p; - int_t *ii = (int_t *)update_mat->i; - double *xx = (double *)update_mat->x; - - for (uint_t i = 0; i <= s1; i++) { - pp[i] = 0; - } - - for (uint_t i = s1 + 1; i <= n; i++) { - pp[i] = 2; - } - - ii[0] = s1; - ii[1] = s2; - xx[0] = 1; - xx[1] = -1; - - cholmod_sparse *perm_update_mat = CHOL_F(submatrix)( - update_mat, factor->Perm, factor->n, NULL, -1, true, true, c); - - CHOL_F(updown)(false, perm_update_mat, factor, c); - - CHOL_F(free_sparse)(&perm_update_mat, c); - CHOL_F(free_sparse)(&update_mat, c); -} - -void factor_update2(cholmod_factor *factor, uint_t v, cholmod_common *c) { - uint_t n = factor->n; - - cholmod_sparse *update_mat = - CHOL_F(allocate_sparse)(n, n, 1, true, true, 0, CHOLMOD_REAL, c); - - int_t *pp = (int_t *)update_mat->p; - int_t *ii = (int_t *)update_mat->i; - double *xx = (double *)update_mat->x; - - for (uint_t i = 0; i <= v; i++) { - pp[i] = 0; - } - - for (uint_t i = v + 1; i <= n; i++) { - pp[i] = 1; - } - - ii[0] = v; - xx[0] = 1; - - cholmod_sparse *perm_update_mat = CHOL_F(submatrix)( - update_mat, factor->Perm, factor->n, NULL, -1, true, true, c); - - CHOL_F(updown)(false, perm_update_mat, factor, c); - - CHOL_F(free_sparse)(&perm_update_mat, c); - CHOL_F(free_sparse)(&update_mat, c); -} |