Graphviz 16.0.0~dev.20260810.2334
Loading...
Searching...
No Matches
Collaboration diagram for set cardinality:

Functions

size_t agnnodes_z (const Agraph_t *g)
 
int agnnodes (Agraph_t *g)
 
int agnedges (Agraph_t *g)
 
int agnsubg (Agraph_t *g)
 
int agdegree (Agraph_t *g, Agnode_t *n, int in, int out)
 
int agcountuniqedges (Agraph_t *g, Agnode_t *n, int in, int out)
 

Detailed Description

By default, nodes are stored in ordered sets for efficient random access to insert, find, and delete nodes.

agnnodes, agnedges, and agnsubg return the sizes of node, edge and subgraph sets of a graph.

Where possible, agnnodes_z should be used in preference to agnnodes.

The function agdegree returns the size of a node’s edge set, and takes flags to select in-edges, out-edges, or both.

The function agcountuniqedges returns the size of a node’s edge set, and takes flags to select in-edges, out-edges, or both. Unlike agdegree, each loop is only counted once.

Function Documentation

◆ agcountuniqedges()

int agcountuniqedges ( Agraph_t g,
Agnode_t n,
int  in,
int  out 
)

Definition at line 209 of file graph.c.

References agfstin(), agnxtin(), agsubrep(), cnt(), Agraph_s::e_seq, Agsubnode_s::in_seq, Agedge_s::node, and Agsubnode_s::out_seq.

Here is the call graph for this function:

◆ agdegree()

int agdegree ( Agraph_t g,
Agnode_t n,
int  in,
int  out 
)

Definition at line 227 of file graph.c.

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

Referenced by agnedges(), countComponents(), findSource(), fixLabelOrder(), getval(), lookup(), and myindegree().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agnedges()

int agnedges ( Agraph_t g)

Definition at line 165 of file graph.c.

References agdegree(), agfstnode(), and agnxtnode().

Referenced by attached_clustering(), cccomps(), cloneGraph(), dot2_rank(), emit(), getval(), graphcmd_internal(), Import_coord_clusters_from_dot(), Import_dot_splines(), init_mincross(), lookup(), main(), makeGraph(), makeGraphData(), makeMatrix(), nop_init_edges(), orthoEdges(), process(), process(), processClusters(), scan_graph_mode(), SparseMatrix_import_dot(), and x_layout().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agnnodes()

◆ agnnodes_z()

size_t agnnodes_z ( const Agraph_t g)

Definition at line 157 of file graph.c.

References Agraph_s::n_id, and node_set_size().

Referenced by agnnodes(), circular_init_node_edge(), fixLabelOrder(), getSizes(), makeInfo(), sgd(), and SparseMatrix_import_dot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ agnsubg()

int agnsubg ( Agraph_t g)

Definition at line 175 of file graph.c.

References dtsize(), and Agraph_s::g_seq.

Here is the call graph for this function: