/misc/src/release/graphviz-2.18-1/src/graphviz-2.18/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 drand48 (void)
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)
double doubleattr (void *obj, int index, double defval)
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 470 of file stuff.c.

Referenced by D2E().


Function Documentation

int allow_edits ( int  nsec  ) 

Definition at line 727 of file stuff.c.

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

node_t* choose_node ( graph_t G,
int  nG 
)

Definition at line 511 of file stuff.c.

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

Referenced by solve_model().

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

Definition at line 471 of file stuff.c.

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

Referenced by move_node().

void diffeq_model ( graph_t G,
int  nG 
)

Definition at line 346 of file stuff.c.

References agfindedge(), dist(), distvec(), ED_factor, elapsed_sec(), GD_dist, GD_neato_nlist, GD_spring, GD_sum_t, GD_t, MAXDIM, ND_pos, Ndim, Spring_coeff, start_timer(), and Verbose.

Referenced by allow_edits().

double distvec ( double *  p0,
double *  p1,
double *  vec 
)

Definition at line 46 of file stuff.c.

References dist(), and Ndim.

Referenced by diffeq_model(), and update_arrays().

double doubleattr ( void *  obj,
int  index,
double  defval 
)

Definition at line 118 of file stuff.c.

References agxget().

double drand48 ( void   ) 

Definition at line 31 of file stuff.c.

void final_energy ( graph_t G,
int  nG 
)

Definition at line 505 of file stuff.c.

References GD_move.

double fpow32 ( double  x  ) 

Definition at line 40 of file stuff.c.

Referenced by D2E().

void free_array ( double **  rv  ) 

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

References free(), 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().

void heapdown ( node_t v  ) 

Definition at line 613 of file stuff.c.

References Agnodeinfo_t::dist, left, ND_dist, ND_heapindex, right, and Agnode_t::u.

Referenced by neato_dequeue().

void heapup ( node_t v  ) 

Definition at line 596 of file stuff.c.

References ND_dist, and ND_heapindex.

Referenced by neato_enqueue(), and s1().

void initial_positions ( graph_t G,
int  nG 
)

Definition at line 322 of file stuff.c.

References agerr(), AGWARN, checkStart(), GD_neato_nlist, hasPos, INIT_RANDOM, INIT_REGULAR, INIT_SELF, randompos(), and Verbose.

void jitter3d ( node_t np,
int  nG 
)

Definition at line 309 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 302 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 718 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 565 of file stuff.c.

References ALLOC, D2E(), Damping, drand48(), GD_move, GD_sum_t, MAXDIM, Agnode_t::name, ND_id, ND_pos, solve(), test_toggle(), and update_arrays().

Referenced by solve_model().

node_t* neato_dequeue ( void   ) 

Definition at line 649 of file stuff.c.

References heapdown(), ND_heapindex, and NULL.

Referenced by s1().

void neato_enqueue ( node_t v  ) 

Definition at line 637 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 59 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 314 of file stuff.c.

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

Referenced by initial_positions().

void s1 ( graph_t G,
node_t node 
)

Definition at line 684 of file stuff.c.

References agfstedge(), agnxtedge(), ED_dist, GD_neato_nlist, Agedge_t::head, heapup(), Initial_dist, make_spring(), ND_dist, ND_heapindex, ND_hops, neato_dequeue(), neato_enqueue(), node(), and Agedge_t::tail.

Referenced by bisect(), clip_line(), directVis(), and shortest_path().

int scan_graph ( graph_t g  ) 

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

References agdelete(), agfstnode(), agget(), agindex(), agnedges(), agnnodes(), agnxtnode(), Damping, DFLT_TOLERANCE, Agproto_t::e, Epsilon, GD_dist, GD_neato_nlist, GD_spring, GD_sum_t, GD_t, getdouble(), Initial_dist, MAX, MODE_KK, N_NEW, Agraph_t::name, ND_heapindex, ND_id, Ndim, new_array(), Nop, Agraph_t::proto, Reduce, Agraph_t::root, str, and Verbose.

Referenced by neatoLayout(), and scan_graph().

void shortest_path ( graph_t G,
int  nG 
)

Definition at line 667 of file stuff.c.

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

void solve_model ( graph_t G,
int  nG 
)

Definition at line 423 of file stuff.c.

References agerr(), AGWARN, choose_node(), elapsed_sec(), Epsilon, GD_move, MaxIter, move_node(), Agraph_t::name, and Verbose.

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

Definition at line 443 of file stuff.c.

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

Referenced by move_node().


Generated on Mon Mar 31 19:07:34 2008 for Graphviz by  doxygen 1.5.1