]> granicus.if.org Git - graphviz/commitdiff
remove SUM_IMGINARY_KEEP_LAST_REAL option
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 1 Jul 2021 02:00:40 +0000 (19:00 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 7 Jul 2021 14:30:15 +0000 (07:30 -0700)
This is a configuration option to
SparseMatrix_from_coordinate_arrays_not_compacted that is never used. Curiously
it also seems misspelled.

lib/sparse/SparseMatrix.c
lib/sparse/SparseMatrix.h

index 50bac4e4b83a3ee5610abb82bd3525716adb269c..97411775f1cb2ccddcc2c593aae48541c6276b8c 100644 (file)
@@ -1645,26 +1645,6 @@ SparseMatrix SparseMatrix_sum_repeat_entries(SparseMatrix A, int what_to_sum){
          sta = ia[i+1];
          ia[i+1] = nz;
        }
-      } else if (what_to_sum == SUM_IMGINARY_KEEP_LAST_REAL){
-       /* merge {i,j,R1,I1} and {i,j,R2,I2} into {i,j,R1+R2,I2}*/
-       nz = 0;
-       sta = ia[0];
-       for (i = 0; i < A->m; i++){
-         for (j = sta; j < ia[i+1]; j++){
-           if (mask[ja[j]] < ia[i]){
-             ja[nz] = ja[j];
-             a[2*nz] = a[2*j];
-             a[2*nz+1] = a[2*j+1];
-             mask[ja[j]] = nz++;
-           } else {
-             assert(ja[mask[ja[j]]] == ja[j]);
-             a[2*mask[ja[j]]] += a[2*j];
-             a[2*mask[ja[j]]+1] = a[2*j+1];
-           }
-         }
-         sta = ia[i+1];
-         ia[i+1] = nz;
-        }
       } else if (what_to_sum == SUM_REPEATED_REAL_PART){
        int ymin, ymax, id;
        ymax = ymin = a[1];
index 821cdd2c9fc7d9ef00f7f7d0cde21d8a84b921fd..79d2697571682b6de7ff0b257490bb3128ed4b10 100644 (file)
@@ -66,10 +66,8 @@ SparseMatrix SparseMatrix_multiply3(SparseMatrix A, SparseMatrix B, SparseMatrix
    if what_to_sum = SUM_REPEATED_IMAGINARY_PART, we find entries {i,j,x + i y} and sum the y's if {i,j,Round(x)} are the same
    For other matrix, what_to_sum = SUM_REPEATED_REAL_PART is the same as what_to_sum = SUM_REPEATED_IMAGINARY_PART
    or what_to_sum = SUM_REPEATED_ALL
-   if what_to_sum = SUM_IMGINARY_KEEP_LAST_REAL, we merge {i,j,R1,I1} and {i,j,R2,I2} into {i,j,R1+R2,I2}. Useful if I1 and I2 are time stamps, 
-   .   and we use this to indicate that a user watched R1+R2 seconds, last watch is I2.
 */
-enum {SUM_REPEATED_NONE = 0, SUM_REPEATED_ALL, SUM_REPEATED_REAL_PART, SUM_REPEATED_IMAGINARY_PART, SUM_IMGINARY_KEEP_LAST_REAL};
+enum {SUM_REPEATED_NONE = 0, SUM_REPEATED_ALL, SUM_REPEATED_REAL_PART, SUM_REPEATED_IMAGINARY_PART, };
 SparseMatrix SparseMatrix_sum_repeat_entries(SparseMatrix A, int what_to_sum);
 SparseMatrix SparseMatrix_coordinate_form_add_entries(SparseMatrix A, int nentries, int *irn, int *jcn, void *val);
 int SparseMatrix_is_symmetric(SparseMatrix A, int test_pattern_symmetry_only);