Graphviz
16.1.1~dev.20261012.0359
Loading...
Searching...
No Matches
edge_bundling.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 v2.0
5
* which accompanies this distribution, and is available at
6
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
7
*
8
* Contributors: Details at https://graphviz.org
9
*************************************************************************/
10
11
#pragma once
12
13
#include <cstddef>
14
#include <
sparse/SparseMatrix.h
>
15
#include <vector>
16
17
struct
pedge
{
18
double
wgt
;
/* weight, telling how many original edges this edge represent. If
19
this edge consists of multiple sections of different weights
20
then this is a lower bound. This only applied for agglomerative
21
bundling */
22
int
npoints
;
/* number of poly points */
23
int
len
;
/* length of arra x. len >= npoints */
24
int
dim
;
/* dim >= 2. Point i is stored from x[i*dim]*/
25
double
edge_length
;
26
std::vector<double>
27
x
;
28
std::vector<double>
wgts
;
/* number of original edges each section represnet.
29
Dimension npoint - 1. This only applied for
30
agglomerative bundling Null for other methods */
31
};
32
33
std::vector<pedge>
edge_bundling
(
SparseMatrix
A
,
int
dim
,
34
const
std::vector<double> &x,
int
maxit_outer,
35
double
K,
int
method,
int
nneighbor,
36
int
compatibility_method,
int
max_recursion,
37
double
angle_param,
double
angle);
38
void
pedge_delete
(
pedge
&e);
39
void
pedge_wgts_realloc
(
pedge
&e,
int
n);
40
void
pedge_export_gv
(FILE *fp,
size_t
ne,
const
std::vector<pedge> &edges);
41
enum
{
METHOD_NONE
= -1,
METHOD_FD
,
METHOD_INK_AGGLOMERATE
,
METHOD_INK
};
42
enum
{
COMPATIBILITY_DIST
= 0,
COMPATIBILITY_FULL
};
43
pedge
pedge_wgt_new
(
int
np,
int
dim
,
double
*x,
double
wgt);
44
void
pedge_double
(
pedge
&e);
SparseMatrix.h
pedge_wgt_new
pedge pedge_wgt_new(int np, int dim, double *x, double wgt)
Definition
edge_bundling.cpp:59
pedge_wgts_realloc
void pedge_wgts_realloc(pedge &e, int n)
Definition
edge_bundling.cpp:310
edge_bundling
std::vector< pedge > edge_bundling(SparseMatrix A, int dim, const std::vector< double > &x, int maxit_outer, double K, int method, int nneighbor, int compatibility_method, int max_recursion, double angle_param, double angle)
Definition
edge_bundling.cpp:567
METHOD_FD
@ METHOD_FD
Definition
edge_bundling.h:41
METHOD_NONE
@ METHOD_NONE
Definition
edge_bundling.h:41
METHOD_INK
@ METHOD_INK
Definition
edge_bundling.h:41
METHOD_INK_AGGLOMERATE
@ METHOD_INK_AGGLOMERATE
Definition
edge_bundling.h:41
COMPATIBILITY_FULL
@ COMPATIBILITY_FULL
Definition
edge_bundling.h:42
COMPATIBILITY_DIST
@ COMPATIBILITY_DIST
Definition
edge_bundling.h:42
pedge_delete
void pedge_delete(pedge &e)
Definition
edge_bundling.cpp:72
pedge_double
void pedge_double(pedge &e)
Definition
edge_bundling.cpp:325
pedge_export_gv
void pedge_export_gv(FILE *fp, size_t ne, const std::vector< pedge > &edges)
Definition
edge_bundling.cpp:162
A
#define A(n, t)
Definition
expr.h:76
dim
static const int dim
Definition
nearest_neighbor_graph_ann.cpp:18
SparseMatrix_struct
Definition
SparseMatrix.h:28
pedge
Definition
edge_bundling.h:17
pedge::x
std::vector< double > x
coordinates of the npoints poly points. Dimension dim*npoints
Definition
edge_bundling.h:27
pedge::edge_length
double edge_length
Definition
edge_bundling.h:25
pedge::wgt
double wgt
Definition
edge_bundling.h:18
pedge::npoints
int npoints
Definition
edge_bundling.h:22
pedge::wgts
std::vector< double > wgts
Definition
edge_bundling.h:28
pedge::len
int len
Definition
edge_bundling.h:23
pedge::dim
int dim
Definition
edge_bundling.h:24
lib
mingle
edge_bundling.h
Generated by
1.9.8