From: Matthew Fernandez Date: Sat, 12 Jun 2021 04:01:18 +0000 (-0700) Subject: remove unused matvec_dense X-Git-Tag: 2.48.0~46^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f039f421e5043b335003fa1a5edc5881aeb0bdb;p=graphviz remove unused matvec_dense --- diff --git a/cmd/gvmap/power.c b/cmd/gvmap/power.c index 236af2318..5b25f80da 100644 --- a/cmd/gvmap/power.c +++ b/cmd/gvmap/power.c @@ -159,36 +159,3 @@ void mat_print_dense(real *M, int m, int n){ } fprintf(stderr,"}\n"); } - -void matvec_dense(void *M, int m, int n, real *u, real **v, int transpose, - int *flag){ - /* M.u or M^T.u */ - real *A; - int i, j; - - A = (real*) M; - *flag = 0; - - - if (!transpose){ - if (!(*v)) *v = MALLOC(sizeof(real)*m); - for (i = 0; i < m; i++){ - (*v)[i] = 0; - for (j = 0; j < n; j++){ - (*v)[i] += A[i*n+j]*u[j]; - } - } - } else { - if (!(*v)) *v = MALLOC(sizeof(real)*n); - for (i = 0; i < n; i++){ - (*v)[i] = 0; - } - for (i = 0; i < m; i++){ - for (j = 0; j < n; j++){ - (*v)[j] += A[i*n+j]*u[i]; - } - } - } - - return; -} diff --git a/cmd/gvmap/power.h b/cmd/gvmap/power.h index 52d1e87ce..1c0609683 100644 --- a/cmd/gvmap/power.h +++ b/cmd/gvmap/power.h @@ -13,14 +13,12 @@ #include -/* if you have a standard dense/sparse matrix, set matvec to matvec_dense/matvec_sparse*/ +/* if you have a standard sparse matrix, set matvec to matvec_sparse*/ void power_method(void (*matvec)(void *M, int m, int n, real *u, real **v, int transposed, int *flag), void *A, int n, int K, int random_seed, int maxit, real tol, real **eigv, real **eigs); void matvec_sparse(void *M, int m, int n, real *u, real **v, int transposed, int *flag); -void matvec_dense(void *M, int m, int n, real *u, real **v, int transposed, int *flag); - void mat_print_dense(real *M, int m, int n);