Graphviz 13.0.0~dev.20241220.2304
|
Go to the source code of this file.
Data Structures | |
struct | spring_electrical_control_struct |
Macros | |
#define | AUTOP -1.0001234 |
Typedefs | |
typedef struct spring_electrical_control_struct * | spring_electrical_control |
Enumerations | |
enum | { ERROR_NOT_SQUARE_MATRIX = -100 } |
enum | { SMOOTHING_NONE , SMOOTHING_STRESS_MAJORIZATION_GRAPH_DIST , SMOOTHING_STRESS_MAJORIZATION_AVG_DIST , SMOOTHING_STRESS_MAJORIZATION_POWER_DIST , SMOOTHING_SPRING , SMOOTHING_TRIANGLE , SMOOTHING_RNG } |
enum | { QUAD_TREE_HYBRID_SIZE = 10000 } |
enum | { QUAD_TREE_NONE = 0 , QUAD_TREE_NORMAL , QUAD_TREE_FAST , QUAD_TREE_HYBRID } |
Functions | |
spring_electrical_control | spring_electrical_control_new (void) |
void | spring_electrical_control_print (spring_electrical_control ctrl) |
void | spring_electrical_embedding (int dim, SparseMatrix A0, spring_electrical_control ctrl, double *x, int *flag) |
void | spring_electrical_embedding_fast (int dim, SparseMatrix A0, spring_electrical_control ctrl, double *x, int *flag) |
void | multilevel_spring_electrical_embedding (int dim, SparseMatrix A0, spring_electrical_control ctrl, double *label_sizes, double *x, int n_edge_label_nodes, int *edge_label_nodes, int *flag) |
void | spring_electrical_control_delete (spring_electrical_control ctrl) |
double | average_edge_length (SparseMatrix A, int dim, double *coord) |
void | spring_electrical_spring_embedding (int dim, SparseMatrix A, SparseMatrix D, spring_electrical_control ctrl, double *x, int *flag) |
void | pcp_rotate (int n, int dim, double *x) |
#define AUTOP -1.0001234 |
Definition at line 19 of file spring_electrical.h.
typedef struct spring_electrical_control_struct* spring_electrical_control |
Definition at line 53 of file spring_electrical.h.
anonymous enum |
Enumerator | |
---|---|
ERROR_NOT_SQUARE_MATRIX |
Definition at line 16 of file spring_electrical.h.
anonymous enum |
Enumerator | |
---|---|
SMOOTHING_NONE | |
SMOOTHING_STRESS_MAJORIZATION_GRAPH_DIST | |
SMOOTHING_STRESS_MAJORIZATION_AVG_DIST | |
SMOOTHING_STRESS_MAJORIZATION_POWER_DIST | |
SMOOTHING_SPRING | |
SMOOTHING_TRIANGLE | |
SMOOTHING_RNG |
Definition at line 21 of file spring_electrical.h.
anonymous enum |
Enumerator | |
---|---|
QUAD_TREE_HYBRID_SIZE |
Definition at line 23 of file spring_electrical.h.
anonymous enum |
Enumerator | |
---|---|
QUAD_TREE_NONE | |
QUAD_TREE_NORMAL | |
QUAD_TREE_FAST | |
QUAD_TREE_HYBRID |
Definition at line 25 of file spring_electrical.h.
double average_edge_length | ( | SparseMatrix | A, |
int | dim, | ||
double * | coord | ||
) |
Definition at line 155 of file spring_electrical.c.
References A, coord(), dim, dist(), and SparseMatrix_is_symmetric().
Referenced by spring_electrical_embedding(), spring_electrical_embedding_fast(), spring_electrical_embedding_slow(), and spring_electrical_spring_embedding().
void multilevel_spring_electrical_embedding | ( | int | dim, |
SparseMatrix | A0, | ||
spring_electrical_control | ctrl, | ||
double * | label_sizes, | ||
double * | x, | ||
int | n_edge_label_nodes, | ||
int * | edge_label_nodes, | ||
int * | flag | ||
) |
Definition at line 1081 of file spring_electrical.c.
References A, spring_electrical_control_struct::adaptive_cooling, attach_edge_label_coordinates(), AUTOP, dim, spring_electrical_control_struct::do_shrinking, spring_electrical_control_struct::edge_labeling_scheme, ELSCHEME_STRAIGHTLINE_PENALTY, ELSCHEME_STRAIGHTLINE_PENALTY2, free(), grid, gv_calloc(), spring_electrical_control_struct::initial_scaling, spring_electrical_control_struct::K, MATRIX_TYPE_REAL, Multilevel_control::maxlevel, Multilevel_delete(), Multilevel_get_coarsest(), Multilevel_is_coarsest, Multilevel_is_finest, Multilevel_new(), multilevel_spring_electrical_embedding(), spring_electrical_control_struct::multilevels, NULL, spring_electrical_control_struct::overlap, spring_electrical_control_struct::p, pcp_rotate(), post_process_smoothing(), power_law_graph(), print_padding(), prolongate(), QUAD_TREE_FAST, QUAD_TREE_HYBRID, QUAD_TREE_HYBRID_SIZE, QUAD_TREE_NONE, spring_electrical_control_struct::random_start, remove_overlap(), RETURN, rotate(), spring_electrical_control_struct::rotation, shorting_edge_label_nodes(), SparseMatrix_delete(), SparseMatrix_get_real_adjacency_matrix_symmetrized(), SparseMatrix_is_symmetric(), SparseMatrix_remove_diagonal(), spring_electrical_embedding(), spring_electrical_embedding_fast(), spring_electrical_embedding_slow(), spring_electrical_control_struct::step, spring_electrical_control_struct::tscheme, and Verbose.
Referenced by multilevel_spring_electrical_embedding(), and sfdpLayout().
void pcp_rotate | ( | int | n, |
int | dim, | ||
double * | x | ||
) |
Definition at line 890 of file spring_electrical.c.
References center(), dim, and dist().
Referenced by multilevel_spring_electrical_embedding().
void spring_electrical_control_delete | ( | spring_electrical_control | ctrl | ) |
Definition at line 72 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 48 of file spring_electrical.c.
References spring_electrical_control_struct::adaptive_cooling, AUTOP, spring_electrical_control_struct::beautify_leaves, spring_electrical_control_struct::do_shrinking, spring_electrical_control_struct::edge_labeling_scheme, gv_alloc(), spring_electrical_control_struct::initial_scaling, spring_electrical_control_struct::K, spring_electrical_control_struct::max_qtree_level, spring_electrical_control_struct::maxiter, spring_electrical_control_struct::multilevels, spring_electrical_control_struct::overlap, spring_electrical_control_struct::p, QUAD_TREE_HYBRID, 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, and spring_electrical_control_struct::tscheme.
Referenced by sfdp_layout(), and SpringSmoother_new().
void spring_electrical_control_print | ( | spring_electrical_control | ctrl | ) |
Definition at line 84 of file spring_electrical.c.
References spring_electrical_control_struct::adaptive_cooling, spring_electrical_control_struct::beautify_leaves, bh, C, cool, spring_electrical_control_struct::do_shrinking, spring_electrical_control_struct::edge_labeling_scheme, spring_electrical_control_struct::initial_scaling, spring_electrical_control_struct::K, spring_electrical_control_struct::max_qtree_level, spring_electrical_control_struct::maxiter, spring_electrical_control_struct::multilevels, spring_electrical_control_struct::overlap, spring_electrical_control_struct::p, quadtree_size, spring_electrical_control_struct::random_seed, spring_electrical_control_struct::random_start, spring_electrical_control_struct::rotation, spring_electrical_control_struct::smoothing, smoothings, spring_electrical_control_struct::step, tol, spring_electrical_control_struct::tscheme, and tschemes.
Referenced by sfdp_layout().
void spring_electrical_embedding | ( | int | dim, |
SparseMatrix | A0, | ||
spring_electrical_control | ctrl, | ||
double * | x, | ||
int * | flag | ||
) |
Definition at line 519 of file spring_electrical.c.
References A, spring_electrical_control_struct::adaptive_cooling, average_edge_length(), beautify_leaves(), spring_electrical_control_struct::beautify_leaves, bh, C, center(), dim, dist(), distance(), distance_cropped(), drand(), ERROR_NOT_SQUARE_MATRIX, F, FORMAT_CSR, free(), gv_calloc(), spring_electrical_control_struct::K, MAX, spring_electrical_control_struct::max_qtree_level, spring_electrical_control_struct::maxiter, MINDIST, NULL, oned_optimizer_get(), oned_optimizer_new(), oned_optimizer_train(), spring_electrical_control_struct::p, QuadTree_delete(), QuadTree_get_supernodes(), QuadTree_new_from_point_list(), quadtree_size, spring_electrical_control_struct::random_seed, spring_electrical_control_struct::random_start, RETURN, SparseMatrix_delete(), SparseMatrix_symmetrize(), spring_electrical_control_struct::step, tol, update_step(), and Verbose.
Referenced by multilevel_spring_electrical_embedding().
void spring_electrical_embedding_fast | ( | int | dim, |
SparseMatrix | A0, | ||
spring_electrical_control | ctrl, | ||
double * | x, | ||
int * | flag | ||
) |
Definition at line 246 of file spring_electrical.c.
References A, spring_electrical_control_struct::adaptive_cooling, average_edge_length(), beautify_leaves(), spring_electrical_control_struct::beautify_leaves, bh, C, dim, dist(), distance(), drand(), ERROR_NOT_SQUARE_MATRIX, F, FORMAT_CSR, free(), gv_calloc(), spring_electrical_control_struct::K, spring_electrical_control_struct::max_qtree_level, spring_electrical_control_struct::maxiter, NULL, oned_optimizer_get(), oned_optimizer_new(), oned_optimizer_train(), spring_electrical_control_struct::p, QuadTree_delete(), QuadTree_get_repulsive_force(), QuadTree_new_from_point_list(), spring_electrical_control_struct::random_seed, spring_electrical_control_struct::random_start, RETURN, SparseMatrix_delete(), SparseMatrix_symmetrize(), spring_electrical_control_struct::step, tol, update_step(), and Verbose.
Referenced by multilevel_spring_electrical_embedding().
void spring_electrical_spring_embedding | ( | int | dim, |
SparseMatrix | A, | ||
SparseMatrix | D, | ||
spring_electrical_control | ctrl, | ||
double * | x, | ||
int * | flag | ||
) |
Definition at line 686 of file spring_electrical.c.
References A, spring_electrical_control_struct::adaptive_cooling, average_edge_length(), beautify_leaves(), spring_electrical_control_struct::beautify_leaves, bh, C, center(), D, dim, dist(), distance(), distance_cropped(), drand(), ERROR_NOT_SQUARE_MATRIX, F, FORMAT_CSR, free(), gv_calloc(), spring_electrical_control_struct::K, MAX, spring_electrical_control_struct::maxiter, MINDIST, NULL, spring_electrical_control_struct::p, QuadTree_delete(), QuadTree_get_supernodes(), QuadTree_new_from_point_list(), quadtree_size, spring_electrical_control_struct::random_seed, spring_electrical_control_struct::random_start, RETURN, SparseMatrix_delete(), SparseMatrix_symmetrize(), spring_electrical_control_struct::step, tol, and update_step().
Referenced by SpringSmoother_smooth().