Graphviz
2.41.20171026.1811
|
#include "config.h"
#include <time.h>
#include <string.h>
#include <math.h>
#include "types.h"
#include "memory.h"
#include "globals.h"
#include "sparse_solve.h"
#include "post_process.h"
#include "overlap.h"
#include "spring_electrical.h"
#include "call_tri.h"
#include "sfdpinternal.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 31 of file post_process.c.
Referenced by ideal_distance_matrix().
real get_stress | ( | int | m, |
int | dim, | ||
int * | iw, | ||
int * | jw, | ||
real * | w, | ||
real * | d, | ||
real * | x, | ||
real | scaling, | ||
void * | data, | ||
int | weighted | ||
) |
Definition at line 765 of file post_process.c.
References dist(), distance(), and real.
Referenced by StressMajorizationSmoother_smooth().
SparseMatrix ideal_distance_matrix | ( | SparseMatrix | A, |
int | dim, | ||
real * | x | ||
) |
Definition at line 251 of file post_process.c.
References SparseMatrix_struct::a, assert, distance(), FALSE, FREE, SparseMatrix_struct::ia, SparseMatrix_struct::ja, SparseMatrix_struct::m, MATRIX_TYPE_REAL, N_GNEW, node_degree, NULL, SparseMatrix_struct::nz, real, SparseMatrix_copy(), SparseMatrix_is_symmetric(), and SparseMatrix_struct::type.
Referenced by SpringSmoother_new(), and StressMajorizationSmoother2_new().
void post_process_smoothing | ( | int | dim, |
SparseMatrix | A, | ||
spring_electrical_control | ctrl, | ||
real * | node_weights, | ||
real * | x, | ||
int * | flag | ||
) |
Definition at line 1268 of file post_process.c.
References FALSE, IDEAL_AVG_DIST, IDEAL_GRAPH_DIST, IDEAL_POWER_DIST, SparseMatrix_struct::m, real, spring_electrical_control_struct::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(), TRUE, and Verbose.
void SparseStressMajorizationSmoother_delete | ( | SparseStressMajorizationSmoother | sm | ) |
Definition at line 652 of file post_process.c.
References StressMajorizationSmoother_delete().
Referenced by stress_model_core().
StressMajorizationSmoother SparseStressMajorizationSmoother_new | ( | SparseMatrix | A, |
int | dim, | ||
real | lambda0, | ||
real * | x, | ||
int | weighting_scheme, | ||
int | scale_initial_coord | ||
) |
Definition at line 513 of file post_process.c.
References SparseMatrix_struct::a, assert, StressMajorizationSmoother_struct::D, StressMajorizationSmoother_struct::data, dist(), distance(), drand(), FALSE, FORMAT_CSR, SparseMatrix_struct::ia, int, SparseMatrix_struct::ja, StressMajorizationSmoother_struct::lambda, StressMajorizationSmoother_struct::Lw, StressMajorizationSmoother_struct::Lwd, SparseMatrix_struct::m, MALLOC, MATRIX_TYPE_REAL, StressMajorizationSmoother_struct::maxit_cg, NULL, SparseMatrix_struct::nz, real, StressMajorizationSmoother_struct::scaling, StressMajorizationSmoother_struct::scheme, SM_SCHEME_NORMAL, SparseMatrix_is_symmetric(), SparseMatrix_new(), StressMajorizationSmoother_delete(), StressMajorizationSmoother_struct::tol_cg, SparseMatrix_struct::type, WEIGHTING_SCHEME_INV_DIST, WEIGHTING_SCHEME_NONE, and WEIGHTING_SCHEME_SQR_DIST.
Referenced by stress_model_core().
real SparseStressMajorizationSmoother_smooth | ( | SparseStressMajorizationSmoother | sm, |
int | dim, | ||
real * | x, | ||
int | maxit_sm, | ||
real | tol | ||
) |
Definition at line 657 of file post_process.c.
References StressMajorizationSmoother_smooth().
Referenced by stress_model_core().
void SpringSmoother_delete | ( | SpringSmoother | sm | ) |
Definition at line 1249 of file post_process.c.
References SpringSmoother_struct::ctrl, SpringSmoother_struct::D, SparseMatrix_delete(), and spring_electrical_control_delete().
Referenced by post_process_smoothing(), and SpringSmoother_new().
SpringSmoother SpringSmoother_new | ( | SparseMatrix | A, |
int | dim, | ||
spring_electrical_control | ctrl, | ||
real * | x | ||
) |
Definition at line 1141 of file post_process.c.
References SparseMatrix_struct::a, assert, SpringSmoother_struct::ctrl, SpringSmoother_struct::D, distance(), FALSE, for(), FORMAT_CSR, FREE, SparseMatrix_struct::ia, ID, ideal_distance_matrix(), SparseMatrix_struct::ja, SparseMatrix_struct::m, MATRIX_TYPE_REAL, spring_electrical_control_struct::maxiter, spring_electrical_control_struct::multilevels, N_GNEW, NULL, SparseMatrix_struct::nz, spring_electrical_control_struct::random_start, real, SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_new(), spring_electrical_control_new(), SpringSmoother_delete(), and spring_electrical_control_struct::step.
Referenced by post_process_smoothing().
void SpringSmoother_smooth | ( | SpringSmoother | sm, |
SparseMatrix | A, | ||
real * | node_weights, | ||
int | dim, | ||
real * | x | ||
) |
Definition at line 1258 of file post_process.c.
References assert, SpringSmoother_struct::ctrl, SpringSmoother_struct::D, and spring_electrical_spring_embedding().
Referenced by post_process_smoothing().
StressMajorizationSmoother StressMajorizationSmoother2_new | ( | SparseMatrix | A, |
int | dim, | ||
real | lambda0, | ||
real * | x, | ||
int | ideal_dist_scheme | ||
) |
Definition at line 320 of file post_process.c.
References SparseMatrix_struct::a, assert, StressMajorizationSmoother_struct::data, dist(), distance(), distance_cropped(), FALSE, FORMAT_CSR, FREE, GNEW, SparseMatrix_struct::ia, ID, IDEAL_AVG_DIST, ideal_distance_matrix(), IDEAL_GRAPH_DIST, IDEAL_POWER_DIST, int, SparseMatrix_struct::ja, StressMajorizationSmoother_struct::lambda, StressMajorizationSmoother_struct::Lw, StressMajorizationSmoother_struct::Lwd, SparseMatrix_struct::m, MATRIX_TYPE_REAL, StressMajorizationSmoother_struct::maxit_cg, N_GNEW, NULL, SparseMatrix_struct::nz, real, StressMajorizationSmoother_struct::scaling, StressMajorizationSmoother_struct::scheme, SM_SCHEME_NORMAL, SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_new(), StressMajorizationSmoother_delete(), and StressMajorizationSmoother_struct::tol_cg.
Referenced by post_process_smoothing().
void StressMajorizationSmoother_delete | ( | StressMajorizationSmoother | sm | ) |
Definition at line 1017 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(), StressMajorizationSmoother2_new(), TriangleSmoother_delete(), UniformStressSmoother_delete(), and UniformStressSmoother_new().
real StressMajorizationSmoother_smooth | ( | StressMajorizationSmoother | sm, |
int | dim, | ||
real * | x, | ||
int | maxit_sm, | ||
real | tol | ||
) |
Definition at line 812 of file post_process.c.
References SparseMatrix_struct::a, assert, StressMajorizationSmoother_struct::data, dist(), distance(), drand(), FALSE, FREE, get_stress(), SparseMatrix_struct::ia, if(), SparseMatrix_struct::ja, StressMajorizationSmoother_struct::lambda, StressMajorizationSmoother_struct::Lw, StressMajorizationSmoother_struct::Lwd, SparseMatrix_struct::m, MALLOC, StressMajorizationSmoother_struct::maxit_cg, MEMCPY, N_GNEW, NULL, real, StressMajorizationSmoother_struct::scaling, StressMajorizationSmoother_struct::scheme, SM_SCHEME_MAXENT, SM_SCHEME_NORMAL_ELABEL, SM_SCHEME_STRESS, SM_SCHEME_STRESS_APPROX, SM_SCHEME_UNIFORM_STRESS, SOLVE_METHOD_CG, SparseMatrix_add(), SparseMatrix_copy(), SparseMatrix_delete(), SparseMatrix_multiply_dense(), SparseMatrix_solve(), StressMajorizationSmoother_struct::tol_cg, vector_product(), and Verbose.
Referenced by post_process_smoothing(), SparseStressMajorizationSmoother_smooth(), TriangleSmoother_smooth(), and UniformStressSmoother_smooth().
void TriangleSmoother_delete | ( | TriangleSmoother | sm | ) |
Definition at line 1126 of file post_process.c.
References StressMajorizationSmoother_delete().
Referenced by post_process_smoothing(), and TriangleSmoother_new().
TriangleSmoother TriangleSmoother_new | ( | SparseMatrix | A, |
int | dim, | ||
real | lambda0, | ||
real * | x, | ||
int | use_triangularization | ||
) |
Definition at line 1027 of file post_process.c.
References SparseMatrix_struct::a, assert, call_tri(), call_tri2(), StressMajorizationSmoother_struct::data, dist(), distance(), distance_cropped(), FALSE, FREE, SparseMatrix_struct::ia, if(), int, SparseMatrix_struct::ja, StressMajorizationSmoother_struct::lambda, StressMajorizationSmoother_struct::Lw, StressMajorizationSmoother_struct::Lwd, SparseMatrix_struct::m, StressMajorizationSmoother_struct::maxit_cg, N_GNEW, NULL, real, 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, | ||
real * | x | ||
) |
Definition at line 1132 of file post_process.c.
References StressMajorizationSmoother_smooth().
Referenced by post_process_smoothing().