]> granicus.if.org Git - graphviz/commitdiff
remove unused matvec_dense
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 12 Jun 2021 04:01:18 +0000 (21:01 -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 236af231895675b2edfc38cbc75b42c07a44e04c..5b25f80da6d679f598947d35e4b9f2ea3cd3b062 100644 (file)
@@ -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;
-}
index 52d1e87ce8294d8b7c007daf92d7ff4d434cdac3..1c0609683d73d94f98544bd3482bb8341a9a2761 100644 (file)
 
 #include <sparse/general.h>
 
-/* 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);