Graphviz  2.41.20171026.1811
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
cgraph.h File Reference
#include <inttypes.h>
#include "cdt.h"
Include dependency graph for cgraph.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Agrec_s
 
struct  Agtag_s
 
struct  Agobj_s
 
struct  Agsubnode_s
 
struct  Agnode_s
 
struct  Agedge_s
 
struct  Agedgepair_s
 
struct  Agdesc_s
 
struct  Agmemdisc_s
 
struct  Agiddisc_s
 
struct  Agiodisc_s
 
struct  Agdisc_s
 
struct  Agdstate_s
 
struct  Agcbdisc_s
 
struct  Agcbstack_s
 
struct  Agclos_s
 
struct  Agraph_s
 
struct  Agattr_s
 
struct  Agsym_s
 
struct  Agdatadict_s
 

Macros

#define CGRAPH_API   extern
 
#define FALSE   (0)
 
#define TRUE   (!FALSE)
 
#define NOT(x)   (!(x))
 
#define NIL(type)   ((type)0)
 
#define NILgraph   NIL(Agraph_t*)
 
#define NILnode   NIL(Agnode_t*)
 
#define NILedge   NIL(Agedge_t*)
 
#define NILsym   NIL(Agsym_t*)
 
#define AGRAPH   0 /* can't exceed 2 bits. see Agtag_t. */
 
#define AGNODE   1
 
#define AGOUTEDGE   2
 
#define AGINEDGE   3 /* (1 << 1) indicates an edge tag. */
 
#define AGEDGE   AGOUTEDGE /* synonym in object kind args */
 
#define AGTAG(obj)   (((Agobj_t*)(obj))->tag)
 
#define AGTYPE(obj)   (AGTAG(obj).objtype)
 
#define AGID(obj)   (AGTAG(obj).id)
 
#define AGSEQ(obj)   (AGTAG(obj).seq)
 
#define AGATTRWF(obj)   (AGTAG(obj).attrwf)
 
#define AGDATA(obj)   (((Agobj_t*)(obj))->data)
 
#define agnew(g, t)   ((t*)agalloc(g,sizeof(t)))
 
#define agnnew(g, n, t)   ((t*)agalloc(g,(n)*sizeof(t)))
 
#define AGIN2OUT(e)   ((e)-1)
 
#define AGOUT2IN(e)   ((e)+1)
 
#define AGOPP(e)   ((AGTYPE(e)==AGINEDGE)?AGIN2OUT(e):AGOUT2IN(e))
 
#define AGMKOUT(e)   (AGTYPE(e) == AGOUTEDGE? (e): AGIN2OUT(e))
 
#define AGMKIN(e)   (AGTYPE(e) == AGINEDGE? (e): AGOUT2IN(e))
 
#define AGTAIL(e)   (AGMKIN(e)->node)
 
#define AGHEAD(e)   (AGMKOUT(e)->node)
 
#define AGEQEDGE(e, f)   (AGMKOUT(e) == AGMKOUT(f))
 
#define agtail(e)   AGTAIL(e)
 
#define aghead(e)   AGHEAD(e)
 
#define agopp(e)   AGOPP(e)
 
#define ageqedge(e, f)   AGEQEDGE(e,f)
 
#define TAILPORT_ID   "tailport"
 
#define HEADPORT_ID   "headport"
 
#define AGHEADPOINTER(g)   ((Agnoderef_t*)(g->n_seq->data->hh._head))
 
#define AGRIGHTPOINTER(rep)   ((Agnoderef_t*)((rep)->seq_link.right?((void*)((rep)->seq_link.right) - offsetof(Agsubnode_t,seq_link)):0))
 
#define AGLEFTPOINTER(rep)   ((Agnoderef_t*)((rep)->seq_link.hl._left?((void*)((rep)->seq_link.hl._left) - offsetof(Agsubnode_t,seq_link)):0))
 
#define FIRSTNREF(g)   (agflatten(g,1), AGHEADPOINTER(g))
 
#define NEXTNREF(g, rep)   (AGRIGHTPOINTER(rep) == AGHEADPOINTER(g)?0:AGRIGHTPOINTER(rep))
 
#define PREVNREF(g, rep)   (((rep)==AGHEADPOINTER(g))?0:(AGLEFTPOINTER(rep)))
 
#define LASTNREF(g)   (agflatten(g,1), AGHEADPOINTER(g)?AGLEFTPOINTER(AGHEADPOINTER(g)):0)
 
#define NODEOF(rep)   ((rep)->node)
 
#define FIRSTOUTREF(g, sn)   (agflatten(g,1), (sn)->out_seq)
 
#define LASTOUTREF(g, sn)   (agflatten(g,1), (Agedgeref_t*)dtlast(sn->out_seq))
 
#define FIRSTINREF(g, sn)   (agflatten(g,1), (sn)->in_seq)
 
#define NEXTEREF(g, rep)   ((rep)->right)
 
#define PREVEREF(g, rep)   ((rep)->hl._left)
 
#define AGSNMAIN(sn)   ((sn)==(&((sn)->node->mainsub)))
 
#define EDGEOF(sn, rep)   (AGSNMAIN(sn)?((Agedge_t*)((unsigned char*)(rep) - offsetof(Agedge_t,seq_link))) : ((Dthold_t*)(rep))->obj)
 

Typedefs

typedef uint64_t IDTYPE
 
typedef struct Agtag_s Agtag_t
 
typedef struct Agobj_s Agobj_t
 
typedef struct Agraph_s Agraph_t
 
typedef struct Agnode_s Agnode_t
 
typedef struct Agedge_s Agedge_t
 
typedef struct Agdesc_s Agdesc_t
 
typedef struct Agmemdisc_s Agmemdisc_t
 
typedef struct Agiddisc_s Agiddisc_t
 
typedef struct Agiodisc_s Agiodisc_t
 
typedef struct Agdisc_s Agdisc_t
 
typedef struct Agdstate_s Agdstate_t
 
typedef struct Agsym_s Agsym_t
 
typedef struct Agattr_s Agattr_t
 
typedef struct Agcbdisc_s Agcbdisc_t
 
typedef struct Agcbstack_s Agcbstack_t
 
typedef struct Agclos_s Agclos_t
 
typedef struct Agrec_s Agrec_t
 
typedef struct Agdatadict_s Agdatadict_t
 
typedef struct Agedgepair_s Agedgepair_t
 
typedef struct Agsubnode_s Agsubnode_t
 
typedef void(* agobjfn_t )(Agraph_t *g, Agobj_t *obj, void *arg)
 
typedef void(* agobjupdfn_t )(Agraph_t *g, Agobj_t *obj, void *arg, Agsym_t *sym)
 
typedef int(* agusererrf )(char *)
 
typedef Agsubnode_t Agnoderef_t
 
typedef Dtlink_t Agedgeref_t
 

Enumerations

enum  agerrlevel_t { AGWARN, AGERR, AGMAX, AGPREV }
 

Functions

CGRAPH_API void agpushdisc (Agraph_t *g, Agcbdisc_t *disc, void *state)
 
CGRAPH_API int agpopdisc (Agraph_t *g, Agcbdisc_t *disc)
 
CGRAPH_API int agcallbacks (Agraph_t *g, int flag)
 
CGRAPH_API Agraph_tagopen (char *name, Agdesc_t desc, Agdisc_t *disc)
 
CGRAPH_API int agclose (Agraph_t *g)
 
CGRAPH_API Agraph_tagread (void *chan, Agdisc_t *disc)
 
CGRAPH_API Agraph_tagmemread (const char *cp)
 
CGRAPH_API void agreadline (int)
 
CGRAPH_API void agsetfile (char *)
 
CGRAPH_API Agraph_tagconcat (Agraph_t *g, void *chan, Agdisc_t *disc)
 
CGRAPH_API int agwrite (Agraph_t *g, void *chan)
 
CGRAPH_API int agisdirected (Agraph_t *g)
 
CGRAPH_API int agisundirected (Agraph_t *g)
 
CGRAPH_API int agisstrict (Agraph_t *g)
 
CGRAPH_API int agissimple (Agraph_t *g)
 
CGRAPH_API Agnode_tagnode (Agraph_t *g, char *name, int createflag)
 
CGRAPH_API Agnode_tagidnode (Agraph_t *g, IDTYPE id, int createflag)
 
CGRAPH_API Agnode_tagsubnode (Agraph_t *g, Agnode_t *n, int createflag)
 
CGRAPH_API Agnode_tagfstnode (Agraph_t *g)
 
CGRAPH_API Agnode_tagnxtnode (Agraph_t *g, Agnode_t *n)
 
CGRAPH_API Agnode_taglstnode (Agraph_t *g)
 
CGRAPH_API Agnode_tagprvnode (Agraph_t *g, Agnode_t *n)
 
CGRAPH_API Agsubnode_tagsubrep (Agraph_t *g, Agnode_t *n)
 
CGRAPH_API int agnodebefore (Agnode_t *u, Agnode_t *v)
 
CGRAPH_API Agedge_tagedge (Agraph_t *g, Agnode_t *t, Agnode_t *h, char *name, int createflag)
 
CGRAPH_API Agedge_tagidedge (Agraph_t *g, Agnode_t *t, Agnode_t *h, IDTYPE id, int createflag)
 
CGRAPH_API Agedge_tagsubedge (Agraph_t *g, Agedge_t *e, int createflag)
 
CGRAPH_API Agedge_tagfstin (Agraph_t *g, Agnode_t *n)
 
CGRAPH_API Agedge_tagnxtin (Agraph_t *g, Agedge_t *e)
 
CGRAPH_API Agedge_tagfstout (Agraph_t *g, Agnode_t *n)
 
CGRAPH_API Agedge_tagnxtout (Agraph_t *g, Agedge_t *e)
 
CGRAPH_API Agedge_tagfstedge (Agraph_t *g, Agnode_t *n)
 
CGRAPH_API Agedge_tagnxtedge (Agraph_t *g, Agedge_t *e, Agnode_t *n)
 
CGRAPH_API Agraph_tagraphof (void *obj)
 
CGRAPH_API Agraph_tagroot (void *obj)
 
CGRAPH_API int agcontains (Agraph_t *, void *)
 
CGRAPH_API char * agnameof (void *)
 
CGRAPH_API int agrelabel (void *obj, char *name)
 
CGRAPH_API int agrelabel_node (Agnode_t *n, char *newname)
 
CGRAPH_API int agdelete (Agraph_t *g, void *obj)
 
CGRAPH_API long agdelsubg (Agraph_t *g, Agraph_t *sub)
 
CGRAPH_API int agdelnode (Agraph_t *g, Agnode_t *arg_n)
 
CGRAPH_API int agdeledge (Agraph_t *g, Agedge_t *arg_e)
 
CGRAPH_API int agobjkind (void *)
 
CGRAPH_API char * agstrdup (Agraph_t *, char *)
 
CGRAPH_API char * agstrdup_html (Agraph_t *, char *)
 
CGRAPH_API int aghtmlstr (char *)
 
CGRAPH_API char * agstrbind (Agraph_t *g, char *)
 
CGRAPH_API int agstrfree (Agraph_t *, char *)
 
CGRAPH_API char * agcanon (char *, int)
 
CGRAPH_API char * agstrcanon (char *, char *)
 
CGRAPH_API char * agcanonStr (char *str)
 
CGRAPH_API Agsym_tagattr (Agraph_t *g, int kind, char *name, char *value)
 
CGRAPH_API Agsym_tagattrsym (void *obj, char *name)
 
CGRAPH_API Agsym_tagnxtattr (Agraph_t *g, int kind, Agsym_t *attr)
 
CGRAPH_API int agcopyattr (void *oldobj, void *newobj)
 
CGRAPH_API void * agbindrec (void *obj, char *name, unsigned int size, int move_to_front)
 
CGRAPH_API Agrec_taggetrec (void *obj, char *name, int move_to_front)
 
CGRAPH_API int agdelrec (void *obj, char *name)
 
CGRAPH_API void aginit (Agraph_t *g, int kind, char *rec_name, int rec_size, int move_to_front)
 
CGRAPH_API void agclean (Agraph_t *g, int kind, char *rec_name)
 
CGRAPH_API char * agget (void *obj, char *name)
 
CGRAPH_API char * agxget (void *obj, Agsym_t *sym)
 
CGRAPH_API int agset (void *obj, char *name, char *value)
 
CGRAPH_API int agxset (void *obj, Agsym_t *sym, char *value)
 
CGRAPH_API int agsafeset (void *obj, char *name, char *value, char *def)
 
CGRAPH_API Agraph_tagsubg (Agraph_t *g, char *name, int cflag)
 
CGRAPH_API Agraph_tagidsubg (Agraph_t *g, IDTYPE id, int cflag)
 
CGRAPH_API Agraph_tagfstsubg (Agraph_t *g)
 
CGRAPH_API Agraph_tagnxtsubg (Agraph_t *subg)
 
CGRAPH_API Agraph_tagparent (Agraph_t *g)
 
CGRAPH_API int agnnodes (Agraph_t *g)
 
CGRAPH_API int agnedges (Agraph_t *g)
 
CGRAPH_API int agnsubg (Agraph_t *g)
 
CGRAPH_API int agdegree (Agraph_t *g, Agnode_t *n, int in, int out)
 
CGRAPH_API int agcountuniqedges (Agraph_t *g, Agnode_t *n, int in, int out)
 
CGRAPH_API void * agalloc (Agraph_t *g, size_t size)
 
CGRAPH_API void * agrealloc (Agraph_t *g, void *ptr, size_t oldsize, size_t size)
 
CGRAPH_API void agfree (Agraph_t *g, void *ptr)
 
CGRAPH_API struct _vmalloc_sagheap (Agraph_t *g)
 
CGRAPH_API void aginternalmapclearlocalnames (Agraph_t *g)
 
CGRAPH_API agerrlevel_t agseterr (agerrlevel_t)
 
CGRAPH_API char * aglasterr (void)
 
CGRAPH_API int agerr (agerrlevel_t level, const char *fmt,...)
 
CGRAPH_API void agerrorf (const char *fmt,...)
 
CGRAPH_API void agwarningf (const char *fmt,...)
 
CGRAPH_API int agerrors (void)
 
CGRAPH_API int agreseterrors (void)
 
CGRAPH_API agusererrf agseterrf (agusererrf)
 
void agflatten (Agraph_t *g, int flag)
 

Variables

CGRAPH_API Agmemdisc_t AgMemDisc
 
CGRAPH_API Agiddisc_t AgIdDisc
 
CGRAPH_API Agiodisc_t AgIoDisc
 
CGRAPH_API Agdisc_t AgDefaultDisc
 
CGRAPH_API Agdesc_t Agdirected
 
CGRAPH_API Agdesc_t Agstrictdirected
 
CGRAPH_API Agdesc_t Agundirected
 
CGRAPH_API Agdesc_t Agstrictundirected
 

Macro Definition Documentation

#define AGATTRWF (   obj)    (AGTAG(obj).attrwf)

Definition at line 116 of file cgraph.h.

#define AGDATA (   obj)    (((Agobj_t*)(obj))->data)

Definition at line 117 of file cgraph.h.

Referenced by compute_bb(), einf(), ginf(), and ninf().

#define AGEDGE   AGOUTEDGE /* synonym in object kind args */
#define AGEQEDGE (   e,
 
)    (AGMKOUT(e) == AGMKOUT(f))

Definition at line 408 of file cgraph.h.

Referenced by ageqedge().

#define ageqedge (   e,
 
)    AGEQEDGE(e,f)

Definition at line 413 of file cgraph.h.

#define AGHEAD (   e)    (AGMKOUT(e)->node)

Definition at line 407 of file cgraph.h.

Referenced by aghead(), agnxtin(), agsplice(), and agsubedge().

#define aghead (   e)    AGHEAD(e)

Definition at line 411 of file cgraph.h.

#define AGHEADPOINTER (   g)    ((Agnoderef_t*)(g->n_seq->data->hh._head))

Definition at line 428 of file cgraph.h.

#define AGID (   obj)    (AGTAG(obj).id)
#define AGIN2OUT (   e)    ((e)-1)

Definition at line 401 of file cgraph.h.

Referenced by agdeledgeimage().

#define AGINEDGE   3 /* (1 << 1) indicates an edge tag. */
#define AGLEFTPOINTER (   rep)    ((Agnoderef_t*)((rep)->seq_link.hl._left?((void*)((rep)->seq_link.hl._left) - offsetof(Agsubnode_t,seq_link)):0))

Definition at line 430 of file cgraph.h.

#define AGMKIN (   e)    (AGTYPE(e) == AGINEDGE? (e): AGOUT2IN(e))

Definition at line 405 of file cgraph.h.

Referenced by agmkin(), and nexttail().

#define AGMKOUT (   e)    (AGTYPE(e) == AGOUTEDGE? (e): AGIN2OUT(e))

Definition at line 404 of file cgraph.h.

Referenced by agdeledge(), agmkout(), interclexp(), and nexthead().

#define agnew (   g,
 
)    ((t*)agalloc(g,sizeof(t)))

Definition at line 384 of file cgraph.h.

#define agnnew (   g,
  n,
 
)    ((t*)agalloc(g,(n)*sizeof(t)))

Definition at line 385 of file cgraph.h.

#define AGNODE   1
#define AGOPP (   e)    ((AGTYPE(e)==AGINEDGE)?AGIN2OUT(e):AGOUT2IN(e))

Definition at line 403 of file cgraph.h.

Referenced by agexpose(), aghide(), agopp(), and agsubedge().

#define agopp (   e)    AGOPP(e)

Definition at line 412 of file cgraph.h.

#define AGOUT2IN (   e)    ((e)+1)

Definition at line 402 of file cgraph.h.

Referenced by agdeledgeimage().

#define AGOUTEDGE   2
#define AGRAPH   0 /* can't exceed 2 bits. see Agtag_t. */
#define AGRIGHTPOINTER (   rep)    ((Agnoderef_t*)((rep)->seq_link.right?((void*)((rep)->seq_link.right) - offsetof(Agsubnode_t,seq_link)):0))

Definition at line 429 of file cgraph.h.

#define AGSEQ (   obj)    (AGTAG(obj).seq)
#define AGSNMAIN (   sn)    ((sn)==(&((sn)->node->mainsub)))

Definition at line 448 of file cgraph.h.

#define AGTAG (   obj)    (((Agobj_t*)(obj))->tag)

Definition at line 112 of file cgraph.h.

Referenced by agdeledge(), and agsubedge().

#define AGTAIL (   e)    (AGMKIN(e)->node)

Definition at line 406 of file cgraph.h.

Referenced by agnxtout(), agsplice(), agsubedge(), and agtail().

#define agtail (   e)    AGTAIL(e)

Definition at line 410 of file cgraph.h.

#define AGTYPE (   obj)    (AGTAG(obj).objtype)
#define CGRAPH_API   extern

Definition at line 31 of file cgraph.h.

#define EDGEOF (   sn,
  rep 
)    (AGSNMAIN(sn)?((Agedge_t*)((unsigned char*)(rep) - offsetof(Agedge_t,seq_link))) : ((Dthold_t*)(rep))->obj)

Definition at line 449 of file cgraph.h.

#define FALSE   (0)

Definition at line 35 of file cgraph.h.

Referenced by acyclic(), agassociate(), agattrrec(), agbindrec(), agcallbacks(), agcmpgraph_of(), agcmpnode_of(), agdatadict(), agdeledge(), agdelnode(), agdelrec(), agdictof(), agedge(), agexpose(), agfindhidden(), agfindnode_by_name(), agflatten(), aghide(), aginternalmapdelete(), aginternalmaplookup(), agnedges(), agnode(), agnodebefore(), agraphattr_delete(), agrecord_callback(), agrelabel_node(), agrename(), agsubg(), agwrite(), agxset(), arrowStartClip(), attached_clustering(), beginpath(), bezier_clip(), build_ranks(), call_tri(), call_tri2(), cat_libfile(), cccomps(), class2(), clip_and_install(), common_init_edge(), compoundEdges(), create_window1(), deQueue(), dijkstra_bounded(), dot_concentrate(), emit_clusters(), emit_once(), endpath(), enQueue(), enqueue_neighbors(), findStopColor(), flat_edges(), get_distance_matrix(), graphcmd(), gvconfig(), gvContext(), gvContextPlugins(), gvdevice_finalize(), gvjobs_output_langname(), gvplugin_list(), gvtextlayout(), gvusershape_file_access(), ideal_distance_matrix(), Import_coord_clusters_from_dot(), in_poly(), init_nop(), interclexp(), main(), make_html_label(), makeDotGraph(), makePortLabels(), mapbool(), mapBool(), mergeable(), modularity_clustering(), mq_clustering(), Multilevel_MQ_Clustering_init(), Multilevel_MQ_Clustering_new(), Multilevel_new(), neato_layout(), neato_set_aspect(), new_spline(), node_in_subg(), nonconstraint_edge(), on_button1_button_press_event(), on_drawingarea1_button_press_event(), on_drawingarea1_button_release_event(), on_drawingarea1_configure_event(), on_drawingarea1_expose_event(), on_drawingarea1_motion_notify_event(), on_drawingarea1_scroll_event(), on_drawingarea2_expose_event(), on_drawingarea2_motion_notify_event(), on_window1_delete_event(), Operator_matmul_apply(), Operator_uniform_stress_matmul_apply(), overlap_edge(), overlap_node(), parse_style(), pccomps(), portcmp(), ports_eq(), post_process_smoothing(), power_law_graph(), processClusterEdges(), QuadTree_get_nearest(), round_corners(), safefile(), SparseMatrix_connectedQ(), SparseMatrix_distance_matrix(), SparseMatrix_distance_matrix_k_centers(), SparseMatrix_distance_matrix_khops(), SparseMatrix_has_diagonal(), SparseMatrix_import_dot(), SparseMatrix_is_symmetric(), SparseMatrix_k_centers(), SparseMatrix_k_centers_user(), SparseMatrix_make_undirected(), SparseMatrix_page_rank(), SparseMatrix_pseudo_diameter_only(), SparseMatrix_pseudo_diameter_unweighted(), SparseMatrix_pseudo_diameter_weighted(), SparseMatrix_to_square_matrix(), SparseMatrix_weakly_connected_components(), SparseStressMajorizationSmoother_new(), spring_electrical_control_new(), spring_electrical_embedding(), spring_electrical_embedding_slow(), spring_electrical_spring_embedding(), spring_maxent_embedding(), SpringSmoother_new(), stress_majorization_kD_mkernel(), stress_model_core(), StressMajorizationSmoother2_new(), StressMajorizationSmoother_smooth(), strip_dir(), taper(), TriangleSmoother_new(), UG_graph(), uniform_stress(), UniformStressSmoother_new(), user_pos(), and xml_string().

#define FIRSTINREF (   g,
  sn 
)    (agflatten(g,1), (sn)->in_seq)

Definition at line 443 of file cgraph.h.

#define FIRSTNREF (   g)    (agflatten(g,1), AGHEADPOINTER(g))

Definition at line 432 of file cgraph.h.

Referenced by main().

#define FIRSTOUTREF (   g,
  sn 
)    (agflatten(g,1), (sn)->out_seq)

Definition at line 441 of file cgraph.h.

#define HEADPORT_ID   "headport"

Definition at line 416 of file cgraph.h.

#define LASTNREF (   g)    (agflatten(g,1), AGHEADPOINTER(g)?AGLEFTPOINTER(AGHEADPOINTER(g)):0)

Definition at line 438 of file cgraph.h.

#define LASTOUTREF (   g,
  sn 
)    (agflatten(g,1), (Agedgeref_t*)dtlast(sn->out_seq))

Definition at line 442 of file cgraph.h.

#define NEXTEREF (   g,
  rep 
)    ((rep)->right)

Definition at line 444 of file cgraph.h.

#define NEXTNREF (   g,
  rep 
)    (AGRIGHTPOINTER(rep) == AGHEADPOINTER(g)?0:AGRIGHTPOINTER(rep))

Definition at line 434 of file cgraph.h.

Referenced by main().

#define NIL (   type)    ((type)0)

Definition at line 44 of file cgraph.h.

#define NILedge   NIL(Agedge_t*)

Definition at line 48 of file cgraph.h.

#define NILgraph   NIL(Agraph_t*)

Definition at line 46 of file cgraph.h.

#define NILnode   NIL(Agnode_t*)

Definition at line 47 of file cgraph.h.

#define NILsym   NIL(Agsym_t*)

Definition at line 49 of file cgraph.h.

#define NODEOF (   rep)    ((rep)->node)

Definition at line 439 of file cgraph.h.

Referenced by main().

#define NOT (   x)    (!(x))

Definition at line 41 of file cgraph.h.

Referenced by agcallbacks(), agcmpgraph_of(), agedge(), agexpose(), and agisundirected().

#define PREVEREF (   g,
  rep 
)    ((rep)->hl._left)

Definition at line 445 of file cgraph.h.

#define PREVNREF (   g,
  rep 
)    (((rep)==AGHEADPOINTER(g))?0:(AGLEFTPOINTER(rep)))

Definition at line 436 of file cgraph.h.

#define TAILPORT_ID   "tailport"

Definition at line 415 of file cgraph.h.

#define TRUE   (!FALSE)

Definition at line 38 of file cgraph.h.

Referenced by addEdgeLabels(), agbindrec(), agcallbacks(), agclean(), agcmpnode(), agedge(), agflatten(), aghide(), agidnode(), aginternalmapdelete(), aginternalmaplookup(), agnedges(), agnode(), agopen(), agrelabel_node(), agrename(), agsplice(), agsubg(), agwrite(), arrowEndClip(), attached_clustering(), average_edge_length(), beginpath(), bezier_clip(), build_ranks(), cat_libfile(), ccomps(), circomps(), class2(), clip_and_install(), common_init_edge(), create_window1(), deQueue(), dijkstra_bounded(), dot_mincross(), dotneato_args_initialize(), emit_clusters(), emit_once(), endpath(), enQueue(), enqueue_neighbors(), fdp_init_node_edge(), findCComp(), findStopColor(), flat_edge(), flat_edges(), graph_init(), graphcmd(), gvconfig(), gvContext(), gvdevice_finalize(), gvFreeLayout(), gvjobs_output_langname(), gvLayoutJobs(), gvplugin_install(), gvplugin_list(), gvprintpointflist(), gvRenderContext(), gvToolTred(), gvusershape_file_access(), Import_coord_clusters_from_dot(), in_poly(), initDotIO(), initMapData(), iterativePCA_1D(), main(), make_label(), makeDotGraph(), makeGraphs(), makePortLabels(), mapBool(), mergeable(), Multilevel_control_new(), Multilevel_MQ_Clustering_new(), Multilevel_new(), ncross(), neato_init_node(), neato_layout(), node_in_subg(), nonconstraint_edge(), on_drawingarea1_configure_event(), on_drawingarea1_expose_event(), on_drawingarea2_expose_event(), osage_layout(), overlap_edge(), parse_style(), PCA_alloc(), pccomps(), place_graph_label(), place_portlabel(), Pobspath(), post_process_smoothing(), power_law_graph(), processClusterEdges(), QuadTree_get_nearest(), safefile(), sizeArray(), SparseMatrix_complement(), SparseMatrix_connectedQ(), SparseMatrix_distance_matrix(), SparseMatrix_distance_matrix_khops(), SparseMatrix_get_real_adjacency_matrix_symmetrized(), SparseMatrix_has_diagonal(), SparseMatrix_import_dot(), SparseMatrix_is_symmetric(), SparseMatrix_k_centers(), SparseMatrix_k_centers_user(), SparseMatrix_pseudo_diameter_unweighted(), SparseMatrix_pseudo_diameter_weighted(), SparseMatrix_read_dot(), SparseMatrix_to_square_matrix(), SparseMatrix_weakly_connected_components(), spline_edges(), spring_electrical_control_new(), spring_electrical_embedding(), spring_electrical_embedding_fast(), spring_electrical_embedding_slow(), spring_electrical_spring_embedding(), spring_maxent_embedding(), stress_model_core(), StringVector_part(), strip_dir(), taper(), UG_graph(), undoClusterEdges(), uniform_stress(), user_pos(), vector_median(), and vector_percentile().

Typedef Documentation

typedef struct Agattr_s Agattr_t

Definition at line 66 of file cgraph.h.

typedef struct Agcbdisc_s Agcbdisc_t

Definition at line 67 of file cgraph.h.

typedef struct Agcbstack_s Agcbstack_t

Definition at line 68 of file cgraph.h.

typedef struct Agclos_s Agclos_t

Definition at line 69 of file cgraph.h.

typedef struct Agdatadict_s Agdatadict_t

Definition at line 71 of file cgraph.h.

typedef struct Agdesc_s Agdesc_t

Definition at line 59 of file cgraph.h.

typedef struct Agdisc_s Agdisc_t

Definition at line 63 of file cgraph.h.

typedef struct Agdstate_s Agdstate_t

Definition at line 64 of file cgraph.h.

typedef struct Agedge_s Agedge_t

Definition at line 58 of file cgraph.h.

typedef struct Agedgepair_s Agedgepair_t

Definition at line 72 of file cgraph.h.

Definition at line 426 of file cgraph.h.

typedef struct Agiddisc_s Agiddisc_t

Definition at line 61 of file cgraph.h.

typedef struct Agiodisc_s Agiodisc_t

Definition at line 62 of file cgraph.h.

typedef struct Agmemdisc_s Agmemdisc_t

Definition at line 60 of file cgraph.h.

typedef struct Agnode_s Agnode_t

Definition at line 57 of file cgraph.h.

Definition at line 425 of file cgraph.h.

typedef struct Agobj_s Agobj_t

Definition at line 55 of file cgraph.h.

typedef void(* agobjfn_t)(Agraph_t *g, Agobj_t *obj, void *arg)

Definition at line 210 of file cgraph.h.

typedef void(* agobjupdfn_t)(Agraph_t *g, Agobj_t *obj, void *arg, Agsym_t *sym)

Definition at line 211 of file cgraph.h.

typedef struct Agraph_s Agraph_t

Definition at line 56 of file cgraph.h.

typedef struct Agrec_s Agrec_t

Definition at line 70 of file cgraph.h.

typedef struct Agsubnode_s Agsubnode_t

Definition at line 73 of file cgraph.h.

typedef struct Agsym_s Agsym_t

Definition at line 65 of file cgraph.h.

typedef struct Agtag_s Agtag_t

Definition at line 54 of file cgraph.h.

typedef int(* agusererrf)(char *)

Definition at line 389 of file cgraph.h.

typedef uint64_t IDTYPE

Definition at line 51 of file cgraph.h.

Enumeration Type Documentation

Enumerator
AGWARN 
AGERR 
AGMAX 
AGPREV 

Definition at line 388 of file cgraph.h.

Function Documentation

CGRAPH_API void* agalloc ( Agraph_t g,
size_t  size 
)

Definition at line 62 of file mem.c.

References AGCLOS, AGDISC, agerr(), AGERR, and NIL.

Referenced by agbindrec(), agdictobjmem(), agnewsym(), agrealloc(), agstrdup(), and agstrdup_html().

CGRAPH_API Agsym_t* agattr ( Agraph_t g,
int  kind,
char *  name,
char *  value 
)
CGRAPH_API Agsym_t* agattrsym ( void *  obj,
char *  name 
)

Definition at line 153 of file attr.c.

References agattrrec(), agdictsym(), Agattr_s::dict, and NILsym.

Referenced by agcopyattr(), agget(), and agset().

CGRAPH_API void* agbindrec ( void *  obj,
char *  name,
unsigned int  size,
int  move_to_front 
)
CGRAPH_API int agcallbacks ( Agraph_t g,
int  flag 
)

Definition at line 286 of file pend.c.

References Agclos_s::callbacks_enabled, Agraph_s::clos, FALSE, NOT, and TRUE.

Referenced by main().

CGRAPH_API char* agcanon ( char *  ,
int   
)

Definition at line 217 of file write.c.

CGRAPH_API char* agcanonStr ( char *  str)

Definition at line 207 of file write.c.

References agstrcanon().

Referenced by write_plain().

CGRAPH_API void agclean ( Agraph_t g,
int  kind,
char *  rec_name 
)
CGRAPH_API int agclose ( Agraph_t g)
CGRAPH_API Agraph_t* agconcat ( Agraph_t g,
void *  chan,
Agdisc_t disc 
)

Definition at line 2337 of file grammar.c.

References aagparse(), Ag_G_global, AgDefaultDisc, aglexbad(), aglexinit(), NILgraph, and yyparse().

Referenced by agread().

CGRAPH_API int agcontains ( Agraph_t ,
void *   
)

Definition at line 245 of file obj.c.

References AGID, agidnode(), AGNODE, agparent(), AGRAPH, agroot(), agsubedge(), and AGTYPE.

Referenced by interclexp(), and twopi_layout().

CGRAPH_API int agcopyattr ( void *  oldobj,
void *  newobj 
)
CGRAPH_API int agcountuniqedges ( Agraph_t g,
Agnode_t n,
int  in,
int  out 
)
CGRAPH_API int agdegree ( Agraph_t g,
Agnode_t n,
int  in,
int  out 
)

Definition at line 229 of file graph.c.

References agsubrep(), Agraph_s::e_seq, Agsubnode_s::in_seq, and Agsubnode_s::out_seq.

Referenced by agnedges().

CGRAPH_API int agdeledge ( Agraph_t g,
Agedge_t arg_e 
)
CGRAPH_API int agdelete ( Agraph_t g,
void *  obj 
)
CGRAPH_API int agdelnode ( Agraph_t g,
Agnode_t arg_n 
)
CGRAPH_API int agdelrec ( void *  obj,
char *  name 
)
CGRAPH_API long agdelsubg ( Agraph_t g,
Agraph_t sub 
)

Definition at line 93 of file subg.c.

References dtdelete, and Agraph_s::g_dict.

Referenced by agclose(), aghide(), and deleteGraph().

CGRAPH_API Agedge_t* agedge ( Agraph_t g,
Agnode_t t,
Agnode_t h,
char *  name,
int  createflag 
)
CGRAPH_API int agerr ( agerrlevel_t  level,
const char *  fmt,
  ... 
)
CGRAPH_API void agerrorf ( const char *  fmt,
  ... 
)

Definition at line 152 of file agerror.c.

References AGERR.

Referenced by gvNEWcontext(), gvRender(), gvRenderContext(), gvRenderData(), and gvRenderFilename().

CGRAPH_API int agerrors ( void  )

Definition at line 170 of file agerror.c.

Referenced by gvFreeContext().

void agflatten ( Agraph_t g,
int  flag 
)
CGRAPH_API void agfree ( Agraph_t g,
void *  ptr 
)
CGRAPH_API Agedge_t* agfstedge ( Agraph_t g,
Agnode_t n 
)
CGRAPH_API Agedge_t* agfstin ( Agraph_t g,
Agnode_t n 
)
CGRAPH_API Agnode_t* agfstnode ( Agraph_t g)

Definition at line 38 of file node.c.

References dtfirst, Agraph_s::n_seq, NILnode, and Agsubnode_s::node.

Referenced by agclean(), agclose(), agexpose(), agflatten(), aghide(), aginit(), agnedges(), allocate_ranks(), assign_random_edge_color(), attach_attrs_and_arrows(), attach_edge_colors(), attached_clustering(), build_skeleton(), cAdjust(), cccomps(), ccomps(), circleLayout(), circo_cleanup(), circo_layout(), circomps(), circuit_model(), circularLayout(), class1(), class2(), compoundEdges(), compute_bb(), convert_edge_labels_to_nodes(), countDummyNodes(), createBlocktree(), decompose(), dot_cleanup(), dot_compoundEdges(), dot_init_node_edge(), dot_sameports(), dot_scan_ranks(), Dot_SetClusterColor(), dumpstat(), emit_clusters(), emit_graph(), fdp_cleanup(), fdp_init_node_edge(), fdp_layout(), fdp_tLayout(), findCComp(), firstin(), firstnode(), firstout(), getSizes(), graphcmd(), gvToolTred(), Import_coord_clusters_from_dot(), Import_dot_splines(), init_nop(), init_UF_size(), initEdgeTypes(), interclexp(), isConnected(), main(), makeDotGraph(), makeMatrix(), mark_clusters(), mark_lowclusters(), neato_cleanup(), neato_set_aspect(), neato_translate(), node_induce(), normalize(), osage_cleanup(), osage_layout(), patchwork_cleanup(), pccomps(), processClusterEdges(), rank3(), scAdjust(), scan_graph_mode(), sfdp_cleanup(), shiftGraphs(), shortest_path(), SparseMatrix_import_dot(), spline_edges(), splineEdges(), twopi_cleanup(), twopi_layout(), undoClusterEdges(), and write_plain().

CGRAPH_API Agedge_t* agfstout ( Agraph_t g,
Agnode_t n 
)
CGRAPH_API Agraph_t* agfstsubg ( Agraph_t g)
CGRAPH_API char* agget ( void *  obj,
char *  name 
)
CGRAPH_API Agrec_t* aggetrec ( void *  obj,
char *  name,
int  move_to_front 
)
CGRAPH_API struct _vmalloc_s* agheap ( Agraph_t g)

Definition at line 100 of file mem.c.

References AGCLOS.

CGRAPH_API int aghtmlstr ( char *  )

Definition at line 178 of file refstr.c.

References NULL, and refstr_t::refcnt.

Referenced by agcopyattr(), agstrcanon(), common_init_edge(), common_init_node(), and do_graph_label().

CGRAPH_API Agedge_t* agidedge ( Agraph_t g,
Agnode_t t,
Agnode_t h,
IDTYPE  id,
int  createflag 
)

Definition at line 259 of file edge.c.

References agallocid(), AGEDGE, agisundirected(), agroot(), and NILedge.

CGRAPH_API Agnode_t* agidnode ( Agraph_t g,
IDTYPE  id,
int  createflag 
)

Definition at line 119 of file node.c.

References agallocid(), agfindnode_by_id(), agnextseq(), AGNODE, agroot(), agsubnode(), NILnode, and TRUE.

Referenced by agcontains().

CGRAPH_API Agraph_t* agidsubg ( Agraph_t g,
IDTYPE  id,
int  cflag 
)

Definition at line 43 of file subg.c.

References agallocid(), AGRAPH, and NILgraph.

Referenced by agrename().

CGRAPH_API void aginit ( Agraph_t g,
int  kind,
char *  rec_name,
int  rec_size,
int  move_to_front 
)
CGRAPH_API void aginternalmapclearlocalnames ( Agraph_t g)
CGRAPH_API int agisdirected ( Agraph_t g)

Definition at line 182 of file graph.c.

References Agraph_s::desc, and Agdesc_s::directed.

Referenced by agisundirected(), arrow_flags(), edgecmd(), gvToolTred(), make_label(), and tcldot_layout().

CGRAPH_API int agissimple ( Agraph_t g)

Definition at line 197 of file graph.c.

References Agraph_s::desc, Agdesc_s::no_loop, and Agdesc_s::strict.

CGRAPH_API int agisstrict ( Agraph_t g)

Definition at line 192 of file graph.c.

References Agraph_s::desc, and Agdesc_s::strict.

Referenced by agedge().

CGRAPH_API int agisundirected ( Agraph_t g)

Definition at line 187 of file graph.c.

References agisdirected(), and NOT.

Referenced by agedge(), and agidedge().

CGRAPH_API char* aglasterr ( void  )

Definition at line 41 of file agerror.c.

CGRAPH_API Agnode_t* aglstnode ( Agraph_t g)

Definition at line 53 of file node.c.

References dtlast, Agraph_s::n_seq, NILnode, and Agsubnode_s::node.

Referenced by graphcmd().

CGRAPH_API Agraph_t* agmemread ( const char *  cp)
CGRAPH_API char* agnameof ( void *  )
CGRAPH_API int agnedges ( Agraph_t g)
CGRAPH_API int agnnodes ( Agraph_t g)
CGRAPH_API Agnode_t* agnode ( Agraph_t g,
char *  name,
int  createflag 
)
CGRAPH_API int agnodebefore ( Agnode_t u,
Agnode_t v 
)
CGRAPH_API int agnsubg ( Agraph_t g)

Definition at line 177 of file graph.c.

References dtsize(), and Agraph_s::g_dict.

CGRAPH_API Agsym_t* agnxtattr ( Agraph_t g,
int  kind,
Agsym_t attr 
)

Definition at line 340 of file attr.c.

References agdictof(), dtfirst, and dtnext.

Referenced by agcopyattr(), firstattr(), listEdgeAttrs(), listGraphAttrs(), listNodeAttrs(), main(), and nextattr().

CGRAPH_API Agedge_t* agnxtedge ( Agraph_t g,
Agedge_t e,
Agnode_t n 
)
CGRAPH_API Agedge_t* agnxtin ( Agraph_t g,
Agedge_t e 
)
CGRAPH_API Agnode_t* agnxtnode ( Agraph_t g,
Agnode_t n 
)
CGRAPH_API Agedge_t* agnxtout ( Agraph_t g,
Agedge_t e 
)
CGRAPH_API Agraph_t* agnxtsubg ( Agraph_t subg)
CGRAPH_API int agobjkind ( void *  )

Definition at line 264 of file obj.c.

References AGTYPE.

Referenced by getObjId(), make_html_label(), make_label(), and setAttr().

CGRAPH_API Agraph_t* agopen ( char *  name,
Agdesc_t  desc,
Agdisc_t disc 
)
CGRAPH_API Agraph_t* agparent ( Agraph_t g)
CGRAPH_API int agpopdisc ( Agraph_t g,
Agcbdisc_t disc 
)

Definition at line 213 of file obj.c.

References agfree(), Agclos_s::cb, Agraph_s::clos, Agcbstack_s::f, FAILURE, Agcbstack_s::prev, and SUCCESS.

Referenced by agclose().

CGRAPH_API Agnode_t* agprvnode ( Agraph_t g,
Agnode_t n 
)

Definition at line 60 of file node.c.

References agsubrep(), dtprev, Agraph_s::n_seq, NILnode, and Agsubnode_s::node.

Referenced by agnodebefore(), and graphcmd().

CGRAPH_API void agpushdisc ( Agraph_t g,
Agcbdisc_t disc,
void *  state 
)

Definition at line 202 of file obj.c.

References AGNEW, Agclos_s::cb, Agraph_s::clos, Agcbstack_s::f, Agcbstack_s::prev, and Agcbstack_s::state.

Referenced by main().

CGRAPH_API Agraph_t* agraphof ( void *  obj)
CGRAPH_API Agraph_t* agread ( void *  chan,
Agdisc_t disc 
)

Definition at line 2349 of file grammar.c.

References agconcat(), and NILgraph.

Referenced by agmemread(), gvNextInputGraph(), main(), read(), and SparseMatrix_read_dot().

CGRAPH_API void agreadline ( int  )

Definition at line 569 of file scan.c.

CGRAPH_API void* agrealloc ( Agraph_t g,
void *  ptr,
size_t  oldsize,
size_t  size 
)

Definition at line 72 of file mem.c.

References agalloc(), AGCLOS, AGDISC, agerr(), AGERR, and NIL.

CGRAPH_API int agrelabel ( void *  obj,
char *  name 
)
CGRAPH_API int agrelabel_node ( Agnode_t n,
char *  newname 
)
CGRAPH_API int agreseterrors ( void  )

Definition at line 172 of file agerror.c.

Referenced by main().

CGRAPH_API Agraph_t* agroot ( void *  obj)
CGRAPH_API int agsafeset ( void *  obj,
char *  name,
char *  value,
char *  def 
)

Definition at line 497 of file attr.c.

References agattr(), agraphof(), AGTYPE, and agxset().

Referenced by gvLayout().

CGRAPH_API int agset ( void *  obj,
char *  name,
char *  value 
)

Definition at line 455 of file attr.c.

References agattrsym(), agxset(), FAILURE, and NILsym.

Referenced by attach_attrs_and_arrows(), convert_edge_labels_to_nodes(), setSeed(), and twopi_layout().

Definition at line 34 of file agerror.c.

Referenced by dotneato_args_initialize().

CGRAPH_API agusererrf agseterrf ( agusererrf  )

Definition at line 27 of file agerror.c.

CGRAPH_API void agsetfile ( char *  )

Definition at line 573 of file scan.c.

Referenced by agmemread(), and gvNextInputGraph().

CGRAPH_API char* agstrbind ( Agraph_t g,
char *   
)

Definition at line 92 of file refstr.c.

Referenced by aginternalmaplookup().

CGRAPH_API char* agstrcanon ( char *  ,
char *   
)

Definition at line 177 of file write.c.

References aghtmlstr().

Referenced by agcanonStr().

CGRAPH_API char* agstrdup ( Agraph_t ,
char *   
)

Definition at line 97 of file refstr.c.

References agalloc(), dtinsert, NIL, refstr_t::refcnt, refstr_t::s, and refstr_t::store.

Referenced by agbindrec(), aginternalmapinsert(), agnewsym(), agxset(), and while().

CGRAPH_API char* agstrdup_html ( Agraph_t ,
char *   
)

Definition at line 123 of file refstr.c.

References agalloc(), dtinsert, NIL, refstr_t::refcnt, refstr_t::s, and refstr_t::store.

CGRAPH_API int agstrfree ( Agraph_t ,
char *   
)

Definition at line 149 of file refstr.c.

References agdtdelete(), FAILURE, NIL, refstr_t::refcnt, refstr_t::s, and SUCCESS.

Referenced by agdelrec(), aginternalmapdelete(), agrecclose(), and agxset().

CGRAPH_API Agedge_t* agsubedge ( Agraph_t g,
Agedge_t e,
int  createflag 
)

Definition at line 378 of file edge.c.

References AGHEAD, AGID, AGOPP, agsubnode(), AGTAG, AGTAIL, AGTYPE, and NILedge.

Referenced by agcontains(), aghide(), circomps(), and node_induce().

CGRAPH_API Agraph_t* agsubg ( Agraph_t g,
char *  name,
int  cflag 
)
CGRAPH_API Agnode_t* agsubnode ( Agraph_t g,
Agnode_t n,
int  createflag 
)
CGRAPH_API Agsubnode_t* agsubrep ( Agraph_t g,
Agnode_t n 
)
CGRAPH_API void agwarningf ( const char *  fmt,
  ... 
)

Definition at line 161 of file agerror.c.

References AGWARN.

CGRAPH_API int agwrite ( Agraph_t g,
void *  chan 
)

Definition at line 678 of file write.c.

References AGDISC, agget(), CHKRV, FALSE, int, MAX_OUTPUTLINE, MIN_OUTPUTLINE, NULL, and TRUE.

Referenced by main(), scndump(), and write().

CGRAPH_API char* agxget ( void *  obj,
Agsym_t sym 
)
CGRAPH_API int agxset ( void *  obj,
Agsym_t sym,
char *  value 
)

Variable Documentation

CGRAPH_API Agdisc_t AgDefaultDisc

Definition at line 201 of file cgraph.h.

Referenced by agconcat().

CGRAPH_API Agdesc_t Agdirected

Definition at line 418 of file cgraph.h.

Referenced by digraph(), gvplugin_graph(), main(), and makeDotGraph().

Definition at line 198 of file cgraph.h.

Referenced by agmemread().

Definition at line 199 of file cgraph.h.

Referenced by Tcldot_Init().

Definition at line 197 of file cgraph.h.

Referenced by agmemread(), and Tcldot_Init().

CGRAPH_API Agdesc_t Agstrictdirected

Definition at line 419 of file cgraph.h.

Referenced by checkLabelOrder(), sizeArray(), and strictdigraph().

CGRAPH_API Agdesc_t Agstrictundirected

Definition at line 421 of file cgraph.h.

Referenced by circomps(), and strictgraph().

CGRAPH_API Agdesc_t Agundirected

Definition at line 420 of file cgraph.h.

Referenced by graph(), and makeDotGraph().