]> granicus.if.org Git - graphviz/commitdiff
Agglomerative_Ink_Bundling: remove unused 'prev' pointers
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 15 Jan 2022 22:04:37 +0000 (14:04 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 16 Jan 2022 18:51:42 +0000 (10:51 -0800)
This struct was used as a node in a doubly-linked list. But the back pointers
were never used. This commit simplifies it into a singly-linked-list.

lib/mingle/agglomerative_bundling.cpp
lib/mingle/agglomerative_bundling.h

index eaf36c0c18995c37331e3ea3c39a6fe9f8ffd0ad..f6e21c6b8d6de9718f78bc73721a4c6797ee99ea 100644 (file)
@@ -45,7 +45,6 @@ static Agglomerative_Ink_Bundling Agglomerative_Ink_Bundling_init(SparseMatrix A
   grid->R0 = NULL;
   grid->R = NULL;
   grid->next = NULL;
-  grid->prev = NULL;
   grid->inks = (double*)MALLOC(sizeof(double)*(A->m));
   grid->edges = edges;
   grid->delete_top_level_A = 0;
@@ -272,7 +271,6 @@ static Agglomerative_Ink_Bundling Agglomerative_Ink_Bundling_establish(Agglomera
 
     cgrid = Agglomerative_Ink_Bundling_establish(cgrid, pick, angle_param, angle);
     grid->next = cgrid;
-    cgrid->prev = grid;
 
   } else {
     if (Verbose > 1) fprintf(stderr,"no more improvement, orig ink = %f, gain = %f, stop and final bundling found\n", grand_total_ink, grand_total_gain);
index d3c6222a84b56bb1b1852b5b787b3ff5212abc3a..aa347bde0d853fc99ecc90b868048011840e6c75 100644 (file)
@@ -21,7 +21,6 @@ struct Agglomerative_Ink_Bundling_struct {
                     the nodes on the finest grid corresponding to the coarsest node 1, etc */
   SparseMatrix R;/* striction mtrix from level to level + 1*/
   Agglomerative_Ink_Bundling next;
-  Agglomerative_Ink_Bundling prev;
   double *inks; /* amount of ink needed to draw this edge/bundle. Dimension n. */
   double total_ink; /* amount of ink needed to draw this edge/bundle. Dimension n. */
   pedge* edges; /* the original edge info. This does not vary level to level and is of dimenion n0, where n0 is the number of original edges */