Graphviz 13.1.2~dev.20250807.2324
Loading...
Searching...
No Matches
sparsegraph.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 <stddef.h>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#include "config.h"
20
21#if !defined(__CYGWIN__) && defined(__GNUC__) && !defined(__MINGW32__)
22#define INTERNAL __attribute__((visibility("hidden")))
23#else
24#define INTERNAL /* nothing */
25#endif
26
27 typedef struct {
28 int nedges; /* no. of neighbors, including self */
29 int *edges; /* edges[0..(nedges-1)] are neighbors; edges[0] is self */
30 float *ewgts; /* preferred edge lengths */
31 } v_data;
32
33 typedef struct {
34 size_t nedges;
35 int *edges; /* edges[0..(nedges-1)] are neighbors; edges[0] is self */
36 float *ewgts; /* preferred edge lengths */
37 float *eweights; /* edge weights */
38#ifdef DIGCOLA
39 float *edists; /* directed dist reflecting the direction of the edge */
40#endif
41 } vtx_data;
42
43 typedef int DistType; /* must be signed!! */
44
47
48#undef INTERNAL
49
50#ifdef __cplusplus
51}
52#endif
Agraph_t * graph(char *name)
Definition gv.cpp:30
#define INTERNAL
Definition sparsegraph.h:24
INTERNAL void freeGraphData(vtx_data *graph)
Definition delaunay.c:671
INTERNAL void freeGraph(v_data *graph)
Definition delaunay.c:662
int DistType
Definition sparsegraph.h:43
int nedges
Definition sparsegraph.h:28
int * edges
Definition sparsegraph.h:29
float * ewgts
Definition sparsegraph.h:30
float * ewgts
Definition sparsegraph.h:36
float * eweights
Definition sparsegraph.h:37
size_t nedges
no. of neighbors, including self
Definition sparsegraph.h:34
int * edges
Definition sparsegraph.h:35