Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
maze.h
Go to the documentation of this file.
1
6/*************************************************************************
7 * Copyright (c) 2011 AT&T Intellectual Property
8 * All rights reserved. This program and the accompanying materials
9 * are made available under the terms of the Eclipse Public License v1.0
10 * which accompanies this distribution, and is available at
11 * https://www.eclipse.org/legal/epl-v10.html
12 *
13 * Contributors: Details at https://graphviz.org
14 *************************************************************************/
15
16#pragma once
17
18#include <ortho/sgraph.h>
19
21
22#define MZ_ISNODE 1
23#define MZ_VSCAN 2
24#define MZ_HSCAN 4
25#define MZ_SMALLV 8
26#define MZ_SMALLH 16
27
29#define IsNode(cp) (cp->flags & MZ_ISNODE)
31#define IsVScan(cp) (cp->flags & MZ_VSCAN)
33#define IsHScan(cp) (cp->flags & MZ_HSCAN)
35#define IsSmallV(cp) (cp->flags & MZ_SMALLV)
37#define IsSmallH(cp) (cp->flags & MZ_SMALLH)
38
40
41typedef struct cell {
42 int flags;
43 int nedges;
53 int nsides;
56} cell;
57
65typedef struct {
66 int ncells, ngcells;
72} maze;
73
74extern maze* mkMaze(graph_t*);
75extern void freeMaze (maze*);
76void updateWts (sgraph* g, cell* cp, sedge* ep);
77#ifdef DEBUG
78extern int odb_flags;
79#define ODB_MAZE 1
80#define ODB_SGRAPH 2
81#define ODB_ROUTE 4
82#define ODB_CHANG 8
83#define ODB_IGRAPH 16
84#endif
void freeMaze(maze *)
Definition maze.c:504
maze * mkMaze(graph_t *)
creates maze and fills maze::gcells and maze::cells. A subroutine of orthoEdges.
Definition maze.c:453
@ M_TOP
Definition maze.h:20
@ M_RIGHT
Definition maze.h:20
@ M_BOTTOM
Definition maze.h:20
@ M_LEFT
Definition maze.h:20
void updateWts(sgraph *g, cell *cp, sedge *ep)
updates sedge::weight of cell edges
Definition maze.c:168
int odb_flags
Definition ortho.c:56
graph or subgraph
Definition cgraph.h:425
Definition geom.h:41
result of partitioning available space, part of maze
Definition grid.h:33
int nsides
Definition maze.h:53
int flags
Definition maze.h:42
int nedges
Definition maze.h:43
boxf bb
Definition maze.h:55
sedge * edges[6]
up to six links (sedge) between four sides (snode) of the cell
Definition maze.h:44
snode ** sides
up to four sides: M_RIGHT, M_TOP, M_LEFT, M_BOTTOM
Definition maze.h:54
Definition cdt.h:100
available channels for orthogonal edges around nodes of graph_t
Definition maze.h:65
cell * cells
cells not corresponding to graph nodes
Definition maze.h:67
cell * gcells
cells corresponding to graph nodes
Definition maze.h:68
int ncells
Definition maze.h:66
Dt_t * vchans
set of vertical channels, created by extractVChans
Definition maze.h:71
Dt_t * hchans
set of horizontal channels, created by extractHChans.
Definition maze.h:70
sgraph * sg
search graph
Definition maze.h:69
Definition sgraph.h:42
a node of search graph sgraph, is created as a border segment between two adjusted cells of type cell...
Definition sgraph.h:26