]> granicus.if.org Git - graphviz/commitdiff
remove unused SparseMatrix_scaled_by_vector
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 19 Jun 2021 21:14:37 +0000 (14:14 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 26 Jun 2021 02:28:08 +0000 (19:28 -0700)
lib/sparse/SparseMatrix.c
lib/sparse/SparseMatrix.h

index 1932b651141102b34f3ee51d7402f21a6629a756..58b18bea7f334430a418ee96fbc69e858600ab2b 100644 (file)
@@ -1224,40 +1224,6 @@ void SparseMatrix_multiply_vector(SparseMatrix A, real *v, real **res, int trans
 
 }
 
-
-
-SparseMatrix SparseMatrix_scaled_by_vector(SparseMatrix A, real *v, int apply_to_row){
-  /* A SCALED BY VECOTR V IN ROW/COLUMN. Real only for now. */
-  int i, j, *ia, *ja, m;
-  real *a;
-  assert(A->format == FORMAT_CSR);
-  assert(A->type == MATRIX_TYPE_REAL);
-
-  a = (real*) A->a;
-  ia = A->ia;
-  ja = A->ja;
-  m = A->m;
-
-
-  if (!apply_to_row){
-    for (i = 0; i < m; i++){
-      for (j = ia[i]; j < ia[i+1]; j++){
-       a[j] *= v[ja[j]];
-      }
-    }
-  } else {
-    for (i = 0; i < m; i++){
-      if (v[i] != 0){
-       for (j = ia[i]; j < ia[i+1]; j++){
-         a[j] *= v[i];
-       }
-      }
-    }
-  }
-  return A;
-
-}
-
 SparseMatrix SparseMatrix_multiply(SparseMatrix A, SparseMatrix B){
   int m;
   SparseMatrix C = NULL;
index b1dbc5d79d0b33077c85fd523e6db9b22ce783b6..39d52981facc921481e0dba1d9638a55dfe16666 100644 (file)
@@ -86,7 +86,6 @@ void SparseMatrix_multiply_dense(SparseMatrix A, int ATranspose, real *v, int vT
 SparseMatrix SparseMatrix_apply_fun(SparseMatrix A, double (*fun)(double x));/* for real only! */
 SparseMatrix SparseMatrix_copy(SparseMatrix A);
 int SparseMatrix_has_diagonal(SparseMatrix A);
-SparseMatrix SparseMatrix_scaled_by_vector(SparseMatrix A, real *v, int apply_to_row);
 SparseMatrix SparseMatrix_make_undirected(SparseMatrix A);/* make it strictly low diag only, and set flag to undirected */
 real SparseMatrix_pseudo_diameter_weighted(SparseMatrix A0, int root, int aggressive, int *end1, int *end2, int *connectedQ); /* assume real distances, unsymmetric matrix ill be symmetrized */
 real SparseMatrix_pseudo_diameter_unweighted(SparseMatrix A0, int root, int aggressive, int *end1, int *end2, int *connectedQ); /* assume unit edge length, unsymmetric matrix ill be symmetrized */