From d4ccf35e47cc9c519479e43c074374bdaf15c1bf Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 11 Jun 2021 21:15:39 -0700 Subject: [PATCH] remove unused 'm' parameter from matvec_sparse --- cmd/gvmap/power.c | 8 +++----- cmd/gvmap/power.h | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cmd/gvmap/power.c b/cmd/gvmap/power.c index 8279b5113..b485a2a33 100644 --- a/cmd/gvmap/power.c +++ b/cmd/gvmap/power.c @@ -11,7 +11,7 @@ #include "power.h" #include -void power_method(void (*matvec)(void *, int, int, real*, real **, int, int*), +void power_method(void (*matvec)(void *, int, real*, real **, int, int*), void *A, int n, int K, int random_seed, int maxit, real tol, real **eigv, real **eigs){ /* find k-largest eigenvectors of a matrix A. Result in eigv. if eigv == NULL; memory will be allocated. maxium of maxit iterations will be done, and tol is the convergence criterion @@ -90,7 +90,7 @@ void power_method(void (*matvec)(void *, int, int, real*, real **, int, int*), u[i] = u[i] - uij *v[j][i]; } } - matvec(A, n, n, u, &vv, FALSE, &flag); + matvec(A, n, u, &vv, FALSE, &flag); assert(!flag); unorm = vector_product(n, vv, vv);/* ||u||^2 */ @@ -117,9 +117,7 @@ void power_method(void (*matvec)(void *, int, int, real*, real **, int, int*), FREE(vv); } - -void matvec_sparse(void *M, int m, int n, real *u, real **v, int transpose, - int *flag){ +void matvec_sparse(void *M, int n, real *u, real **v, int transpose, int *flag){ SparseMatrix A; *flag = 0; diff --git a/cmd/gvmap/power.h b/cmd/gvmap/power.h index a5c85389d..46111e6a4 100644 --- a/cmd/gvmap/power.h +++ b/cmd/gvmap/power.h @@ -14,9 +14,9 @@ #include /* 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 power_method(void (*matvec)(void *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_sparse(void *M, int n, real *u, real **v, int transposed, int *flag); #endif -- 2.40.0