]> granicus.if.org Git - graphviz/commitdiff
remove unused 'n' parameter to matvec_sparse
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 12 Jun 2021 04:19:22 +0000 (21:19 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 19 Jun 2021 17:16:47 +0000 (10:16 -0700)
cmd/gvmap/power.c
cmd/gvmap/power.h

index b485a2a33b1d753168309c5cf7982d55de6a2afa..c6268142104c8530481d40ab67e46280476f4f43 100644 (file)
@@ -11,7 +11,7 @@
 #include "power.h"
 #include <sparse/SparseMatrix.h>
 
-void power_method(void (*matvec)(void *, int, real*, real **, int, int*),
+void power_method(void (*matvec)(void *, 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, real*, real **, int, int*),
          u[i] = u[i] - uij *v[j][i];
        }
       }
-      matvec(A, n, u, &vv, FALSE, &flag);
+      matvec(A, u, &vv, FALSE, &flag);
       assert(!flag);
 
       unorm = vector_product(n, vv, vv);/* ||u||^2 */    
@@ -117,7 +117,7 @@ void power_method(void (*matvec)(void *, int, real*, real **, int, int*),
   FREE(vv);  
 }
 
-void matvec_sparse(void *M, int n, real *u, real **v, int transpose, int *flag){
+void matvec_sparse(void *M, real *u, real **v, int transpose, int *flag){
   SparseMatrix A;
 
   *flag = 0;
index 46111e6a48839afe412e88f2b7c325f846ca6846..28690fdb3f1995a40206d56e0f4446e629851ee4 100644 (file)
@@ -14,9 +14,9 @@
 #include <sparse/general.h>
 
 /* if you have a standard sparse matrix, set matvec to matvec_sparse*/
-void power_method(void (*matvec)(void *M, int n, real *u, real **v, int transposed, int *flag),
+void power_method(void (*matvec)(void *M, 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 n, real *u, real **v, int transposed, int *flag);
+void matvec_sparse(void *M, real *u, real **v, int transposed, int *flag);
 
 #endif