Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
structures.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 "types.h"
14#include "cgraph.h"
15#include <cgraph/list.h>
16#include <ortho/rawgraph.h>
17#include <stdbool.h>
18#include <stddef.h>
19
20typedef struct {
21 double p1, p2;
22} paird;
23
24typedef struct {
25 int a,b;
26} pair;
27
28typedef struct {
29 pair t1, t2;
30} pair2;
31
32typedef enum {B_NODE, B_UP, B_LEFT, B_DOWN, B_RIGHT} bend;
33
34/* Example : segment connecting maze point (3,2)
35 * and (3,8) has isVert = 1, common coordinate = 3, p1 = 2, p2 = 8
36 */
37typedef struct segment {
38 bool isVert;
39 double comm_coord; /* the common coordinate */
40 paird p; /* end points */
42 size_t ind_no;
43 int track_no; /* track number assigned in the channel */
44 struct segment* prev;
45 struct segment* next;
47
48typedef struct {
49 size_t n;
51} route;
52
53DEFINE_LIST(seg_list, segment *)
54
55typedef struct {
57 paird p; /* extrema of channel */
58 seg_list_t seg_list;
60 struct cell* cp;
61} channel;
62
63#define N_DAD(n) (n)->n_dad
abstract graph C library, Cgraph API
#define DEFINE_LIST(name, type)
Definition list.h:26
result of partitioning available space, part of maze
Definition grid.h:33
struct cell * cp
Definition structures.h:60
seg_list_t seg_list
segment pointers
Definition structures.h:58
Dtlink_t link
Definition structures.h:56
paird p
Definition structures.h:57
rawgraph * G
Definition structures.h:59
pair t1
Definition structures.h:29
int a
Definition structures.h:25
double p1
Definition structures.h:21
segment * segs
Definition structures.h:50
size_t n
Definition structures.h:49
paird p
Definition structures.h:40
double comm_coord
Definition structures.h:39
size_t ind_no
index number of this segment in its channel
Definition structures.h:42
struct segment * next
Definition structures.h:45
bend l2
Definition structures.h:41
bend l1
Definition structures.h:41
bool isVert
Definition structures.h:38
int track_no
Definition structures.h:43
struct segment * prev
Definition structures.h:44
bend
Definition structures.h:32
@ B_LEFT
Definition structures.h:32
@ B_RIGHT
Definition structures.h:32
@ B_DOWN
Definition structures.h:32
@ B_UP
Definition structures.h:32
@ B_NODE
Definition structures.h:32
graphs, nodes and edges info: Agraphinfo_t, Agnodeinfo_t and Agedgeinfo_t