Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
decomp.c File Reference
#include <cgraph/alloc.h>
#include <cgraph/stack.h>
#include <dotgen/dot.h>
#include <stddef.h>
#include <stdint.h>
Include dependency graph for decomp.c:

Go to the source code of this file.

Functions

static void begin_component (graph_t *g)
 
static void add_to_component (graph_t *g, node_t *n)
 
static void end_component (graph_t *g)
 
static void push (gv_stack_t *sp, node_t *np)
 
static node_tpop (gv_stack_t *sp)
 
static void search_component (gv_stack_t *stk, graph_t *g, node_t *n)
 
void decompose (graph_t *g, int pass)
 

Variables

static node_tLast_node
 
static size_t Cmark
 

Function Documentation

◆ add_to_component()

static void add_to_component ( graph_t g,
node_t n 
)
static

Definition at line 36 of file decomp.c.

References Cmark, GD_nlist, Last_node, ND_mark, ND_next, ND_prev, and NULL.

Referenced by search_component().

Here is the caller graph for this function:

◆ begin_component()

static void begin_component ( graph_t g)
static

Definition at line 30 of file decomp.c.

References GD_nlist, Last_node, and NULL.

Referenced by decompose().

Here is the caller graph for this function:

◆ decompose()

void decompose ( graph_t g,
int  pass 
)

Definition at line 112 of file decomp.c.

References agfstnode(), agnxtnode(), begin_component(), Cmark, end_component(), GD_comp, GD_rankleader, ND_clust, ND_mark, ND_rank, search_component(), stack_reset(), and UF_find().

Referenced by dot1_rank(), and init_mincross().

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

◆ end_component()

static void end_component ( graph_t g)
static

Definition at line 51 of file decomp.c.

References GD_comp, GD_nlist, and gv_recalloc().

Referenced by decompose().

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

◆ pop()

static node_t * pop ( gv_stack_t *  sp)
static

Definition at line 64 of file decomp.c.

References NULL, stack_is_empty(), and stack_pop().

Here is the call graph for this function:

◆ push()

static void push ( gv_stack_t *  sp,
node_t np 
)
static

Definition at line 59 of file decomp.c.

References Cmark, ND_mark, and stack_push().

Referenced by search_component().

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

◆ search_component()

static void search_component ( gv_stack_t *  stk,
graph_t g,
node_t n 
)
static

Definition at line 81 of file decomp.c.

References add_to_component(), aghead, agtail, Cmark, ND_flat_in, ND_flat_out, ND_in, ND_mark, ND_out, pop(), push(), SIZE_MAX, and UF_find().

Referenced by decompose().

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

Variable Documentation

◆ Cmark

size_t Cmark
static

Definition at line 27 of file decomp.c.

Referenced by add_to_component(), decompose(), push(), and search_component().

◆ Last_node

node_t* Last_node
static

Definition at line 26 of file decomp.c.

Referenced by add_to_component(), and begin_component().