Graphviz 14.1.4~dev.20260320.0055
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 v2.0
5 * which accompanies this distribution, and is available at
6 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.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 <ortho/rawgraph.h>
16#include <stdbool.h>
17#include <stddef.h>
18#include <util/list.h>
19#include <util/optional.h>
20
21typedef struct {
22 double p1, p2;
23} paird;
24
25typedef struct {
26 int a,b;
27} pair;
28
29typedef struct {
30 pair t1, t2;
31} pair2;
32
33typedef enum {B_NODE, B_UP, B_LEFT, B_DOWN, B_RIGHT} bend;
34
35/* Example : segment connecting maze point (3,2)
36 * and (3,8) has isVert = 1, common coordinate = 3, p1 = 2, p2 = 8
37 */
38typedef struct segment {
39 bool isVert;
40 double comm_coord; /* the common coordinate */
41 paird p; /* end points */
43 OPTIONAL(size_t) ind_no;
44 OPTIONAL(int) track_no;
45 struct segment* prev;
46 struct segment* next;
48
49typedef struct {
50 size_t n;
52} route;
53
54typedef LIST(segment *) seg_list_t;
55
56typedef struct {
58 paird p; /* extrema of channel */
59 seg_list_t seg_list;
61 struct cell* cp;
62} channel;
63
64#define N_DAD(n) (n)->n_dad
abstract graph C library, Cgraph API
type-generic dynamically expanding list
#define LIST(type)
Definition list.h:55
C analog of C++’s std::optional
result of partitioning available space, part of maze
Definition grid.h:33
struct cell * cp
Definition structures.h:61
seg_list_t seg_list
segment pointers
Definition structures.h:59
Dtlink_t link
Definition structures.h:57
paird p
Definition structures.h:58
rawgraph * G
Definition structures.h:60
pair t1
Definition structures.h:30
int a
Definition structures.h:26
double p1
Definition structures.h:22
segment * segs
Definition structures.h:51
size_t n
Definition structures.h:50
OPTIONAL(int) track_no
track number assigned in the channel
paird p
Definition structures.h:41
double comm_coord
Definition structures.h:40
OPTIONAL(size_t) ind_no
index number of this segment in its channel
struct segment * next
Definition structures.h:46
bend l2
Definition structures.h:42
bend l1
Definition structures.h:42
bool isVert
Definition structures.h:39
struct segment * prev
Definition structures.h:45
bend
Definition structures.h:33
@ B_LEFT
Definition structures.h:33
@ B_RIGHT
Definition structures.h:33
@ B_DOWN
Definition structures.h:33
@ B_UP
Definition structures.h:33
@ B_NODE
Definition structures.h:33
graphs, nodes and edges info: Agraphinfo_t, Agnodeinfo_t and Agedgeinfo_t