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 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors: See CVS logs. Details at http://www.graphviz.org/
9 *************************************************************************/
10
11#ifndef AGGLOMERATIVE_BUNDLING_H
12#define AGGLOMERATIVE_BUNDLING_H
13
14typedef struct Agglomerative_Ink_Bundling_struct *Agglomerative_Ink_Bundling;
15
16struct Agglomerative_Ink_Bundling_struct {
17 int level;/* 0, 1, ... */
18 int n;
19 SparseMatrix A; /* n x n matrix, where n is the number of edges/bundles in this level */
20 SparseMatrix P; /* prolongation matrix from level + 1 to level */
21 SparseMatrix R0;/* this is basically R[level - 1].R[level - 2]...R[0], which gives the map of bundling i to the original edges: first row of R0 gives
22 the nodes on the finest grid corresponding to the coarsest node 1, etc */
23 SparseMatrix R;/* striction mtrix from level to level + 1*/
24 Agglomerative_Ink_Bundling next;
25 Agglomerative_Ink_Bundling prev;
26 real *inks; /* amount of ink needed to draw this edge/bundle. Dimension n. */
27 real total_ink; /* amount of ink needed to draw this edge/bundle. Dimension n. */
28 pedge* edges; /* the original edge info. This does not vary level to level and is of dimenion n0, where n0 is the number of original edges */
29 int delete_top_level_A;/*whether the top level matrix should be deleted on garbage collecting the grid */
30};
31
32pedge* agglomerative_ink_bundling(int dim, SparseMatrix A, pedge* edges, int nneighbor, int max_recursion, real angle_param, real angle, int open_gl, int *flag);
33
34#endif /* AGGLOMERATIVE_BUNDLING_H */
35