Graphviz 13.1.2~dev.20250807.2324
Loading...
Searching...
No Matches
overlap.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
16#if !defined(__CYGWIN__) && defined(__GNUC__) && !defined(__MINGW32__)
17#define INTERNAL __attribute__((visibility("hidden")))
18#else
19#define INTERNAL /* nothing */
20#endif
21
23
24#define OverlapSmoother_struct StressMajorizationSmoother_struct
25
27
29 double *width, bool neighborhood_only,
30 double *max_overlap, double *min_overlap,
31 int edge_labeling_scheme,
32 int n_constr_nodes, int *constr_nodes,
33 SparseMatrix A_constr, int shrink);
34
36
38 double constr_penalty; /* penalty parameter used in making edge labels as much on the line as possible */
39 int edge_labeling_scheme;/* specifying whether to treat node of the form |edgelabel|* as a special node representing an edge label.
40 0 (no action, default), 1 (penalty based method to make that kind of node close to the center of its neighbor),
41 2 (penalty based method to make that kind of node close to the "old" center of its neighbor),
42 3 (two step process of overlap removal and straightening) */
43 int n_constr_nodes;/*n_constr_nodes: number of nodes that has constraints, these are nodes that is
44 constrained to be close to the average of its neighbors.*/
45 int *constr_nodes;/*constr_nodes: a list of nodes that need to be constrained. If NULL, unused.*/
46 int *irn;/* working arrays to hold the Laplacian of the constrain graph */
47 int *jcn;
48 double *val;
49 SparseMatrix A_constr; /*A_constr: neighbors of node i are in the row i of this matrix. i needs to sit
50 in between these neighbors as much as possible. this must not be NULL
51 if constr_nodes != NULL.*/
52
53};
54
56
58
59INTERNAL void remove_overlap(int dim, SparseMatrix A, double *x, double *label_sizes,
60 int ntry, double initial_scaling, int edge_labeling_scheme,
62 SparseMatrix A_constr, bool doShrink);
63
64#undef INTERNAL
#define A(n, t)
Definition expr.h:76
static const int dim
#define INTERNAL
Definition overlap.h:19
@ ELSCHEME_NONE
Definition overlap.h:35
@ ELSCHEME_PENALTY2
Definition overlap.h:35
@ ELSCHEME_STRAIGHTLINE_PENALTY2
Definition overlap.h:35
@ ELSCHEME_STRAIGHTLINE_PENALTY
Definition overlap.h:35
@ ELSCHEME_PENALTY
Definition overlap.h:35
INTERNAL OverlapSmoother OverlapSmoother_new(SparseMatrix A, int m, int dim, double *x, double *width, bool neighborhood_only, double *max_overlap, double *min_overlap, int edge_labeling_scheme, int n_constr_nodes, int *constr_nodes, SparseMatrix A_constr, int shrink)
INTERNAL void remove_overlap(int dim, SparseMatrix A, double *x, double *label_sizes, int ntry, double initial_scaling, int edge_labeling_scheme, int n_constr_nodes, int *constr_nodes, SparseMatrix A_constr, bool doShrink)
Definition overlap.c:586
struct relative_position_constraints_struct * relative_position_constraints
Definition overlap.h:55
INTERNAL void OverlapSmoother_delete(OverlapSmoother sm)
StressMajorizationSmoother OverlapSmoother
Definition overlap.h:22
INTERNAL double OverlapSmoother_smooth(OverlapSmoother sm, int dim, double *x)