Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
cluster.c File Reference
#include <assert.h>
#include <dotgen/dot.h>
#include <stdbool.h>
#include <stddef.h>
#include <util/alloc.h>
Include dependency graph for cluster.c:

Go to the source code of this file.

Functions

static node_tmap_interclust_node (node_t *n)
 
static void make_slots (graph_t *root, int r, int pos, int d)
 
static node_tclone_vn (graph_t *g, node_t *vn)
 
static void map_path (node_t *from, node_t *to, edge_t *orig, edge_t *ve, int type)
 
static void make_interclust_chain (node_t *from, node_t *to, edge_t *orig)
 
static void interclexp (graph_t *subg)
 
static void merge_ranks (graph_t *subg)
 
static void remove_rankleaders (graph_t *g)
 
void expand_cluster (graph_t *subg)
 
void mark_clusters (graph_t *g)
 
void build_skeleton (graph_t *g, graph_t *subg)
 
void install_cluster (graph_t *g, node_t *n, int pass, node_queue_t *q)
 
static void mark_lowcluster_basic (Agraph_t *g)
 
void mark_lowclusters (Agraph_t *root)
 

Function Documentation

◆ build_skeleton()

void build_skeleton ( graph_t g,
graph_t subg 
)

Definition at line 352 of file cluster.c.

References agfstnode(), agfstout(), aghead, agnxtnode(), agnxtout(), agtail, CL_CROSS, CLUSTER, ED_count, ED_xpenalty, GD_maxrank, GD_minrank, GD_rankleader, gv_calloc(), ND_clust, ND_out, ND_rank, ND_ranktype, ND_UF_size, NULL, prev, virtual_edge(), and virtual_node().

Referenced by class2().

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

◆ clone_vn()

static node_t * clone_vn ( graph_t g,
node_t vn 
)
static

Definition at line 58 of file cluster.c.

References GD_rank, make_slots(), ND_lw, ND_order, ND_rank, ND_rw, and virtual_node().

Referenced by map_path().

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

◆ expand_cluster()

void expand_cluster ( graph_t subg)

Definition at line 290 of file cluster.c.

References allocate_ranks(), build_ranks(), class2(), GD_comp, GD_nlist, interclexp(), merge_ranks(), and remove_rankleaders().

Referenced by mincross_clust().

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

◆ install_cluster()

void install_cluster ( graph_t g,
node_t n,
int  pass,
node_queue_t *  q 
)

Definition at line 389 of file cluster.c.

References enqueue_neighbors(), GD_installed, GD_maxrank, GD_minrank, GD_rankleader, install_in_rank(), and ND_clust.

Referenced by build_ranks().

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

◆ interclexp()

static void interclexp ( graph_t subg)
static

Definition at line 161 of file cluster.c.

References agcontains(), agfstedge(), agfstnode(), aghead, AGMKOUT, agnxtedge(), agnxtnode(), agtail, dot_root(), ED_to_virt, find_flat_edge(), flat_edge(), make_interclust_chain(), merge_chain(), merge_oneway(), mergeable(), ND_rank, NULL, prev, and safe_other_edge().

Referenced by expand_cluster().

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

◆ make_interclust_chain()

static void make_interclust_chain ( node_t from,
node_t to,
edge_t orig 
)
static

Definition at line 144 of file cluster.c.

References CLUSTER_EDGE, ED_to_virt, map_interclust_node(), map_path(), and VIRTUAL.

Referenced by interclexp().

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

◆ make_slots()

static void make_slots ( graph_t root,
int  r,
int  pos,
int  d 
)
static

Definition at line 31 of file cluster.c.

References GD_rank, ND_order, and NULL.

Referenced by clone_vn(), and merge_ranks().

Here is the caller graph for this function:

◆ map_interclust_node()

static node_t * map_interclust_node ( node_t n)
static

Definition at line 18 of file cluster.c.

References GD_expanded, GD_rankleader, ND_clust, ND_rank, and NULL.

Referenced by make_interclust_chain().

Here is the caller graph for this function:

◆ map_path()

static void map_path ( node_t from,
node_t to,
edge_t orig,
edge_t ve,
int  type 
)
static

Definition at line 75 of file cluster.c.

References aghead, agtail, clone_vn(), delete_fast_edge(), dot_root(), ED_count, ED_edge_type, ED_to_virt, find_fast_edge(), merge_oneway(), ND_node_type, ND_out, ND_rank, NORMAL, NULL, other_edge(), ports_eq(), type, and virtual_edge().

Referenced by make_interclust_chain().

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

◆ mark_clusters()

void mark_clusters ( graph_t g)

Definition at line 308 of file cluster.c.

References agdelete(), agfstnode(), agfstout(), aghead, agnameof(), agnxtnode(), agnxtout(), agwarningf(), CLUSTER, ED_to_virt, GD_clust, GD_leader, GD_n_cluster, ND_clust, ND_node_type, ND_out, ND_ranktype, NORMAL, NULL, UF_setname(), UF_singleton(), and VIRTUAL.

Referenced by class1(), and class2().

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

◆ mark_lowcluster_basic()

static void mark_lowcluster_basic ( Agraph_t g)
static

Definition at line 426 of file cluster.c.

References agfstnode(), agfstout(), aghead, agnxtnode(), agnxtout(), ED_to_virt, GD_clust, GD_n_cluster, mark_lowcluster_basic(), ND_clust, ND_node_type, ND_out, NULL, and VIRTUAL.

Referenced by mark_lowcluster_basic(), and mark_lowclusters().

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

◆ mark_lowclusters()

void mark_lowclusters ( Agraph_t root)

Definition at line 404 of file cluster.c.

References agfstnode(), agfstout(), aghead, agnxtnode(), agnxtout(), ED_to_virt, mark_lowcluster_basic(), ND_clust, ND_node_type, ND_out, NULL, and VIRTUAL.

Referenced by dot_mincross(), dot_position(), and dot_splines_().

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

◆ merge_ranks()

static void merge_ranks ( graph_t subg)
static

Definition at line 228 of file cluster.c.

References agroot(), delete_fast_node(), dot_root(), fast_node(), GD_expanded, GD_maxrank, GD_minrank, GD_rank, GD_rankleader, make_slots(), ND_node_type, ND_order, Agnode_s::root, and VIRTUAL.

Referenced by expand_cluster().

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

◆ remove_rankleaders()

static void remove_rankleaders ( graph_t g)
static

Definition at line 261 of file cluster.c.

References Agnode_s::base, Agedge_s::base, Agobj_s::data, delete_fast_edge(), delete_fast_node(), dot_root(), free(), GD_maxrank, GD_minrank, GD_rankleader, ND_in, ND_out, and NULL.

Referenced by expand_cluster().

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