Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
post_process.h
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (c) 2011 AT&T Intellectual Property
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * https://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors: Details at https://graphviz.org
9 *************************************************************************/
10
11#pragma once
12
14#include <stdbool.h>
15
17
19 SparseMatrix D;/* distance matrix. The diagonal is removed hence the ia, ja structure is different from Lw and Lwd!! */
20 SparseMatrix Lw;/* the weighted laplacian. with offdiag = -1/w_ij */
21 SparseMatrix Lwd;/* the laplacian like matrix with offdiag = -scaling*d_ij/w_ij. RHS in stress majorization = Lwd.x */
22 double* lambda;
23 void (*data_deallocator)(void*);
24 void *data;
25 int scheme;
26 double scaling;/* scaling. It is multiplied to Lwd. need to divide coordinate x at the end of the stress majorization process */
27 double tol_cg;/* tolerance and maxit for conjugate gradient that solves the Laplacian system.
28 typically the Laplacian only needs to be solved very crudely as it is part of an
29 outer iteration.*/
30 double maxit_cg;
31};
32
34
36
38StressMajorizationSmoother StressMajorizationSmoother2_new(SparseMatrix A, int dim, double lambda, double *x, int ideal_dist_scheme);
39
41/*-------------------- triangle/neirhborhood graph based smoother ------------------- */
43
44#define TriangleSmoother_struct StressMajorizationSmoother_struct
45
47
49 bool use_triangularization);
50
51void TriangleSmoother_smooth(TriangleSmoother sm, int dim, double *x);
52
53
54
55/*------------------ spring and spring-electrical based smoother */
56
61
63
65
67
68void SpringSmoother_smooth(SpringSmoother sm, SparseMatrix A, int dim, double *x);
69/*------------------------------------------------------------------*/
70
72
73/*-------------------- sparse stress majorizationp ------------------- */
75
76#define SparseStressMajorizationSmoother_struct StressMajorizationSmoother_struct
77
79
82
84
85/*--------------------------------------------------------------*/
#define A(n, t)
Definition expr.h:76
static const int dim
struct SpringSmoother_struct * SpringSmoother
@ SM_SCHEME_NORMAL_ELABEL
@ SM_SCHEME_STRESS
@ SM_SCHEME_NORMAL
@ IDEAL_GRAPH_DIST
@ IDEAL_AVG_DIST
@ IDEAL_POWER_DIST
SparseStressMajorizationSmoother SparseStressMajorizationSmoother_new(SparseMatrix A, int dim, double *x)
StressMajorizationSmoother SparseStressMajorizationSmoother
void SparseStressMajorizationSmoother_delete(SparseStressMajorizationSmoother sm)
TriangleSmoother TriangleSmoother_new(SparseMatrix A, int dim, double *x, bool use_triangularization)
StressMajorizationSmoother TriangleSmoother
double StressMajorizationSmoother_smooth(StressMajorizationSmoother sm, int dim, double *x, int maxit)
void SpringSmoother_delete(SpringSmoother sm)
double SparseStressMajorizationSmoother_smooth(SparseStressMajorizationSmoother sm, int dim, double *x, int maxit_sm)
struct StressMajorizationSmoother_struct * StressMajorizationSmoother
void post_process_smoothing(int dim, SparseMatrix A, spring_electrical_control ctrl, double *x)
void TriangleSmoother_smooth(TriangleSmoother sm, int dim, double *x)
void StressMajorizationSmoother_delete(StressMajorizationSmoother sm)
StressMajorizationSmoother StressMajorizationSmoother2_new(SparseMatrix A, int dim, double lambda, double *x, int ideal_dist_scheme)
SpringSmoother SpringSmoother_new(SparseMatrix A, int dim, spring_electrical_control ctrl, double *x)
void TriangleSmoother_delete(TriangleSmoother sm)
void SpringSmoother_smooth(SpringSmoother sm, SparseMatrix A, int dim, double *x)
static const int maxit
Definition power.c:16
spring_electrical_control ctrl