Debian Codegraph @

lib/neatogen/sparsegraph.h

raw
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 <stddef.h>
14 #include <util/api.h>
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 #include "config.h"
21
22 typedef struct {
23 int nedges; /* no. of neighbors, including self */
24 int *edges; /* edges[0..(nedges-1)] are neighbors; edges[0] is self */
25 float *ewgts; /* preferred edge lengths */
26 } v_data;
27
28 typedef struct {
29 size_t nedges; ///< no. of neighbors, including self
30 int *edges; /* edges[0..(nedges-1)] are neighbors; edges[0] is self */
31 float *ewgts; /* preferred edge lengths */
32 float *eweights; /* edge weights */
33 #ifdef DIGCOLA
34 float *edists; /* directed dist reflecting the direction of the edge */
35 #endif
36 } vtx_data;
37
38 typedef int DistType; /* must be signed!! */
39
40 PRIVATE void freeGraphData(vtx_data * graph);
41 PRIVATE void freeGraph(v_data * graph);
42
43 #ifdef __cplusplus
44 }
45 #endif