Graphviz  2.41.20171026.1811
Macros | Functions
stuff.c File Reference
#include "config.h"
#include "neato.h"
#include "stress.h"
#include <time.h>
#include <unistd.h>
Include dependency graph for stuff.c:

Go to the source code of this file.

Macros

#define Msub(i, j)   M[(i)*Ndim+(j)]
 

Functions

double fpow32 (double x)
 
double distvec (double *p0, double *p1, double *vec)
 
double ** new_array (int m, int n, double ival)
 
void free_array (double **rv)
 
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)
 
void solve_model (graph_t *G, int nG)
 
void update_arrays (graph_t *G, int nG, int i)
 
void D2E (graph_t *G, int nG, int n, double *M)
 
void final_energy (graph_t *G, int nG)
 
node_tchoose_node (graph_t *G, int nG)
 
void move_node (graph_t *G, int nG, node_t *n)
 
void heapup (node_t *v)
 
void heapdown (node_t *v)
 
void neato_enqueue (node_t *v)
 
node_tneato_dequeue (void)
 
void shortest_path (graph_t *G, int nG)
 
void s1 (graph_t *G, node_t *node)
 
void make_spring (graph_t *G, node_t *u, node_t *v, double f)
 

Macro Definition Documentation

#define Msub (   i,
 
)    M[(i)*Ndim+(j)]

Definition at line 472 of file stuff.c.

Referenced by D2E().

Function Documentation

node_t* choose_node ( graph_t G,
int  nG 
)

Definition at line 513 of file stuff.c.

References GD_move, GD_neato_nlist, GD_sum_t, max, MAXDOUBLE, MaxIter, ND_pinned, Ndim, NULL, P_SET, and Verbose.

Referenced by solve_model().

void D2E ( graph_t G,
int  nG,
int  n,
double *  M 
)

Definition at line 473 of file stuff.c.

References fpow32(), GD_dist, GD_neato_nlist, GD_spring, MAXDIM, Msub, ND_pos, and Ndim.

Referenced by move_node().

void diffeq_model ( graph_t G,
int  nG 
)
double distvec ( double *  p0,
double *  p1,
double *  vec 
)

Definition at line 33 of file stuff.c.

References dist(), and Ndim.

Referenced by diffeq_model(), and update_arrays().

void final_energy ( graph_t G,
int  nG 
)

Definition at line 507 of file stuff.c.

References GD_move.

double fpow32 ( double  x)

Definition at line 27 of file stuff.c.

Referenced by D2E().

void free_array ( double **  rv)

Definition at line 63 of file stuff.c.

Referenced by circuit_model(), circuitModel(), free_scan_graph(), and lu_decompose().

void free_scan_graph ( graph_t g)

Definition at line 294 of file stuff.c.

References free_array(), GD_dist, GD_neato_nlist, GD_spring, GD_sum_t, GD_t, Nop, and NULL.

Referenced by neato_layout().

void heapdown ( node_t v)

Definition at line 615 of file stuff.c.

References left, ND_dist, ND_heapindex, and right.

Referenced by neato_dequeue().

void heapup ( node_t v)

Definition at line 598 of file stuff.c.

References ND_dist, and ND_heapindex.

Referenced by neato_enqueue(), and s1().

void initial_positions ( graph_t G,
int  nG 
)
void jitter3d ( node_t np,
int  nG 
)

Definition at line 313 of file stuff.c.

References jitter_d().

Referenced by randompos(), and user_pos().

void jitter_d ( node_t np,
int  nG,
int  n 
)

Definition at line 306 of file stuff.c.

References drand48(), ND_pos, and Ndim.

Referenced by jitter3d(), and user_pos().

void make_spring ( graph_t G,
node_t u,
node_t v,
double  f 
)

Definition at line 720 of file stuff.c.

References GD_dist, and ND_id.

Referenced by s1().

void move_node ( graph_t G,
int  nG,
node_t n 
)

Definition at line 567 of file stuff.c.

References agnameof(), ALLOC, D2E(), Damping, drand48(), GD_move, GD_sum_t, MAXDIM, ND_id, ND_pos, Ndim, solve(), test_toggle(), and update_arrays().

Referenced by solve_model().

node_t* neato_dequeue ( void  )

Definition at line 651 of file stuff.c.

References heapdown(), ND_heapindex, and NULL.

Referenced by s1().

void neato_enqueue ( node_t v)

Definition at line 639 of file stuff.c.

References assert, heapup(), and ND_heapindex.

Referenced by s1().

double** new_array ( int  m,
int  n,
double  ival 
)

Definition at line 46 of file stuff.c.

References N_NEW.

Referenced by circuit_model(), circuitModel(), lu_decompose(), and scan_graph_mode().

void randompos ( node_t np,
int  nG 
)

Definition at line 318 of file stuff.c.

References drand48(), jitter3d(), ND_pos, and Ndim.

Referenced by initial_positions().

void s1 ( graph_t G,
node_t node 
)
int scan_graph ( graph_t g)

Definition at line 289 of file stuff.c.

References MODE_KK, and scan_graph_mode().

Referenced by init_nop().

int scan_graph_mode ( graph_t G,
int  mode 
)
void shortest_path ( graph_t G,
int  nG 
)

Definition at line 669 of file stuff.c.

References agfstnode(), agnxtnode(), elapsed_sec(), N_NEW, s1(), start_timer(), and Verbose.

void solve_model ( graph_t G,
int  nG 
)

Definition at line 425 of file stuff.c.

References agerr(), agnameof(), AGWARN, choose_node(), elapsed_sec(), Epsilon, GD_move, MaxIter, move_node(), and Verbose.

void update_arrays ( graph_t G,
int  nG,
int  i 
)

Definition at line 445 of file stuff.c.

References dist(), distvec(), GD_dist, GD_neato_nlist, GD_spring, GD_sum_t, GD_t, MAXDIM, ND_pos, and Ndim.

Referenced by move_node().