Graphviz 13.0.0~dev.20241222.1117
Loading...
Searching...
No Matches
xlayout.c File Reference
#include <fdpgen/xlayout.h>
#include <neatogen/adjust.h>
#include <fdpgen/dbg.h>
#include <math.h>
#include <util/gv_ctype.h>
Include dependency graph for xlayout.c:

Go to the source code of this file.

Macros

#define FDP_PRIVATE   1
 
#define DFLT_overlap   "9:prism" /* default overlap value */
 
#define X_T0   xParams.T0
 
#define X_K   xParams.K
 
#define X_numIters   xParams.numIters
 
#define X_loopcnt   xParams.loopcnt
 
#define X_C   xParams.C
 

Functions

static double WD2 (Agnode_t *n)
 
static double HT2 (Agnode_t *n)
 
static double RAD (Agnode_t *n)
 
static double xinit_params (graph_t *g, int n, xparams *xpms)
 
static double cool (int t)
 
static int overlap (node_t *p, node_t *q)
 
static int cntOverlaps (graph_t *g)
 
static int doRep (node_t *p, node_t *q, double xdelta, double ydelta, double dist2, double X_ov, double X_nonov)
 
static int applyRep (Agnode_t *p, Agnode_t *q, double X_ov, double X_nonov)
 
static void applyAttr (Agnode_t *p, Agnode_t *q)
 
static int adjust (Agraph_t *g, double temp, double X_ov, double X_nonov)
 
static int x_layout (graph_t *g, xparams *pxpms, int tries)
 
void fdp_xLayout (graph_t *g, xparams *xpms)
 

Variables

static xparams xParams
 
static expand_t X_marg
 

Macro Definition Documentation

◆ DFLT_overlap

#define DFLT_overlap   "9:prism" /* default overlap value */

Definition at line 32 of file xlayout.c.

◆ FDP_PRIVATE

#define FDP_PRIVATE   1

Definition at line 25 of file xlayout.c.

◆ X_C

#define X_C   xParams.C

Definition at line 97 of file xlayout.c.

◆ X_K

#define X_K   xParams.K

Definition at line 94 of file xlayout.c.

◆ X_loopcnt

#define X_loopcnt   xParams.loopcnt

Definition at line 96 of file xlayout.c.

◆ X_numIters

#define X_numIters   xParams.numIters

Definition at line 95 of file xlayout.c.

◆ X_T0

#define X_T0   xParams.T0

Definition at line 93 of file xlayout.c.

Function Documentation

◆ adjust()

static int adjust ( Agraph_t g,
double  temp,
double  X_ov,
double  X_nonov 
)
static

Definition at line 205 of file xlayout.c.

References agfstnode(), agfstout(), aghead, agnxtnode(), agnxtout(), applyAttr(), applyRep(), len(), ND_pinned, ND_pos, overlaps(), P_PIN, and Verbose.

Here is the call graph for this function:

◆ applyAttr()

static void applyAttr ( Agnode_t p,
Agnode_t q 
)
static

Definition at line 172 of file xlayout.c.

References dist(), ND_pos, overlap(), RAD(), Verbose, and X_K.

Referenced by adjust().

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

◆ applyRep()

static int applyRep ( Agnode_t p,
Agnode_t q,
double  X_ov,
double  X_nonov 
)
static

Definition at line 165 of file xlayout.c.

References doRep(), and ND_pos.

Referenced by adjust().

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

◆ cntOverlaps()

static int cntOverlaps ( graph_t g)
static

Definition at line 118 of file xlayout.c.

References agfstnode(), agnxtnode(), cnt(), and overlap().

Referenced by x_layout().

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

◆ cool()

static double cool ( int  t)
static

Definition at line 100 of file xlayout.c.

References X_numIters, and X_T0.

◆ doRep()

static int doRep ( node_t p,
node_t q,
double  xdelta,
double  ydelta,
double  dist2,
double  X_ov,
double  X_nonov 
)
static

Definition at line 133 of file xlayout.c.

References dist(), dist2(), overlap(), and Verbose.

Referenced by applyRep().

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

◆ fdp_xLayout()

void fdp_xLayout ( graph_t g,
xparams xpms 
)

Definition at line 324 of file xlayout.c.

References agget(), DFLT_overlap, gv_isdigit(), removeOverlapAs(), Verbose, and x_layout().

Referenced by layout().

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

◆ HT2()

static double HT2 ( Agnode_t n)
static

Definition at line 47 of file xlayout.c.

References expand_t::doAdd, ND_height, X_marg, and expand_t::y.

◆ overlap()

static int overlap ( node_t p,
node_t q 
)
static

Definition at line 108 of file xlayout.c.

References HT2, ND_pos, and WD2().

Referenced by applyAttr(), cntOverlaps(), and doRep().

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

◆ RAD()

static double RAD ( Agnode_t n)
static

Definition at line 58 of file xlayout.c.

References HT2, and WD2().

Referenced by applyAttr().

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

◆ WD2()

static double WD2 ( Agnode_t n)
static

Definition at line 43 of file xlayout.c.

References expand_t::doAdd, ND_width, expand_t::x, and X_marg.

Referenced by overlap(), and RAD().

Here is the caller graph for this function:

◆ x_layout()

static int x_layout ( graph_t g,
xparams pxpms,
int  tries 
)
static

Definition at line 262 of file xlayout.c.

References adjust, agnedges(), agnnodes(), agroot(), cntOverlaps(), cool, expand_t::doAdd, xparams::K, nedges, PS2INCH, sepFactor(), Verbose, expand_t::x, X_C, X_loopcnt, X_marg, xinit_params(), and expand_t::y.

Referenced by fdp_xLayout().

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

◆ xinit_params()

static double xinit_params ( graph_t g,
int  n,
xparams xpms 
)
static

Definition at line 68 of file xlayout.c.

References agroot(), xparams::C, xparams::K, xparams::loopcnt, xparams::numIters, xparams::T0, Verbose, and xParams.

Referenced by x_layout().

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

Variable Documentation

◆ X_marg

expand_t X_marg
static

Definition at line 41 of file xlayout.c.

Referenced by HT2(), WD2(), and x_layout().

◆ xParams

xparams xParams
static
Initial value:
= {
60,
0.0,
0.3,
1.5,
0
}

Definition at line 34 of file xlayout.c.

Referenced by xinit_params().