]> granicus.if.org Git - graphviz/commitdiff
remove configurability from SparseMatrix_from_coordinate_format_not_compacted
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 1 Jul 2021 01:55:55 +0000 (18:55 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 7 Jul 2021 14:30:15 +0000 (07:30 -0700)
This function is only ever called with SUM_REPEATED_NONE.

cmd/gvmap/make_map.c
lib/sparse/SparseMatrix.c
lib/sparse/SparseMatrix.h

index a593e228b60b34b532677c0b46dbab1c2fed26ca..53e9926dfe6e849e28a9b8f1a419f3cf6c612a9e 100644 (file)
@@ -396,7 +396,7 @@ static void get_tri(int n, int dim, real *x, int *nt, struct Triangle **T, Spars
     A = matrix_add_entry(A, i2, i0, i);
   }
 
-  B = SparseMatrix_from_coordinate_format_not_compacted(A, SUM_REPEATED_NONE);
+  B = SparseMatrix_from_coordinate_format_not_compacted(A);
   SparseMatrix_delete(A);
   B = SparseMatrix_sort(B);
   *E = B;
@@ -624,7 +624,7 @@ static void get_poly_lines(int exclude_random, int nt, SparseMatrix graph, Spars
     }/* found poly_lines for this comp */
   }
 
-  A = SparseMatrix_from_coordinate_format_not_compacted(*poly_lines, SUM_REPEATED_NONE);
+  A = SparseMatrix_from_coordinate_format_not_compacted(*poly_lines);
   SparseMatrix_delete(*poly_lines);
   *poly_lines = A;
 
@@ -747,7 +747,7 @@ static void get_polygon_solids(int nt, SparseMatrix E, int ncomps, int *comps_pt
   assert(E->nz >= ne);
 
   cycle = MALLOC(sizeof(int)*ne*2);
-  B = SparseMatrix_from_coordinate_format_not_compacted(half_edges, SUM_REPEATED_NONE);
+  B = SparseMatrix_from_coordinate_format_not_compacted(half_edges);
   SparseMatrix_delete(half_edges);half_edges = B;
 
   edge_cycle_map = MALLOC(sizeof(int)*ne);
@@ -927,7 +927,7 @@ static void get_polygon_solids(int nt, SparseMatrix E, int ncomps, int *comps_pt
     /* unset edge_map */
   }
 
-  B = SparseMatrix_from_coordinate_format_not_compacted(*polys, SUM_REPEATED_NONE);
+  B = SparseMatrix_from_coordinate_format_not_compacted(*polys);
   SparseMatrix_delete(*polys);
   *polys = B;
   
index e4eba916bcf8ea66c14792603cc2d25af867ac7e..65b404f235b8e128eb2417d6e7fea2217089a3b9 100644 (file)
@@ -714,7 +714,7 @@ SparseMatrix SparseMatrix_from_coordinate_format(SparseMatrix A){
   return SparseMatrix_from_coordinate_arrays(A->nz, A->m, A->n, irn, jcn, a, A->type, A->size);
 
 }
-SparseMatrix SparseMatrix_from_coordinate_format_not_compacted(SparseMatrix A, int what_to_sum){
+SparseMatrix SparseMatrix_from_coordinate_format_not_compacted(SparseMatrix A){
   /* convert a sparse matrix in coordinate form to one in compressed row form.*/
   int *irn, *jcn;
 
@@ -726,8 +726,7 @@ SparseMatrix SparseMatrix_from_coordinate_format_not_compacted(SparseMatrix A, i
   }
   irn = A->ia;
   jcn = A->ja;
-  return SparseMatrix_from_coordinate_arrays_not_compacted(A->nz, A->m, A->n, irn, jcn, a, A->type, A->size, what_to_sum);
-
+  return SparseMatrix_from_coordinate_arrays_not_compacted(A->nz, A->m, A->n, irn, jcn, a, A->type, A->size, SUM_REPEATED_NONE);
 }
 
 static SparseMatrix SparseMatrix_from_coordinate_arrays_internal(int nz, int m, int n, int *irn, int *jcn, void *val0, int type, size_t sz, int sum_repeated){
index 847229614337286857a578343885a24881c3245c..c24c07bf8b4b935c7cfe1b6278e0f9c792bdf4a9 100644 (file)
@@ -45,10 +45,10 @@ SparseMatrix SparseMatrix_general_new(int m, int n, int nz, int type, size_t sz,
 
 /* this version sum repeated entries */
 SparseMatrix SparseMatrix_from_coordinate_format(SparseMatrix A);
-/* what_to_sum is SUM_REPEATED_NONE, SUM_REPEATED_ALL, SUM_REPEATED_REAL_PART, SUM_REPEATED_IMAGINARY_PART, SUM_IMGINARY_KEEP_LAST_REAL*/
-SparseMatrix SparseMatrix_from_coordinate_format_not_compacted(SparseMatrix A, int what_to_sum);
+SparseMatrix SparseMatrix_from_coordinate_format_not_compacted(SparseMatrix A);
 
 SparseMatrix SparseMatrix_from_coordinate_arrays(int nz, int m, int n, int *irn, int *jcn, void *val, int type, size_t sz);
+/* what_to_sum is SUM_REPEATED_NONE, SUM_REPEATED_ALL, SUM_REPEATED_REAL_PART, SUM_REPEATED_IMAGINARY_PART, SUM_IMGINARY_KEEP_LAST_REAL*/
 SparseMatrix SparseMatrix_from_coordinate_arrays_not_compacted(int nz, int m, int n, int *irn, int *jcn, void *val, int type, size_t sz, int what_to_sum);