Graphviz  2.41.20171026.1811
overlap.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 OVERLAP_H
15 #define OVERLAP_H
16 
17 #include "post_process.h"
18 
20 
21 #define OverlapSmoother_struct StressMajorizationSmoother_struct
22 
23 void OverlapSmoother_delete(OverlapSmoother sm);
24 
25 OverlapSmoother OverlapSmoother_new(SparseMatrix A, int m,
26  int dim, real lambda0, real *x, real *width, int include_original_graph, int neighborhood_only,
27  real *max_overlap, real *min_overlap,
28  int edge_labeling_scheme, int n_constr_nodes, int *constr_nodes, SparseMatrix A_constr, int shrink
29  );
30 
32 
34  real constr_penalty; /* penalty parameter used in making edge labels as much on the line as possible */
35  int edge_labeling_scheme;/* specifying whether to treat node of the form |edgelabel|* as a special node representing an edge label.
36  0 (no action, default), 1 (penalty based method to make that kind of node close to the center of its neighbor),
37  2 (penalty based method to make that kind of node close to the "old" center of its neighbor),
38  3 (two step process of overlap removal and straightening) */
39  int n_constr_nodes;/*n_constr_nodes: number of nodes that has constraints, these are nodes that is
40  constrained to be close to the average of its neighbors.*/
41  int *constr_nodes;/*constr_nodes: a list of nodes that need to be constrained. If NULL, unused.*/
42  int *irn;/* working arrays to hold the Laplacian of the constrain graph */
43  int *jcn;
45  SparseMatrix A_constr; /*A_constr: neighbors of node i are in the row i of this matrix. i needs to sit
46  in between these neighbors as much as possible. this must not be NULL
47  if constr_nodes != NULL.*/
48 
49 };
50 
52 
53 real OverlapSmoother_smooth(OverlapSmoother sm, int dim, real *x);
54 
55 void remove_overlap(int dim, SparseMatrix A, real *x, real *label_sizes, int ntry, real initial_scaling,
56  int edge_labeling_scheme, int n_constr_nodes, int *constr_nodes, SparseMatrix A_constr, int doShrink, int *flag);
57 real overlap_scaling(int dim, int m, real *x, real *width, real scale_sta, real scale_sto, real epsilon, int maxiter);
58 #endif
real OverlapSmoother_smooth(OverlapSmoother sm, int dim, real *x)
OverlapSmoother OverlapSmoother_new(SparseMatrix A, int m, int dim, real lambda0, real *x, real *width, int include_original_graph, int neighborhood_only, real *max_overlap, real *min_overlap, int edge_labeling_scheme, int n_constr_nodes, int *constr_nodes, SparseMatrix A_constr, int shrink)
StressMajorizationSmoother OverlapSmoother
Definition: overlap.h:19
void OverlapSmoother_delete(OverlapSmoother sm)
real overlap_scaling(int dim, int m, real *x, real *width, real scale_sta, real scale_sto, real epsilon, int maxiter)
struct relative_position_constraints_struct * relative_position_constraints
Definition: overlap.h:51
void remove_overlap(int dim, SparseMatrix A, int m, real *x, real *label_sizes, int ntry, real initial_scaling, int do_shrinking, int *flag)
Definition: overlap.c:686
#define real
Definition: general.h:34