Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
post_process.c File Reference
#include "config.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/unused.h>
Include dependency graph for post_process.c:

Go to the source code of this file.

Macros

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

Functions

static SparseMatrix ideal_distance_matrix (SparseMatrix A, int dim, double *x)
 
StressMajorizationSmoother StressMajorizationSmoother2_new (SparseMatrix A, int dim, double lambda0, double *x, int ideal_dist_scheme)
 
StressMajorizationSmoother SparseStressMajorizationSmoother_new (SparseMatrix A, int dim, double *x)
 
static double total_distance (int m, int dim, double *x, double *y)
 
void SparseStressMajorizationSmoother_delete (SparseStressMajorizationSmoother sm)
 
double SparseStressMajorizationSmoother_smooth (SparseStressMajorizationSmoother sm, int dim, double *x, int maxit_sm)
 
static void get_edge_label_matrix (relative_position_constraints data, int m, int dim, double *x, SparseMatrix *LL, double **rhs)
 
static UNUSED double get_stress (int m, int dim, int *iw, int *jw, double *w, double *d, double *x, double scaling)
 
double StressMajorizationSmoother_smooth (StressMajorizationSmoother sm, int dim, double *x, int maxit_sm)
 
void StressMajorizationSmoother_delete (StressMajorizationSmoother sm)
 
TriangleSmoother TriangleSmoother_new (SparseMatrix A, int dim, double *x, bool use_triangularization)
 
void TriangleSmoother_delete (TriangleSmoother sm)
 
void TriangleSmoother_smooth (TriangleSmoother sm, int dim, double *x)
 
SpringSmoother SpringSmoother_new (SparseMatrix A, int dim, spring_electrical_control ctrl, double *x)
 
void SpringSmoother_delete (SpringSmoother sm)
 
void SpringSmoother_smooth (SpringSmoother sm, SparseMatrix A, int dim, double *x)
 
void post_process_smoothing (int dim, SparseMatrix A, spring_electrical_control ctrl, double *x)
 

Macro Definition Documentation

◆ node_degree

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

Definition at line 31 of file post_process.c.

Function Documentation

◆ get_edge_label_matrix()

static void get_edge_label_matrix ( relative_position_constraints  data,
int  m,
int  dim,
double *  x,
SparseMatrix LL,
double **  rhs 
)
static

Definition at line 414 of file post_process.c.

References dim, dist(), distance_cropped(), ELSCHEME_PENALTY, ELSCHEME_PENALTY2, ELSCHEME_STRAIGHTLINE_PENALTY, ELSCHEME_STRAIGHTLINE_PENALTY2, gv_calloc(), SparseMatrix_struct::ia, SparseMatrix_struct::ja, MATRIX_TYPE_REAL, NULL, and SparseMatrix_from_coordinate_arrays().

Referenced by StressMajorizationSmoother_smooth().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_stress()

static UNUSED double get_stress ( int  m,
int  dim,
int *  iw,
int *  jw,
double *  w,
double *  d,
double *  x,
double  scaling 
)
static

Definition at line 515 of file post_process.c.

References dim, dist(), and distance().

Referenced by StressMajorizationSmoother_smooth().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ideal_distance_matrix()

static SparseMatrix ideal_distance_matrix ( SparseMatrix  A,
int  dim,
double *  x 
)
static

Definition at line 33 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ post_process_smoothing()

void post_process_smoothing ( int  dim,
SparseMatrix  A,
spring_electrical_control  ctrl,
double *  x 
)

Definition at line 912 of file post_process.c.

References A, dim, IDEAL_AVG_DIST, IDEAL_GRAPH_DIST, IDEAL_POWER_DIST, 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(), and Verbose.

Referenced by multilevel_spring_electrical_embedding().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SparseStressMajorizationSmoother_delete()

void SparseStressMajorizationSmoother_delete ( SparseStressMajorizationSmoother  sm)

Definition at line 405 of file post_process.c.

References StressMajorizationSmoother_delete().

Referenced by stress_model().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SparseStressMajorizationSmoother_new()

StressMajorizationSmoother SparseStressMajorizationSmoother_new ( SparseMatrix  A,
int  dim,
double *  x 
)

◆ SparseStressMajorizationSmoother_smooth()

double SparseStressMajorizationSmoother_smooth ( SparseStressMajorizationSmoother  sm,
int  dim,
double *  x,
int  maxit_sm 
)

Definition at line 410 of file post_process.c.

References dim, and StressMajorizationSmoother_smooth().

Referenced by stress_model().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SpringSmoother_delete()

void SpringSmoother_delete ( SpringSmoother  sm)

Definition at line 893 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SpringSmoother_new()

SpringSmoother SpringSmoother_new ( SparseMatrix  A,
int  dim,
spring_electrical_control  ctrl,
double *  x 
)

Definition at line 787 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_struct::maxiter, spring_electrical_control_struct::multilevels, NULL, SparseMatrix_struct::nz, spring_electrical_control_struct::random_start, SparseMatrix_delete(), SparseMatrix_is_symmetric(), SparseMatrix_new(), spring_electrical_control_new(), SpringSmoother_delete(), and spring_electrical_control_struct::step.

Referenced by post_process_smoothing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SpringSmoother_smooth()

void SpringSmoother_smooth ( SpringSmoother  sm,
SparseMatrix  A,
int  dim,
double *  x 
)

Definition at line 902 of file post_process.c.

References A, SpringSmoother_struct::ctrl, SpringSmoother_struct::D, dim, and spring_electrical_spring_embedding().

Referenced by post_process_smoothing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StressMajorizationSmoother2_new()

StressMajorizationSmoother StressMajorizationSmoother2_new ( SparseMatrix  A,
int  dim,
double  lambda0,
double *  x,
int  ideal_dist_scheme 
)

◆ StressMajorizationSmoother_delete()

void StressMajorizationSmoother_delete ( StressMajorizationSmoother  sm)

Definition at line 668 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(), and TriangleSmoother_delete().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StressMajorizationSmoother_smooth()

◆ total_distance()

static double total_distance ( int  m,
int  dim,
double *  x,
double *  y 
)
static

Definition at line 388 of file post_process.c.

References dim, and dist().

Referenced by StressMajorizationSmoother_smooth().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TriangleSmoother_delete()

void TriangleSmoother_delete ( TriangleSmoother  sm)

Definition at line 776 of file post_process.c.

References StressMajorizationSmoother_delete().

Referenced by post_process_smoothing(), and TriangleSmoother_new().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TriangleSmoother_new()

TriangleSmoother TriangleSmoother_new ( SparseMatrix  A,
int  dim,
double *  x,
bool  use_triangularization 
)

◆ TriangleSmoother_smooth()

void TriangleSmoother_smooth ( TriangleSmoother  sm,
int  dim,
double *  x 
)

Definition at line 782 of file post_process.c.

References dim, and StressMajorizationSmoother_smooth().

Referenced by post_process_smoothing().

Here is the call graph for this function:
Here is the caller graph for this function: