Graphviz  2.29.20120524.0446
Defines | Functions
lib/neatogen/stuff.c File Reference
#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.

Defines

#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)
int allow_edits (int nsec)

Define Documentation

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

Definition at line 494 of file stuff.c.

Referenced by D2E().


Function Documentation

int allow_edits ( int  nsec)

Definition at line 751 of file stuff.c.

References TRUE, NULL, FALSE, diffeq_model(), agerr(), and AGERR.

node_t* choose_node ( graph_t G,
int  nG 
)

Definition at line 535 of file stuff.c.

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

Referenced by solve_model().

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

Definition at line 495 of file stuff.c.

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

Referenced by move_node().

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

Definition at line 35 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 529 of file stuff.c.

References GD_move.

double fpow32 ( double  x)

Definition at line 29 of file stuff.c.

Referenced by D2E().

void free_array ( double **  rv)

Definition at line 65 of file stuff.c.

References free().

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

void free_scan_graph ( graph_t g)

Definition at line 316 of file stuff.c.

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

Referenced by user_pos(), and neato_layout().

void heapdown ( node_t v)

Definition at line 637 of file stuff.c.

References left, right, ND_heapindex, and ND_dist.

Referenced by neato_dequeue().

void heapup ( node_t v)

Definition at line 620 of file stuff.c.

References ND_heapindex, and ND_dist.

Referenced by neato_enqueue(), and s1().

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

Definition at line 335 of file stuff.c.

References jitter_d().

Referenced by user_pos(), and randompos().

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

Definition at line 328 of file stuff.c.

References Ndim, ND_pos, and drand48().

Referenced by user_pos(), and jitter3d().

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

Definition at line 742 of file stuff.c.

References ND_id, and GD_dist.

Referenced by s1().

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

Definition at line 589 of file stuff.c.

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

Referenced by solve_model().

node_t* neato_dequeue ( void  )

Definition at line 673 of file stuff.c.

References NULL, ND_heapindex, and heapdown().

Referenced by s1().

void neato_enqueue ( node_t v)

Definition at line 661 of file stuff.c.

References assert, ND_heapindex, and heapup().

Referenced by s1().

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

Definition at line 48 of file stuff.c.

References N_NEW.

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

void randompos ( node_t np,
int  nG 
)

Definition at line 340 of file stuff.c.

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

Referenced by initial_positions().

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

Definition at line 311 of file stuff.c.

References scan_graph_mode(), and MODE_KK.

Referenced by init_nop().

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

Definition at line 691 of file stuff.c.

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

void solve_model ( graph_t G,
int  nG 
)

Definition at line 447 of file stuff.c.

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

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

Definition at line 467 of file stuff.c.

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

Referenced by move_node().