Graphviz 12.0.1~dev.20240716.0800
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 typedef struct {
22 int nedges; /* no. of neighbors, including self */
23 int *edges; /* edges[0..(nedges-1)] are neighbors; edges[0] is self */
24 float *ewgts; /* preferred edge lengths */
25 } v_data;
26
27 typedef struct {
28 size_t nedges;
29 int *edges; /* edges[0..(nedges-1)] are neighbors; edges[0] is self */
30 float *ewgts; /* preferred edge lengths */
31 float *eweights; /* edge weights */
32#ifdef DIGCOLA
33 float *edists; /* directed dist reflecting the direction of the edge */
34#endif
35 } vtx_data;
36
37 typedef int DistType; /* must be signed!! */
38
39extern void freeGraphData(vtx_data * graph);
40extern void freeGraph(v_data * graph);
41
42#ifdef __cplusplus
43}
44#endif
Agraph_t * graph(char *name)
Definition gv.cpp:31
void freeGraph(v_data *graph)
Definition delaunay.c:852
void freeGraphData(vtx_data *graph)
Definition delaunay.c:861
int DistType
Definition sparsegraph.h:37
int nedges
Definition sparsegraph.h:22
int * edges
Definition sparsegraph.h:23
float * ewgts
Definition sparsegraph.h:24
float * ewgts
Definition sparsegraph.h:30
float * eweights
Definition sparsegraph.h:31
size_t nedges
no. of neighbors, including self
Definition sparsegraph.h:28
int * edges
Definition sparsegraph.h:29