28#define ND_mark(n) (((Agnodeinfo_t *)((n)->base.data))->mark)
29#define ND_onstack(n) (((Agnodeinfo_t *)((n)->base.data))->onstack)
30#define graphName(g) (agnameof(g))
66 if (
agedge(g, h, t, 0, 0) == 0) {
72 if (!key ||
agedge(g, h, t, key, 0) == 0) {
80 hasCycle |=
dfs(g, h, hasCycle, num_rev);
88 bool has_cycle =
false;
92 has_cycle |=
dfs(g, n,
false, num_rev);
97 fflush(
opts->outFile);
bool graphviz_acyclic(Agraph_t *g, const graphviz_acyclic_options_t *opts, size_t *num_rev)
Agsym_t * agattr(Agraph_t *g, int kind, char *name, const char *value)
creates or looks up attributes of a graph
int agsafeset(void *obj, char *name, const char *value, const char *def)
ensures the given attribute is declared before setting it locally on an object
char * agxget(void *obj, Agsym_t *sym)
int agcopyattr(void *oldobj, void *newobj)
copies all of the attributes from one object to another
Agedge_t * agedge(Agraph_t *g, Agnode_t *t, Agnode_t *h, char *name, int createflag)
Agedge_t * agfstout(Agraph_t *g, Agnode_t *n)
Agedge_t * agnxtout(Agraph_t *g, Agedge_t *e)
int agisstrict(Agraph_t *g)
int agwrite(Agraph_t *g, void *chan)
Return 0 on success, EOF on failure.
Agnode_t * agnxtnode(Agraph_t *g, Agnode_t *n)
Agnode_t * agfstnode(Agraph_t *g)
char * agnameof(void *)
returns a string descriptor for the object.
int agdelete(Agraph_t *g, void *obj)
deletes object. Equivalent to agclose, agdelnode, and agdeledge for obj being a graph,...
void aginit(Agraph_t *g, int kind, const char *rec_name, int rec_size, int move_to_front)
attach new records to objects of specified kind
static void addRevEdge(Agraph_t *g, Agedge_t *e)
static bool dfs(Agraph_t *g, Agnode_t *t, bool hasCycle, size_t *num_rev)
Return true if the graph has a cycle.
implementation of Agrec_t
options for passing to graphviz_acyclic