]> granicus.if.org Git - graphviz/commitdiff
Integrate topfish and sfdp into main tree, using GTS for triangulation;
authorerg <devnull@localhost>
Tue, 29 Apr 2008 21:59:16 +0000 (21:59 +0000)
committererg <devnull@localhost>
Tue, 29 Apr 2008 21:59:16 +0000 (21:59 +0000)
remove duplicated code

cmd/smyrna/topfisheyeview.c
cmd/smyrna/topviewdata.c

index d93268af84345f659da3a69fa3ee3c21898800ce..8b7086fc2985346c1ddaca28d1b48d962db7cb04 100644 (file)
@@ -147,12 +147,12 @@ void fisheye_spherical(double x_focus, double y_focus, double z_focus,
     }
 }
 
-static vtx_data *makeGraph(topview * tv, int *nedges)
+static v_data *makeGraph(topview * tv, int *nedges)
 {
     int i;
     int ne = tv->Edgecount;    /* upper bound */
     int nv = tv->Nodecount;
-    vtx_data *graph = N_NEW(nv, vtx_data);
+    v_data *graph = N_NEW(nv, v_data);
     int *edges = N_NEW(2 * ne + nv, int);  /* reserve space for self loops */
     float *ewgts = N_NEW(2 * ne + nv, float);
     Agnode_t *np;
@@ -200,7 +200,7 @@ static vtx_data *makeGraph(topview * tv, int *nedges)
  * double* y_coords; // initial y coordinates
  * focus_t* fs;
  * int ne;
- * vtx_data* graph = makeGraph (topview*, &ne);
+ * v_data* graph = makeGraph (topview*, &ne);
  * hierarchy = makeHier(topview->NodeCount, ne, graph, x_coords, y_coords);
  * freeGraph (graph);
  * fs = initFocus (topview->Nodecount); // create focus set
@@ -218,7 +218,7 @@ void prepare_topological_fisheye(topview* t)
     ex_vtx_data *gg;
     topview_node *np;
 
-    vtx_data *graph = makeGraph(t, &ne);
+    v_data *graph = makeGraph(t, &ne);
 
        t->animate=0;   //turn the animation off
        for (i = 0, np = t->Nodes; i < t->Nodecount; i++, np++) {
@@ -273,7 +273,7 @@ void drawtopologicalfisheye(topview * t)
     for (level = 0; level < hp->nlevels; level++) {
        for (v = 0; v < hp->nvtxs[level]; v++) {
            ex_vtx_data *gg = hp->geom_graphs[level];
-           vtx_data *g = hp->graphs[level];
+           v_data *g = hp->graphs[level];
            if (gg[v].active_level == level) {
                        double x0,y0;
                        get_temp_coords(t,level,v,&x0,&y0);
@@ -357,7 +357,7 @@ void refresh_old_values(topview* t)
     for (level = 0; level < hp->nlevels; level++) {
        for (v = 0; v < hp->nvtxs[level]; v++) {
            ex_vtx_data *gg = hp->geom_graphs[level];
-           vtx_data *g = hp->graphs[level];
+           v_data *g = hp->graphs[level];
            if (gg[v].active_level == level) {
                        double x0,y0;
                        get_temp_coords(t,level,v,&x0,&y0);
@@ -404,7 +404,7 @@ void get_temp_coords(topview* t,int level,int v,double* coord_x,double* coord_y)
 {
     Hierarchy *hp = t->h;
        ex_vtx_data *gg = hp->geom_graphs[level];
-       vtx_data *g = hp->graphs[level];
+       v_data *g = hp->graphs[level];
        /*TEMP*/t->animate=0;/*TEMP*/
        if (!t->animate)        
        {
index 9cf57a0575466276f5511c78239c029500887a9c..9ab5c4891ea65b9f6349fa5c7f1a73b415122384 100644 (file)
 #include "topviewdata.h"
 #include <memory.h>
 
+static int validate_group_node(tv_node * TV_Node, char *regex_string)
+{
+    btree_node *n = 0;
+//              n=tree_from_filter_string("([IP=\"^10.*\",min=\"0\",max=\"0\"])");
+    int valid = 0;
+    n = tree_from_filter_string(regex_string);
+    valid = evaluate_expresions(TV_Node, n);
+//      delete_node(n); 
+    return valid;
+}
+
 int prepare_nodes_for_groups(topview * t, topviewdata * td, int groupindex)
 {
     GdkColor color;