]> granicus.if.org Git - graphviz/commitdiff
remove unused SparseMatrix_apply_fun_general
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 31 May 2021 16:37:11 +0000 (09:37 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 6 Jun 2021 18:06:37 +0000 (11:06 -0700)
lib/sparse/SparseMatrix.c
lib/sparse/SparseMatrix.h

index 64dffb3c8ff1d1982f69d2094550c9ce4d153e4c..23eafc37b4a391655c670c718fd0a6e90f283534 100644 (file)
@@ -2120,30 +2120,6 @@ SparseMatrix SparseMatrix_apply_fun(SparseMatrix A, double (*fun)(double x)){
   return A;
 }
 
-SparseMatrix SparseMatrix_apply_fun_general(SparseMatrix A, void (*fun)(int i, int j, int n, double *x)){
-  int i, j;
-  real *a;
-  int len = 1;
-
-  if (!A) return A;
-  if (A->format != FORMAT_CSR || (A->type != MATRIX_TYPE_REAL&&A->type != MATRIX_TYPE_COMPLEX)) {
-#ifdef DEBUG
-    printf("SparseMatrix_apply_fun: only CSR and real/complex matrix supported.\n");
-#endif
-    return A;
-  }
-  if (A->type == MATRIX_TYPE_COMPLEX) len = 2;
-
-  a = (real*) A->a;
-  for (i = 0; i < A->m; i++){
-    for (j = A->ia[i]; j < A->ia[i+1]; j++){
-      fun(i, A->ja[j], len, &a[len*j]);
-    }
-  }
-  return A;
-}
-
-
 SparseMatrix SparseMatrix_crop(SparseMatrix A, real epsilon){
   int i, j, *ia, *ja, nz, sta;
 
index 9edf5dc6567358432bcc90c887647d34d9de8771..1adbbf8ae2bab3f18047365854295be226656a22 100644 (file)
@@ -84,7 +84,6 @@ SparseMatrix SparseMatrix_divide_row_by_degree(SparseMatrix A);
 SparseMatrix SparseMatrix_get_real_adjacency_matrix_symmetrized(SparseMatrix A);  /* symmetric, all entries to 1, diaginal removed */
 void SparseMatrix_multiply_dense(SparseMatrix A, int ATranspose, real *v, int vTransposed, real **res, int res_transpose, int dim);
 SparseMatrix SparseMatrix_apply_fun(SparseMatrix A, double (*fun)(double x));/* for real only! */
-SparseMatrix SparseMatrix_apply_fun_general(SparseMatrix A, void (*fun)(int i, int j, int n, double *x));/* for real and complex (n=2) */
 SparseMatrix SparseMatrix_copy(SparseMatrix A);
 int SparseMatrix_has_diagonal(SparseMatrix A);
 SparseMatrix SparseMatrix_crop(SparseMatrix A, real epsilon);/*remove any entry <= epsilon*/