Graphviz 14.0.2~dev.20251008.0253
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#include <util/api.h>
15
16#ifdef __cplusplus
17extern "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;
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
42
43#ifdef __cplusplus
44}
45#endif
macro for API hiding/exposing
#define PRIVATE
Definition api.h:16
Agraph_t * graph(char *name)
Definition gv.cpp:30
PRIVATE void freeGraph(v_data *graph)
Definition delaunay.c:673
PRIVATE void freeGraphData(vtx_data *graph)
Definition delaunay.c:682
int DistType
Definition sparsegraph.h:38
int nedges
Definition sparsegraph.h:23
int * edges
Definition sparsegraph.h:24
float * ewgts
Definition sparsegraph.h:25
float * ewgts
Definition sparsegraph.h:31
float * eweights
Definition sparsegraph.h:32
size_t nedges
no. of neighbors, including self
Definition sparsegraph.h:29
int * edges
Definition sparsegraph.h:30