Graphviz 13.1.3~dev.20250813.2319
|
#include "config.h"
#include <math.h>
#include <neatogen/neato.h>
#include <neatogen/stress.h>
#include <stdatomic.h>
#include <stdlib.h>
#include <time.h>
#include <util/alloc.h>
#include <unistd.h>
Go to the source code of this file.
Macros | |
#define | Msub(i, j) M[(i)*Ndim+(j)] |
Functions | |
static Agnode_t * | choose_node (graph_t *, int) |
static void | make_spring (graph_t *, Agnode_t *, Agnode_t *, double) |
static void | move_node (graph_t *, int, Agnode_t *) |
static double | distvec (double *p0, double *p1, double *vec) |
double ** | new_array (int m, int n, double ival) |
void | free_array (double **rv) |
static double *** | new_3array (int m, int n, int p, double ival) |
static void | free_3array (double ***rv) |
static int | lenattr (edge_t *e, Agsym_t *index, double *val) |
static int | degreeKind (graph_t *g, node_t *n, node_t **op) |
static node_t * | prune (graph_t *G, node_t *np, node_t *next) |
static double | setEdgeLen (graph_t *G, node_t *np, Agsym_t *lenx, double dfltlen) |
int | scan_graph_mode (graph_t *G, int mode) |
int | scan_graph (graph_t *g) |
void | free_scan_graph (graph_t *g) |
void | jitter_d (node_t *np, int nG, int n) |
void | jitter3d (node_t *np, int nG) |
void | randompos (node_t *np, int nG) |
void | initial_positions (graph_t *G, int nG) |
void | diffeq_model (graph_t *G, int nG) |
static double | total_e (graph_t *G, int nG) |
void | solve_model (graph_t *G, int nG) |
static void | update_arrays (graph_t *G, int nG, int i) |
static void | D2E (graph_t *G, int nG, int n, double *M) |
static void | heapup (node_t *v) |
static void | heapdown (node_t *v) |
void | neato_enqueue (node_t *v) |
node_t * | neato_dequeue (void) |
void | shortest_path (graph_t *G, int nG) |
void | s1 (graph_t *G, node_t *node) |
Variables | |
static double | Epsilon2 |
static node_t ** | Heap |
static int | Heapsize |
static node_t * | Src |
|
static |
Definition at line 127 of file stuff.c.
References agfstedge(), aghead, agnxtedge(), agtail, and NULL.
Referenced by prune(), and scan_graph_mode().
void diffeq_model | ( | graph_t * | G, |
int | nG | ||
) |
Definition at line 351 of file stuff.c.
References agfindedge, D, del(), dist(), distvec(), ED_factor, elapsed_sec(), G, GD_dist, GD_neato_nlist, GD_spring, GD_sum_t, GD_t, MAXDIM, ND_pos, Ndim, Spring_coeff, start_timer(), and Verbose.
Referenced by kkNeato().
|
static |
Definition at line 29 of file stuff.c.
Referenced by diffeq_model(), and update_arrays().
|
static |
Definition at line 84 of file stuff.c.
References free().
Referenced by free_scan_graph().
void free_array | ( | double ** | rv | ) |
Definition at line 57 of file stuff.c.
References free().
Referenced by circuit_model(), circuitModel(), free_scan_graph(), and lu_decompose().
void free_scan_graph | ( | graph_t * | g | ) |
Definition at line 296 of file stuff.c.
References free(), free_3array(), free_array(), GD_dist, GD_neato_nlist, GD_spring, GD_sum_t, GD_t, Nop, and NULL.
Referenced by neato_cleanup_graph(), and neato_layout().
|
static |
Definition at line 593 of file stuff.c.
References Heap, Heapsize, left, ND_dist, ND_heapindex, and right.
Referenced by neato_dequeue().
|
static |
Definition at line 576 of file stuff.c.
References Heap, ND_dist, and ND_heapindex.
Referenced by neato_enqueue(), and s1().
void initial_positions | ( | graph_t * | G, |
int | nG | ||
) |
Definition at line 328 of file stuff.c.
References agwarningf(), checkStart(), G, GD_neato_nlist, hasPos, init(), INIT_RANDOM, INIT_REGULAR, INIT_SELF, randompos(), and Verbose.
Referenced by kkNeato(), and sgd().
void jitter3d | ( | node_t * | np, |
int | nG | ||
) |
Definition at line 315 of file stuff.c.
References jitter_d().
Referenced by initRegular(), randompos(), and user_pos().
void jitter_d | ( | node_t * | np, |
int | nG, | ||
int | n | ||
) |
Definition at line 308 of file stuff.c.
References drand48(), ND_pos, and Ndim.
Referenced by jitter3d(), and user_pos().
Definition at line 103 of file stuff.c.
References agwarningf(), agxget(), Nop, and NULL.
Referenced by setEdgeLen().
Definition at line 543 of file stuff.c.
References agnameof(), D2E(), Damping, drand48(), free(), G, GD_move, GD_sum_t, gv_calloc(), MAXDIM, ND_id, ND_pos, Ndim, solve(), test_toggle(), and update_arrays().
Referenced by solve_model().
node_t * neato_dequeue | ( | void | ) |
Definition at line 628 of file stuff.c.
References Heap, heapdown(), Heapsize, ND_heapindex, and NULL.
Referenced by s1().
void neato_enqueue | ( | node_t * | v | ) |
|
static |
Definition at line 66 of file stuff.c.
References gv_calloc(), and NULL.
Referenced by scan_graph_mode().
double ** new_array | ( | int | m, |
int | n, | ||
double | ival | ||
) |
Definition at line 42 of file stuff.c.
References gv_calloc().
Referenced by circuit_model(), circuitModel(), lu_decompose(), and scan_graph_mode().
Definition at line 163 of file stuff.c.
References agdelete(), agnxtnode(), degreeKind(), and G.
Referenced by scan_graph_mode().
void randompos | ( | node_t * | np, |
int | nG | ||
) |
Definition at line 320 of file stuff.c.
References drand48(), jitter3d(), ND_pos, and Ndim.
Referenced by initial_positions().
Definition at line 663 of file stuff.c.
References agfstedge(), aghead, agnxtedge(), agtail, ED_dist, G, GD_neato_nlist, heapup(), Initial_dist, make_spring(), ND_dist, ND_heapindex, ND_hops, neato_dequeue(), neato_enqueue(), and Src.
Referenced by buildBindings(), clip_line(), comp_ascend(), comp_ascend_int(), concat(), concat(), concatPort(), concatPort(), directVis(), gvbisect(), gvrender_comparestr(), indexOf(), is_parallel(), rindexOf(), same_side(), scomp(), shortest_path(), STsetUnion(), and tok().
int scan_graph | ( | graph_t * | g | ) |
Definition at line 291 of file stuff.c.
References MODE_KK, and scan_graph_mode().
Referenced by init_nop().
int scan_graph_mode | ( | graph_t * | G, |
int | mode | ||
) |
Definition at line 211 of file stuff.c.
References agattr_text(), agdelete(), AGEDGE, agfstnode(), agget(), agnameof(), agnedges(), agnnodes(), agnxtnode(), Damping, degreeKind(), DFLT_TOLERANCE, Epsilon, G, GD_dist, GD_neato_nlist, GD_spring, GD_sum_t, GD_t, getdouble(), gv_calloc(), Initial_dist, MODE_KK, MODE_SGD, ND_heapindex, ND_id, Ndim, new_3array(), new_array(), Nop, prune(), Reduce, setEdgeLen(), str, and Verbose.
Referenced by neatoLayout(), and scan_graph().
Definition at line 187 of file stuff.c.
References agerr(), agfstout(), agnameof(), agnxtout(), AGPREV, ED_dist, err, G, len(), and lenattr().
Referenced by scan_graph_mode().
void shortest_path | ( | graph_t * | G, |
int | nG | ||
) |
Definition at line 646 of file stuff.c.
References agfstnode(), agnxtnode(), elapsed_sec(), free(), G, gv_calloc(), Heap, s1(), start_timer(), and Verbose.
Referenced by kkNeato().
void solve_model | ( | graph_t * | G, |
int | nG | ||
) |
Definition at line 426 of file stuff.c.
References agnameof(), agwarningf(), choose_node(), elapsed_sec(), Epsilon, Epsilon2, G, GD_move, MaxIter, move_node(), total_e(), and Verbose.
Referenced by kkNeato().
|
static |
Definition at line 402 of file stuff.c.
References G, GD_dist, GD_neato_nlist, GD_spring, ND_pos, and Ndim.
Referenced by solve_model().
|
static |
|
static |
Definition at line 24 of file stuff.c.
Referenced by choose_node(), and solve_model().
|
static |
Definition at line 572 of file stuff.c.
Referenced by heapdown(), heapup(), neato_dequeue(), neato_enqueue(), and shortest_path().
|
static |
Definition at line 573 of file stuff.c.
Referenced by heapdown(), neato_dequeue(), and neato_enqueue().