Graphviz
2.41.20171026.1811
|
#include <SparseMatrix.h>
Go to the source code of this file.
Data Structures | |
struct | spring_electrical_control_struct |
struct | oned_optimizer_struct |
Macros | |
#define | AUTOP -1.0001234 |
Typedefs | |
typedef struct spring_electrical_control_struct * | spring_electrical_control |
typedef struct oned_optimizer_struct * | oned_optimizer |
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 } |
enum | { METHOD_STA = -1, METHOD_SPRING_ELECTRICAL, METHOD_SPRING_MAXENT, METHOD_STRESS_MAXENT, METHOD_STRESS_APPROX, METHOD_STRESS, METHOD_UNIFORM_STRESS, METHOD_FULL_STRESS, METHOD_NONE, METHOD_STO } |
enum | { MAX_I = 20, OPT_UP = 1, OPT_DOWN = -1, OPT_INIT = 0 } |
#define AUTOP -1.0001234 |
Definition at line 22 of file spring_electrical.h.
Referenced by spring_electrical_control_new().
typedef struct oned_optimizer_struct* oned_optimizer |
Definition at line 94 of file spring_electrical.h.
typedef struct spring_electrical_control_struct* spring_electrical_control |
Definition at line 68 of file spring_electrical.h.
anonymous enum |
Enumerator | |
---|---|
ERROR_NOT_SQUARE_MATRIX |
Definition at line 19 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 24 of file spring_electrical.h.
anonymous enum |
Enumerator | |
---|---|
QUAD_TREE_HYBRID_SIZE |
Definition at line 26 of file spring_electrical.h.
anonymous enum |
Enumerator | |
---|---|
QUAD_TREE_NONE | |
QUAD_TREE_NORMAL | |
QUAD_TREE_FAST | |
QUAD_TREE_HYBRID |
Definition at line 28 of file spring_electrical.h.
anonymous enum |
Enumerator | |
---|---|
METHOD_STA | |
METHOD_SPRING_ELECTRICAL | |
METHOD_SPRING_MAXENT | |
METHOD_STRESS_MAXENT | |
METHOD_STRESS_APPROX | |
METHOD_STRESS | |
METHOD_UNIFORM_STRESS | |
METHOD_FULL_STRESS | |
METHOD_NONE | |
METHOD_STO |
Definition at line 30 of file spring_electrical.h.
anonymous enum |
Enumerator | |
---|---|
MAX_I | |
OPT_UP | |
OPT_DOWN | |
OPT_INIT |
Definition at line 88 of file spring_electrical.h.
real average_edge_length | ( | SparseMatrix | A, |
int | dim, | ||
real * | coord | ||
) |
Definition at line 162 of file spring_electrical.c.
References assert, dist(), SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, real, SparseMatrix_is_symmetric(), and TRUE.
Referenced by spring_electrical_embedding(), spring_electrical_embedding_fast(), spring_electrical_embedding_slow(), and spring_electrical_spring_embedding().
void export_embedding | ( | FILE * | fp, |
int | dim, | ||
SparseMatrix | A, | ||
real * | x, | ||
real * | width | ||
) |
Definition at line 218 of file spring_electrical.c.
References SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MAX, MIN, real, xmax, xmin, ymax, and ymin.
Referenced by spring_electrical_embedding(), spring_electrical_embedding_slow(), spring_electrical_spring_embedding(), and spring_maxent_embedding().
Definition at line 451 of file spring_electrical.c.
void interpolate_coord | ( | int | dim, |
SparseMatrix | A, | ||
real * | x | ||
) |
Definition at line 1789 of file spring_electrical.c.
References alpha, FREE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MALLOC, and real.
void multilevel_spring_electrical_embedding | ( | int | dim, |
SparseMatrix | A0, | ||
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 | ) |
Definition at line 107 of file spring_electrical.c.
References FREE.
Referenced by spring_electrical_embedding(), spring_electrical_embedding_fast(), and spring_electrical_embedding_slow().
int oned_optimizer_get | ( | oned_optimizer | opt | ) |
Definition at line 157 of file spring_electrical.c.
References oned_optimizer_struct::i.
Referenced by spring_electrical_embedding(), spring_electrical_embedding_fast(), and spring_electrical_embedding_slow().
oned_optimizer oned_optimizer_new | ( | int | i | ) |
Definition at line 111 of file spring_electrical.c.
References oned_optimizer_struct::direction, oned_optimizer_struct::i, MALLOC, and OPT_INIT.
Referenced by spring_electrical_embedding(), spring_electrical_embedding_fast(), and spring_electrical_embedding_slow().
void oned_optimizer_train | ( | oned_optimizer | opt, |
real | work | ||
) |
Definition at line 119 of file spring_electrical.c.
References assert, oned_optimizer_struct::direction, oned_optimizer_struct::i, MAX, MAX_I, MIN, OPT_DOWN, OPT_INIT, OPT_UP, and oned_optimizer_struct::work.
Referenced by spring_electrical_embedding(), spring_electrical_embedding_fast(), and spring_electrical_embedding_slow().
Definition at line 1858 of file spring_electrical.c.
int power_law_graph | ( | SparseMatrix | A | ) |
Definition at line 1834 of file spring_electrical.c.
References FALSE, FREE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MALLOC, MAX, max, and TRUE.
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 | ) |
Definition at line 89 of file spring_electrical.c.
References spring_electrical_control_struct::adaptive_cooling, spring_electrical_control_struct::beautify_leaves, spring_electrical_control_struct::bh, spring_electrical_control_struct::C, spring_electrical_control_struct::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::method, 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, 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, spring_electrical_control_struct::step, spring_electrical_control_struct::tol, spring_electrical_control_struct::tscheme, and spring_electrical_control_struct::use_node_weights.
Referenced by sfdp_layout().
void spring_electrical_embedding | ( | int | dim, |
SparseMatrix | A0, | ||
spring_electrical_control | ctrl, | ||
real * | node_weights, | ||
real * | x, | ||
int * | flag | ||
) |
Definition at line 948 of file spring_electrical.c.
References spring_electrical_control_struct::adaptive_cooling, assert, average_edge_length(), spring_electrical_control_struct::beautify_leaves, spring_electrical_control_struct::bh, C, spring_electrical_control_struct::C, spring_electrical_control_struct::cool, dist(), distance(), distance_cropped(), drand(), ERROR_NOT_SQUARE_MATRIX, export_embedding(), FALSE, SparseMatrix_struct::format, FORMAT_CSR, FREE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, spring_electrical_control_struct::K, SparseMatrix_struct::m, MALLOC, MAX, spring_electrical_control_struct::max_qtree_level, spring_electrical_control_struct::maxiter, MEMCPY, MINDIST, SparseMatrix_struct::n, NULL, SparseMatrix_struct::nz, oned_optimizer_delete(), oned_optimizer_get(), oned_optimizer_new(), oned_optimizer_train(), spring_electrical_control_struct::p, QuadTree_delete(), QuadTree_get_supernodes(), QuadTree_new_from_point_list(), spring_electrical_control_struct::quadtree_size, spring_electrical_control_struct::random_seed, spring_electrical_control_struct::random_start, real, SparseMatrix_delete(), SparseMatrix_symmetrize(), spring_electrical_control_struct::step, spring_electrical_control_struct::tol, TRUE, spring_electrical_control_struct::use_node_weights, and Verbose.
void spring_electrical_embedding_fast | ( | int | dim, |
SparseMatrix | A0, | ||
spring_electrical_control | ctrl, | ||
real * | node_weights, | ||
real * | x, | ||
int * | flag | ||
) |
Definition at line 488 of file spring_electrical.c.
References spring_electrical_control_struct::adaptive_cooling, assert, average_edge_length(), spring_electrical_control_struct::beautify_leaves, spring_electrical_control_struct::bh, C, spring_electrical_control_struct::C, spring_electrical_control_struct::cool, dist(), distance(), drand(), ERROR_NOT_SQUARE_MATRIX, SparseMatrix_struct::format, FORMAT_CSR, FREE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, spring_electrical_control_struct::K, SparseMatrix_struct::m, MALLOC, spring_electrical_control_struct::max_qtree_level, spring_electrical_control_struct::maxiter, MEMCPY, SparseMatrix_struct::n, NULL, SparseMatrix_struct::nz, oned_optimizer_delete(), 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, real, SparseMatrix_delete(), SparseMatrix_symmetrize(), spring_electrical_control_struct::step, spring_electrical_control_struct::tol, TRUE, spring_electrical_control_struct::use_node_weights, and Verbose.
void spring_electrical_spring_embedding | ( | int | dim, |
SparseMatrix | A, | ||
SparseMatrix | D, | ||
spring_electrical_control | ctrl, | ||
real * | node_weights, | ||
real * | x, | ||
int * | flag | ||
) |
Definition at line 1535 of file spring_electrical.c.
References SparseMatrix_struct::a, spring_electrical_control_struct::adaptive_cooling, assert, average_edge_length(), spring_electrical_control_struct::beautify_leaves, spring_electrical_control_struct::bh, C, spring_electrical_control_struct::C, spring_electrical_control_struct::cool, dist(), distance(), distance_cropped(), drand(), ERROR_NOT_SQUARE_MATRIX, export_embedding(), FALSE, SparseMatrix_struct::format, FORMAT_CSR, FREE, SparseMatrix_struct::ia, if(), SparseMatrix_struct::ja, spring_electrical_control_struct::K, SparseMatrix_struct::m, MALLOC, MAX, spring_electrical_control_struct::maxiter, MEMCPY, MINDIST, SparseMatrix_struct::n, NULL, SparseMatrix_struct::nz, spring_electrical_control_struct::p, QuadTree_delete(), QuadTree_get_supernodes(), QuadTree_new_from_point_list(), spring_electrical_control_struct::quadtree_size, spring_electrical_control_struct::random_seed, spring_electrical_control_struct::random_start, real, SparseMatrix_delete(), SparseMatrix_symmetrize(), spring_electrical_control_struct::step, spring_electrical_control_struct::tol, TRUE, spring_electrical_control_struct::use_node_weights, and Verbose.
Referenced by SpringSmoother_smooth().