|
Graphviz 14.0.3~dev.20251028.0232
|
#include "config.h"#include <assert.h>#include <time.h>#include <string.h>#include <math.h>#include <stdbool.h>#include <stdlib.h>#include <common/types.h>#include <common/globals.h>#include <sfdpgen/sparse_solve.h>#include <sfdpgen/post_process.h>#include <neatogen/overlap.h>#include <sfdpgen/spring_electrical.h>#include <neatogen/call_tri.h>#include <sfdpgen/sfdp.h>#include <util/alloc.h>#include <util/exit.h>#include <util/gv_math.h>#include <util/unused.h>Go to the source code of this file.
Macros | |
| #define | node_degree(i) (ia[(i)+1] - ia[(i)]) |
| #define node_degree | ( | i | ) | (ia[(i)+1] - ia[(i)]) |
Definition at line 33 of file post_process.c.
|
static |
Definition at line 418 of file post_process.c.
References relative_position_constraints_struct::A_constr, relative_position_constraints_struct::constr_nodes, relative_position_constraints_struct::constr_penalty, dim, dist(), distance_cropped(), relative_position_constraints_struct::edge_labeling_scheme, ELSCHEME_PENALTY, ELSCHEME_PENALTY2, ELSCHEME_STRAIGHTLINE_PENALTY, ELSCHEME_STRAIGHTLINE_PENALTY2, gv_calloc(), SparseMatrix_struct::ia, relative_position_constraints_struct::irn, SparseMatrix_struct::ja, relative_position_constraints_struct::jcn, MATRIX_TYPE_REAL, relative_position_constraints_struct::n_constr_nodes, NULL, SparseMatrix_from_coordinate_arrays(), and relative_position_constraints_struct::val.
Referenced by StressMajorizationSmoother_smooth().
|
static |
Definition at line 519 of file post_process.c.
References dim, dist(), and distance().
Referenced by StressMajorizationSmoother_smooth().
|
static |
Definition at line 35 of file post_process.c.
References A, D, dim, distance(), free(), gv_calloc(), len(), MATRIX_TYPE_REAL, node_degree, SparseMatrix_copy(), and SparseMatrix_is_symmetric().
Referenced by SpringSmoother_new(), and StressMajorizationSmoother2_new().
| void post_process_smoothing | ( | int | dim, |
| SparseMatrix | A, | ||
| spring_electrical_control | ctrl, | ||
| double * | x | ||
| ) |
Definition at line 909 of file post_process.c.
References A, dim, IDEAL_AVG_DIST, IDEAL_GRAPH_DIST, IDEAL_POWER_DIST, spring_electrical_control::smoothing, SMOOTHING_RNG, SMOOTHING_SPRING, SMOOTHING_STRESS_MAJORIZATION_AVG_DIST, SMOOTHING_STRESS_MAJORIZATION_GRAPH_DIST, SMOOTHING_STRESS_MAJORIZATION_POWER_DIST, SMOOTHING_TRIANGLE, SpringSmoother_delete(), SpringSmoother_new(), SpringSmoother_smooth(), StressMajorizationSmoother2_new(), StressMajorizationSmoother_delete(), StressMajorizationSmoother_smooth(), TriangleSmoother_delete(), TriangleSmoother_new(), TriangleSmoother_smooth(), and Verbose.
Referenced by multilevel_spring_electrical_embedding().
| void SparseStressMajorizationSmoother_delete | ( | SparseStressMajorizationSmoother | sm | ) |
Definition at line 409 of file post_process.c.
References StressMajorizationSmoother_delete().
Referenced by stress_model().
| StressMajorizationSmoother SparseStressMajorizationSmoother_new | ( | SparseMatrix | A, |
| int | dim, | ||
| double * | x | ||
| ) |
Definition at line 293 of file post_process.c.
References A, SparseMatrix_struct::a, StressMajorizationSmoother_struct::D, StressMajorizationSmoother_struct::data, dim, dist(), distance(), drand(), FORMAT_CSR, gv_alloc(), gv_calloc(), SparseMatrix_struct::ia, is_exactly_equal(), SparseMatrix_struct::ja, StressMajorizationSmoother_struct::lambda, StressMajorizationSmoother_struct::Lw, StressMajorizationSmoother_struct::Lwd, MATRIX_TYPE_REAL, StressMajorizationSmoother_struct::maxit_cg, NULL, SparseMatrix_struct::nz, StressMajorizationSmoother_struct::scaling, StressMajorizationSmoother_struct::scheme, SM_SCHEME_NORMAL, SparseMatrix_is_symmetric(), SparseMatrix_new(), StressMajorizationSmoother_delete(), and StressMajorizationSmoother_struct::tol_cg.
Referenced by stress_model().
| double SparseStressMajorizationSmoother_smooth | ( | SparseStressMajorizationSmoother | sm, |
| int | dim, | ||
| double * | x, | ||
| int | maxit_sm | ||
| ) |
Definition at line 414 of file post_process.c.
References dim, and StressMajorizationSmoother_smooth().
Referenced by stress_model().
| void SpringSmoother_delete | ( | SpringSmoother | sm | ) |
Definition at line 894 of file post_process.c.
References SpringSmoother_struct::D, and SparseMatrix_delete().
Referenced by post_process_smoothing().
| SpringSmoother SpringSmoother_new | ( | SparseMatrix | A, |
| int | dim, | ||
| spring_electrical_control | ctrl, | ||
| double * | x | ||
| ) |
Definition at line 792 of file post_process.c.
References A, SparseMatrix_struct::a, SpringSmoother_struct::ctrl, SpringSmoother_struct::D, dim, distance(), FORMAT_CSR, free(), gv_alloc(), gv_calloc(), SparseMatrix_struct::ia, ID, id, ideal_distance_matrix(), SparseMatrix_struct::ja, MATRIX_TYPE_REAL, spring_electrical_control::maxiter, spring_electrical_control::multilevels, NULL, SparseMatrix_struct::nz, spring_electrical_control::random_start, SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_new(), and spring_electrical_control::step.
Referenced by post_process_smoothing().
| void SpringSmoother_smooth | ( | SpringSmoother | sm, |
| SparseMatrix | A, | ||
| int | dim, | ||
| double * | x | ||
| ) |
Definition at line 899 of file post_process.c.
References A, SpringSmoother_struct::ctrl, SpringSmoother_struct::D, dim, and spring_electrical_spring_embedding().
Referenced by post_process_smoothing().
| StressMajorizationSmoother StressMajorizationSmoother2_new | ( | SparseMatrix | A, |
| int | dim, | ||
| double | lambda0, | ||
| double * | x, | ||
| int | ideal_dist_scheme | ||
| ) |
Definition at line 103 of file post_process.c.
References A, SparseMatrix_struct::a, StressMajorizationSmoother_struct::data, dim, dist(), distance(), distance_cropped(), FORMAT_CSR, free(), graphviz_exit(), gv_alloc(), gv_calloc(), SparseMatrix_struct::ia, ID, id, IDEAL_AVG_DIST, ideal_distance_matrix(), IDEAL_GRAPH_DIST, IDEAL_POWER_DIST, SparseMatrix_struct::ja, StressMajorizationSmoother_struct::lambda, StressMajorizationSmoother_struct::Lw, StressMajorizationSmoother_struct::Lwd, MATRIX_TYPE_REAL, StressMajorizationSmoother_struct::maxit_cg, NULL, SparseMatrix_struct::nz, StressMajorizationSmoother_struct::scaling, StressMajorizationSmoother_struct::scheme, SM_SCHEME_NORMAL, SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_new(), and StressMajorizationSmoother_struct::tol_cg.
Referenced by post_process_smoothing().
| void StressMajorizationSmoother_delete | ( | StressMajorizationSmoother | sm | ) |
Definition at line 673 of file post_process.c.
References StressMajorizationSmoother_struct::data, StressMajorizationSmoother_struct::data_deallocator, free(), StressMajorizationSmoother_struct::lambda, StressMajorizationSmoother_struct::Lw, StressMajorizationSmoother_struct::Lwd, and SparseMatrix_delete().
Referenced by post_process_smoothing(), SparseStressMajorizationSmoother_delete(), SparseStressMajorizationSmoother_new(), and TriangleSmoother_delete().
| double StressMajorizationSmoother_smooth | ( | StressMajorizationSmoother | sm, |
| int | dim, | ||
| double * | x, | ||
| int | maxit_sm | ||
| ) |
Definition at line 538 of file post_process.c.
References SparseMatrix_struct::a, StressMajorizationSmoother_struct::data, dim, dist(), distance(), drand(), free(), get_edge_label_matrix(), get_stress(), SparseMatrix_struct::ia, id, SparseMatrix_struct::ja, StressMajorizationSmoother_struct::lambda, StressMajorizationSmoother_struct::Lw, StressMajorizationSmoother_struct::Lwd, SparseMatrix_struct::m, StressMajorizationSmoother_struct::maxit_cg, NULL, RETURN, StressMajorizationSmoother_struct::scaling, StressMajorizationSmoother_struct::scheme, SM_SCHEME_NORMAL_ELABEL, SparseMatrix_add(), SparseMatrix_copy(), SparseMatrix_delete(), SparseMatrix_multiply_dense(), SparseMatrix_solve(), tol, StressMajorizationSmoother_struct::tol_cg, total_distance(), vector_product(), and Verbose.
Referenced by post_process_smoothing(), SparseStressMajorizationSmoother_smooth(), and TriangleSmoother_smooth().
|
static |
Definition at line 392 of file post_process.c.
Referenced by StressMajorizationSmoother_smooth().
| void TriangleSmoother_delete | ( | TriangleSmoother | sm | ) |
Definition at line 781 of file post_process.c.
References StressMajorizationSmoother_delete().
Referenced by post_process_smoothing(), and TriangleSmoother_new().
| TriangleSmoother TriangleSmoother_new | ( | SparseMatrix | A, |
| int | dim, | ||
| double * | x, | ||
| bool | use_triangularization | ||
| ) |
Definition at line 682 of file post_process.c.
References A, SparseMatrix_struct::a, B, call_tri(), call_tri2(), StressMajorizationSmoother_struct::data, dim, dist(), distance(), distance_cropped(), free(), gv_alloc(), gv_calloc(), SparseMatrix_struct::ia, SparseMatrix_struct::ja, StressMajorizationSmoother_struct::lambda, StressMajorizationSmoother_struct::Lw, StressMajorizationSmoother_struct::Lwd, StressMajorizationSmoother_struct::maxit_cg, NULL, StressMajorizationSmoother_struct::scaling, StressMajorizationSmoother_struct::scheme, SM_SCHEME_NORMAL, SparseMatrix_add(), SparseMatrix_copy(), SparseMatrix_delete(), SparseMatrix_is_symmetric(), StressMajorizationSmoother_struct::tol_cg, TriangleSmoother_delete(), and TriangleSmoother_struct.
Referenced by post_process_smoothing().
| void TriangleSmoother_smooth | ( | TriangleSmoother | sm, |
| int | dim, | ||
| double * | x | ||
| ) |
Definition at line 787 of file post_process.c.
References dim, and StressMajorizationSmoother_smooth().
Referenced by post_process_smoothing().