Graphviz 13.0.0~dev.20241220.2304
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 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 <sparse/SparseMatrix.h>
14#include <vector>
15
16struct pedge {
17 double wgt; /* weight, telling how many original edges this edge represent. If this edge consists of multiple sections of different weights then this is a lower bound. This only applied for agglomerative bundling */
18 int npoints;/* number of poly points */
19 int len;/* length of arra x. len >= npoints */
20 int dim;/* dim >= 2. Point i is stored from x[i*dim]*/
22 std::vector<double> x;
23 std::vector<double> wgts;/* number of original edges each section represnet. Dimension npoint - 1. This only applied for agglomerative bundling Null for other methods */
24};
25
26std::vector<pedge> edge_bundling(SparseMatrix A, int dim,
27 const std::vector<double> &x, int maxit_outer,
28 double K, int method, int nneighbor,
29 int compatibility_method, int max_recursion,
30 double angle_param, double angle);
31void pedge_delete(pedge &e);
32void pedge_wgts_realloc(pedge &e, int n);
33void pedge_export_gv(FILE *fp, int ne, const std::vector<pedge> &edges);
36pedge pedge_wgt_new(int np, int dim, double *x, double wgt);
37void pedge_double(pedge &e);
@ METHOD_FD
@ METHOD_NONE
@ METHOD_INK
@ METHOD_INK_AGGLOMERATE
pedge pedge_wgt_new(int np, int dim, double *x, double wgt)
void pedge_wgts_realloc(pedge &e, int n)
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)
@ COMPATIBILITY_FULL
@ COMPATIBILITY_DIST
void pedge_export_gv(FILE *fp, int ne, const std::vector< pedge > &edges)
void pedge_delete(pedge &e)
void pedge_double(pedge &e)
#define A(n, t)
Definition expr.h:76
static const int dim
std::vector< double > x
coordinates of the npoints poly points. Dimension dim*npoints
double edge_length
double wgt
int npoints
std::vector< double > wgts