Graphviz  2.41.20171026.1811
post_process.h
Go to the documentation of this file.
1 /* $Id$ $Revision$ */
2 /* vim:set shiftwidth=4 ts=8: */
3 
4 /*************************************************************************
5  * Copyright (c) 2011 AT&T Intellectual Property
6  * All rights reserved. This program and the accompanying materials
7  * are made available under the terms of the Eclipse Public License v1.0
8  * which accompanies this distribution, and is available at
9  * http://www.eclipse.org/legal/epl-v10.html
10  *
11  * Contributors: See CVS logs. Details at http://www.graphviz.org/
12  *************************************************************************/
13 
14 #ifndef POST_PROCESS_H
15 #define POST_PROCESS_H
16 
17 #include "spring_electrical.h"
18 
20 
22  SparseMatrix D;/* distance matrix. The diagonal is removed hence the ia, ja structure is different from Lw and Lwd!! */
23  SparseMatrix Lw;/* the weighted laplacian. with offdiag = -1/w_ij */
24  SparseMatrix Lwd;/* the laplacian like matrix with offdiag = -scaling*d_ij/w_ij. RHS in stress majorization = Lwd.x */
26  void (*data_deallocator)(void*);
27  void *data;
28  int scheme;
29  real scaling;/* scaling. It is multiplied to Lwd. need to divide coordinate x at the end of the stress majorization process */
30  real tol_cg;/* tolerance and maxit for conjugate gradient that solves the Laplacian system.
31  typically the Laplacian only needs to be solved very crudely as it is part of an
32  outer iteration.*/
33  int maxit_cg;
34 };
35 
37 
38 void StressMajorizationSmoother_delete(StressMajorizationSmoother sm);
39 
41 StressMajorizationSmoother StressMajorizationSmoother2_new(SparseMatrix A, int dim, real lambda, real *x, int ideal_dist_scheme);
42 
43 real StressMajorizationSmoother_smooth(StressMajorizationSmoother sm, int dim, real *x, int maxit, real tol);
44 /*-------------------- triangle/neirhborhood graph based smoother ------------------- */
45 typedef StressMajorizationSmoother TriangleSmoother;
46 
47 #define TriangleSmoother_struct StressMajorizationSmoother_struct
48 
49 void TriangleSmoother_delete(TriangleSmoother sm);
50 
51 TriangleSmoother TriangleSmoother_new(SparseMatrix A, int dim, real lambda, real *x, int use_triangularization);
52 
53 void TriangleSmoother_smooth(TriangleSmoother sm, int dim, real *x);
54 
55 
56 
57 /*------------------ spring and spring-electrical based smoother */
58 
62 };
63 
65 
66 SpringSmoother SpringSmoother_new(SparseMatrix A, int dim, spring_electrical_control ctrl, real *x);
67 
68 void SpringSmoother_delete(SpringSmoother sm);
69 
70 void SpringSmoother_smooth(SpringSmoother sm, SparseMatrix A, real *node_weights, int dim, real *x);
71 /*------------------------------------------------------------------*/
72 
73 void post_process_smoothing(int dim, SparseMatrix A, spring_electrical_control ctrl, real *node_weights, real *x, int *flag);
74 
75 /*-------------------- sparse stress majorizationp ------------------- */
76 typedef StressMajorizationSmoother SparseStressMajorizationSmoother;
77 
78 #define SparseStressMajorizationSmoother_struct StressMajorizationSmoother_struct
79 
80 void SparseStressMajorizationSmoother_delete(SparseStressMajorizationSmoother sm);
81 
83 SparseStressMajorizationSmoother SparseStressMajorizationSmoother_new(SparseMatrix A, int dim, real lambda, real *x,
84  int weighting_scheme, int scale_initial_coord);
85 
86 real SparseStressMajorizationSmoother_smooth(SparseStressMajorizationSmoother sm, int dim, real *x, int maxit_sm, real tol);
87 
88 real get_stress(int m, int dim, int *iw, int *jw, real *w, real *d, real *x, real scaling, void *data, int weighted);
89 
90 real get_full_stress(SparseMatrix A, int dim, real *x, int weighting_scheme);
91 void dump_distance_edge_length(char *outfile, SparseMatrix A, int dim, real *x);
92 
93 /*--------------------------------------------------------------*/
94 
95 #endif
96 
struct StressMajorizationSmoother_struct * StressMajorizationSmoother
Definition: post_process.h:36
void StressMajorizationSmoother_delete(StressMajorizationSmoother sm)
Definition: post_process.h:40
Definition: post_process.h:82
SpringSmoother SpringSmoother_new(SparseMatrix A, int dim, spring_electrical_control ctrl, real *x)
Definition: post_process.h:19
void SpringSmoother_smooth(SpringSmoother sm, SparseMatrix A, real *node_weights, int dim, real *x)
Definition: post_process.h:40
struct SpringSmoother_struct * SpringSmoother
Definition: post_process.h:64
Definition: post_process.h:40
StressMajorizationSmoother SparseStressMajorizationSmoother_new(SparseMatrix A, int dim, real lambda0, real *x, int weighting_scheme, int scale_initial_coord)
Definition: post_process.c:513
Definition: post_process.h:19
StressMajorizationSmoother SparseStressMajorizationSmoother
Definition: post_process.h:76
void SpringSmoother_delete(SpringSmoother sm)
real get_stress(int m, int dim, int *iw, int *jw, real *w, real *d, real *x, real scaling, void *data, int weighted)
Definition: post_process.c:765
void SparseStressMajorizationSmoother_delete(SparseStressMajorizationSmoother sm)
Definition: post_process.c:652
StressMajorizationSmoother StressMajorizationSmoother2_new(SparseMatrix A, int dim, real lambda0, real *x, int ideal_dist_scheme)
Definition: post_process.c:320
real StressMajorizationSmoother_smooth(StressMajorizationSmoother sm, int dim, real *x, int maxit_sm, real tol)
Definition: post_process.c:812
Definition: post_process.h:82
Definition: post_process.h:19
TriangleSmoother TriangleSmoother_new(SparseMatrix A, int dim, real lambda0, real *x, int use_triangularization)
spring_electrical_control ctrl
Definition: post_process.h:61
real SparseStressMajorizationSmoother_smooth(SparseStressMajorizationSmoother sm, int dim, real *x, int maxit_sm, real tol)
Definition: post_process.c:657
void post_process_smoothing(int dim, SparseMatrix A, spring_electrical_control ctrl, real *node_weights, real *x, int *flag)
void TriangleSmoother_delete(TriangleSmoother sm)
Definition: post_process.h:19
real get_full_stress(SparseMatrix A, int dim, real *x, int weighting_scheme)
Definition: post_process.h:19
void TriangleSmoother_smooth(TriangleSmoother sm, int dim, real *x)
Definition: post_process.h:19
StressMajorizationSmoother TriangleSmoother
Definition: post_process.h:45
void dump_distance_edge_length(char *outfile, SparseMatrix A, int dim, real *x)
Definition: legal.c:60
Definition: post_process.h:82
#define real
Definition: general.h:34