Graphviz  2.41.20171026.1811
Macros | Functions
spring_electrical.c File Reference
#include "config.h"
#include "SparseMatrix.h"
#include "spring_electrical.h"
#include "QuadTree.h"
#include "Multilevel.h"
#include "post_process.h"
#include "overlap.h"
#include "types.h"
#include "memory.h"
#include "arith.h"
#include "logic.h"
#include "math.h"
#include "globals.h"
#include <string.h>
#include <time.h>
Include dependency graph for spring_electrical.c:

Go to the source code of this file.

Macros

#define PI   M_PI
 
#define node_degree(i)   (ia[(i)+1] - ia[(i)])
 

Functions

spring_electrical_control spring_electrical_control_new ()
 
void spring_electrical_control_delete (spring_electrical_control ctrl)
 
void spring_electrical_control_print (spring_electrical_control ctrl)
 
void oned_optimizer_delete (oned_optimizer opt)
 
oned_optimizer oned_optimizer_new (int i)
 
void oned_optimizer_train (oned_optimizer opt, real work)
 
int oned_optimizer_get (oned_optimizer opt)
 
real average_edge_length (SparseMatrix A, int dim, real *coord)
 
void export_embedding (FILE *fp, int dim, SparseMatrix A, real *x, real *width)
 
void check_real_array_size (real **a, int len, int *lenmax)
 
void check_int_array_size (int **a, int len, int *lenmax)
 
real get_angle (real *x, int dim, int i, int j)
 
int comp_real (const void *x, const void *y)
 
void force_print (FILE *fp, int n, int dim, real *x, real *force)
 
void spring_electrical_embedding_fast (int dim, SparseMatrix A0, spring_electrical_control ctrl, real *node_weights, real *x, int *flag)
 
void spring_electrical_embedding_slow (int dim, SparseMatrix A0, spring_electrical_control ctrl, real *node_weights, real *x, int *flag)
 
void spring_electrical_embedding (int dim, SparseMatrix A0, spring_electrical_control ctrl, real *node_weights, real *x, int *flag)
 
void spring_maxent_embedding (int dim, SparseMatrix A0, SparseMatrix D, spring_electrical_control ctrl, real *node_weights, real *x, real rho, int *flag)
 
void spring_electrical_spring_embedding (int dim, SparseMatrix A0, SparseMatrix D, spring_electrical_control ctrl, real *node_weights, real *x, int *flag)
 
void print_matrix (real *x, int n, int dim)
 
void interpolate_coord (int dim, SparseMatrix A, real *x)
 
int power_law_graph (SparseMatrix A)
 
void pcp_rotate (int n, int dim, real *x)
 
void multilevel_spring_electrical_embedding (int dim, SparseMatrix A, SparseMatrix D, spring_electrical_control ctrl, real *node_weights, real *label_sizes, real *x, int n_edge_label_nodes, int *edge_label_nodes, int *flag)
 

Macro Definition Documentation

#define node_degree (   i)    (ia[(i)+1] - ia[(i)])

Definition at line 317 of file spring_electrical.c.

#define PI   M_PI

Definition at line 31 of file spring_electrical.c.

Referenced by get_angle().

Function Documentation

real average_edge_length ( SparseMatrix  A,
int  dim,
real coord 
)
void check_int_array_size ( int **  a,
int  len,
int lenmax 
)

Definition at line 326 of file spring_electrical.c.

References MAX, and REALLOC.

void check_real_array_size ( real **  a,
int  len,
int lenmax 
)

Definition at line 319 of file spring_electrical.c.

References MAX, real, and REALLOC.

int comp_real ( const void *  x,
const void *  y 
)

Definition at line 355 of file spring_electrical.c.

References real.

void export_embedding ( FILE *  fp,
int  dim,
SparseMatrix  A,
real x,
real width 
)
void force_print ( FILE *  fp,
int  n,
int  dim,
real x,
real force 
)

Definition at line 451 of file spring_electrical.c.

real get_angle ( real x,
int  dim,
int  i,
int  j 
)

Definition at line 334 of file spring_electrical.c.

References ABS, PI, and real.

void interpolate_coord ( int  dim,
SparseMatrix  A,
real x 
)
void multilevel_spring_electrical_embedding ( int  dim,
SparseMatrix  A,
SparseMatrix  D,
spring_electrical_control  ctrl,
real node_weights,
real label_sizes,
real x,
int  n_edge_label_nodes,
int edge_label_nodes,
int flag 
)

Definition at line 2283 of file spring_electrical.c.

void oned_optimizer_delete ( oned_optimizer  opt)
int oned_optimizer_get ( oned_optimizer  opt)
oned_optimizer oned_optimizer_new ( int  i)
void oned_optimizer_train ( oned_optimizer  opt,
real  work 
)
void pcp_rotate ( int  n,
int  dim,
real x 
)

Definition at line 1858 of file spring_electrical.c.

References assert, dist(), and real.

int power_law_graph ( SparseMatrix  A)
void print_matrix ( real x,
int  n,
int  dim 
)

Definition at line 1746 of file spring_electrical.c.

void spring_electrical_control_delete ( spring_electrical_control  ctrl)

Definition at line 73 of file spring_electrical.c.

References FREE.

Referenced by sfdp_layout(), and SpringSmoother_delete().

spring_electrical_control spring_electrical_control_new ( void  )

Definition at line 33 of file spring_electrical.c.

References spring_electrical_control_struct::adaptive_cooling, AUTOP, spring_electrical_control_struct::beautify_leaves, spring_electrical_control_struct::bh, spring_electrical_control_struct::C, COARSEN_INDEPENDENT_EDGE_SET_HEAVEST_EDGE_PERNODE_SUPERNODES_FIRST, COARSEN_MODE_FORCEFUL, spring_electrical_control_struct::cool, spring_electrical_control_struct::do_shrinking, spring_electrical_control_struct::edge_labeling_scheme, FALSE, spring_electrical_control_struct::initial_scaling, spring_electrical_control_struct::K, MALLOC, spring_electrical_control_struct::max_qtree_level, spring_electrical_control_struct::maxiter, spring_electrical_control_struct::method, METHOD_SPRING_ELECTRICAL, spring_electrical_control_struct::multilevel_coarsen_mode, spring_electrical_control_struct::multilevel_coarsen_scheme, spring_electrical_control_struct::multilevels, spring_electrical_control_struct::overlap, spring_electrical_control_struct::p, spring_electrical_control_struct::q, QUAD_TREE_HYBRID, spring_electrical_control_struct::quadtree_size, spring_electrical_control_struct::random_seed, spring_electrical_control_struct::random_start, spring_electrical_control_struct::rotation, spring_electrical_control_struct::smoothing, SMOOTHING_NONE, spring_electrical_control_struct::step, spring_electrical_control_struct::tol, TRUE, spring_electrical_control_struct::tscheme, and spring_electrical_control_struct::use_node_weights.

Referenced by sfdp_layout(), and SpringSmoother_new().

void spring_electrical_control_print ( spring_electrical_control  ctrl)
void spring_electrical_embedding ( int  dim,
SparseMatrix  A0,
spring_electrical_control  ctrl,
real node_weights,
real x,
int flag 
)
void spring_electrical_embedding_fast ( int  dim,
SparseMatrix  A0,
spring_electrical_control  ctrl,
real node_weights,
real x,
int flag 
)
void spring_electrical_embedding_slow ( int  dim,
SparseMatrix  A0,
spring_electrical_control  ctrl,
real node_weights,
real x,
int flag 
)
void spring_electrical_spring_embedding ( int  dim,
SparseMatrix  A0,
SparseMatrix  D,
spring_electrical_control  ctrl,
real node_weights,
real x,
int flag 
)
void spring_maxent_embedding ( int  dim,
SparseMatrix  A0,
SparseMatrix  D,
spring_electrical_control  ctrl,
real node_weights,
real x,
real  rho,
int flag 
)