return e->tail;
}
-Agraph_t *graphof(Agraph_t *g) {
+Agraph_t *graphof(Agraph_t *g)
+{
if (!g || g == g->root)
return NULL;
return g->root;
return agfstout(g, n);
}
-Agedge_t *firstout(Agedge_t *e) { return NULL; }
+Agedge_t *firstout(Agedge_t *e)
+{ return NULL; }
-Agedge_t *nextout(Agedge_t *e, Agedge_t *ee) { return NULL; }
+Agedge_t *nextout(Agedge_t *e, Agedge_t *ee)
+{ return NULL; }
Agedge_t *firstout(Agnode_t *n)
{
return (agfstin(g, n));
}
-Agedge_t *firstin(Agedge_t *e) { return NULL; }
+Agedge_t *firstin(Agedge_t *e)
+{ return NULL; }
-Agedge_t *nextin(Agedge_t *e, Agedge_t *ee) { return NULL; }
+Agedge_t *nextin(Agedge_t *e, Agedge_t *ee)
+{ return NULL; }
Agedge_t *firstin(Agnode_t *n)
{
return (e->head);
}
-Agnode_t *first(Agnode_t *n) { return NULL; }
+Agnode_t *first(Agnode_t *n)
+{ return NULL; }
-Agnode_t *next(Agnode_t *n, Agnode_t *nn) { return NULL; }
+Agnode_t *next(Agnode_t *n, Agnode_t *nn)
+{ return NULL; }
void rm(Agraph_t *g)
{
extern char *set(Agnode_t *n, char *attr, char *val=NULL);
extern char *set(Agedge_t *e, char *attr, char *val=NULL);
+/* misc navigators */
+extern Agnode_t *headof(Agedge_t *e);
+extern Agnode_t *tailof(Agedge_t *e);
+extern Agraph_t *graphof(Agraph_t *g);
+extern Agraph_t *graphof(Agedge_t *e);
+extern Agraph_t *graphof(Agnode_t *n);
+extern Agraph_t *rootof(Agraph_t *g);
+
+/* iterators */
+extern Agraph_t *firstsubg(Agraph_t *g);
+extern Agraph_t *firstsupg(Agraph_t *g);
+extern Agedge_t *firstout(Agraph_t *g);
+extern Agedge_t *firstout(Agedge_t *e);
+extern Agedge_t *firstout(Agnode_t *n);
+extern Agedge_t *firstin(Agraph_t *g);
+extern Agedge_t *firstin(Agedge_t *e);
+extern Agedge_t *firstin(Agnode_t *n);
+extern Agnode_t *first(Agraph_t *g);
+extern Agnode_t *first(Agedge_t *e);
+extern Agnode_t *first(Agnode_t *n);
+
+extern Agraph_t *nextsubg(Agraph_t *g, Agraph_t *sg);
+extern Agraph_t *nextsupg(Agraph_t *g, Agraph_t *sg);
+extern Agedge_t *nextout(Agraph_t *g, Agedge_t *e);
+extern Agedge_t *nextout(Agedge_t *e, Agedge_t *ee);
+extern Agedge_t *nextout(Agnode_t *n, Agedge_t *e);
+extern Agedge_t *nextin(Agraph_t *g, Agedge_t *e);
+extern Agedge_t *nextin(Agedge_t *e, Agedge_t *ee);
+extern Agedge_t *nextin(Agnode_t *n, Agedge_t *e);
+extern Agnode_t *next(Agraph_t *g, Agnode_t *n);
+extern Agnode_t *next(Agedge_t *e, Agnode_t *n);
+extern Agnode_t *next(Agnode_t *n, Agnode_t *nn);
+
+
/* remove graph objects */
extern void rm(Agraph_t *g);
extern void rm(Agnode_t *n);