Graphviz
14.1.3~dev.20260227.0545
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
13
#include <
sfdpgen/post_process.h
>
14
#include <stdbool.h>
15
#include <
util/api.h
>
16
17
enum
{
ELSCHEME_NONE
= 0,
ELSCHEME_PENALTY
,
ELSCHEME_PENALTY2
,
ELSCHEME_STRAIGHTLINE_PENALTY
,
ELSCHEME_STRAIGHTLINE_PENALTY2
};
18
19
struct
relative_position_constraints_struct
{
20
double
constr_penalty
;
/* penalty parameter used in making edge labels as much on the line as possible */
21
int
edge_labeling_scheme
;
/* specifying whether to treat node of the form |edgelabel|* as a special node representing an edge label.
22
0 (no action, default), 1 (penalty based method to make that kind of node close to the center of its neighbor),
23
2 (penalty based method to make that kind of node close to the "old" center of its neighbor),
24
3 (two step process of overlap removal and straightening) */
25
int
n_constr_nodes
;
/*n_constr_nodes: number of nodes that has constraints, these are nodes that is
26
constrained to be close to the average of its neighbors.*/
27
int
*
constr_nodes
;
/*constr_nodes: a list of nodes that need to be constrained. If NULL, unused.*/
28
int
*
irn
;
/* working arrays to hold the Laplacian of the constrain graph */
29
int
*
jcn
;
30
double
*
val
;
31
SparseMatrix
A_constr
;
/*A_constr: neighbors of node i are in the row i of this matrix. i needs to sit
32
in between these neighbors as much as possible. this must not be NULL
33
if constr_nodes != NULL.*/
34
35
};
36
37
typedef
struct
relative_position_constraints_struct
*
relative_position_constraints
;
38
39
PRIVATE
void
remove_overlap
(
int
dim
,
SparseMatrix
A
,
double
*x,
double
*label_sizes,
40
int
ntry,
double
initial_scaling,
int
edge_labeling_scheme
,
41
int
n_constr_nodes
,
int
*
constr_nodes
,
42
SparseMatrix
A_constr
,
bool
doShrink);
api.h
macro for API hiding/exposing
PRIVATE
#define PRIVATE
Definition
api.h:16
A
#define A(n, t)
Definition
expr.h:76
dim
static const int dim
Definition
nearest_neighbor_graph_ann.cpp:18
remove_overlap
PRIVATE 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:589
ELSCHEME_NONE
@ ELSCHEME_NONE
Definition
overlap.h:17
ELSCHEME_PENALTY2
@ ELSCHEME_PENALTY2
Definition
overlap.h:17
ELSCHEME_STRAIGHTLINE_PENALTY2
@ ELSCHEME_STRAIGHTLINE_PENALTY2
Definition
overlap.h:17
ELSCHEME_STRAIGHTLINE_PENALTY
@ ELSCHEME_STRAIGHTLINE_PENALTY
Definition
overlap.h:17
ELSCHEME_PENALTY
@ ELSCHEME_PENALTY
Definition
overlap.h:17
relative_position_constraints
struct relative_position_constraints_struct * relative_position_constraints
Definition
overlap.h:37
post_process.h
SparseMatrix_struct
Definition
SparseMatrix.h:28
relative_position_constraints_struct
Definition
overlap.h:19
relative_position_constraints_struct::A_constr
SparseMatrix A_constr
Definition
overlap.h:31
relative_position_constraints_struct::constr_penalty
double constr_penalty
Definition
overlap.h:20
relative_position_constraints_struct::constr_nodes
int * constr_nodes
Definition
overlap.h:27
relative_position_constraints_struct::irn
int * irn
Definition
overlap.h:28
relative_position_constraints_struct::n_constr_nodes
int n_constr_nodes
Definition
overlap.h:25
relative_position_constraints_struct::edge_labeling_scheme
int edge_labeling_scheme
Definition
overlap.h:21
relative_position_constraints_struct::val
double * val
Definition
overlap.h:30
relative_position_constraints_struct::jcn
int * jcn
Definition
overlap.h:29
lib
neatogen
overlap.h
Generated by
1.9.8