Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
maze.h File Reference

makes maze with mkMaze for routing orthogonal edges More...

#include <ortho/sgraph.h>
Include dependency graph for maze.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cell
 result of partitioning available space, part of maze More...
 
struct  maze
 available channels for orthogonal edges around nodes of graph_t More...
 

Macros

#define MZ_ISNODE   1
 
#define MZ_VSCAN   2
 
#define MZ_HSCAN   4
 
#define MZ_SMALLV   8
 
#define MZ_SMALLH   16
 
#define IsNode(cp)   (cp->flags & MZ_ISNODE)
 cell corresponds to node
 
#define IsVScan(cp)   (cp->flags & MZ_VSCAN)
 cell already inserted in vertical channel
 
#define IsHScan(cp)   (cp->flags & MZ_HSCAN)
 cell already inserted in horizontal channel
 
#define IsSmallV(cp)   (cp->flags & MZ_SMALLV)
 cell has small height corresponding to a small height node
 
#define IsSmallH(cp)   (cp->flags & MZ_SMALLH)
 cell has small width corresponding to a small width node
 

Typedefs

typedef struct cell cell { $1->ruled |= HTML_VRULE
 result of partitioning available space, part of maze
 

Enumerations

enum  { M_RIGHT =0 , M_TOP , M_LEFT , M_BOTTOM }
 

Functions

mazemkMaze (graph_t *)
 creates maze and fills maze::gcells and maze::cells. A subroutine of orthoEdges.
 
void freeMaze (maze *)
 
void updateWts (sgraph *g, cell *cp, sedge *ep)
 updates sedge::weight of cell edges
 

Macro Definition Documentation

◆ IsHScan

#define IsHScan (   cp)    (cp->flags & MZ_HSCAN)

Definition at line 33 of file maze.h.

◆ IsNode

#define IsNode (   cp)    (cp->flags & MZ_ISNODE)

Definition at line 29 of file maze.h.

◆ IsSmallH

#define IsSmallH (   cp)    (cp->flags & MZ_SMALLH)

Definition at line 37 of file maze.h.

◆ IsSmallV

#define IsSmallV (   cp)    (cp->flags & MZ_SMALLV)

Definition at line 35 of file maze.h.

◆ IsVScan

#define IsVScan (   cp)    (cp->flags & MZ_VSCAN)

Definition at line 31 of file maze.h.

◆ MZ_HSCAN

#define MZ_HSCAN   4

Definition at line 24 of file maze.h.

◆ MZ_ISNODE

#define MZ_ISNODE   1

Definition at line 22 of file maze.h.

◆ MZ_SMALLH

#define MZ_SMALLH   16

Definition at line 26 of file maze.h.

◆ MZ_SMALLV

#define MZ_SMALLV   8

Definition at line 25 of file maze.h.

◆ MZ_VSCAN

#define MZ_VSCAN   2

Definition at line 23 of file maze.h.

Typedef Documentation

◆ cell

cells VR cell { $1->ruled |= HTML_VRULE

Definition at line 533 of file htmlparse.y.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
M_RIGHT 
M_TOP 
M_LEFT 
M_BOTTOM 

Definition at line 20 of file maze.h.

Function Documentation

◆ freeMaze()

void freeMaze ( maze mp)
extern

Definition at line 504 of file maze.c.

References maze::cells, dtclose(), free(), freeSGraph(), maze::gcells, maze::hchans, maze::sg, cell::sides, and maze::vchans.

Referenced by orthoEdges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mkMaze()

maze * mkMaze ( graph_t g)
extern

Definition at line 453 of file maze.c.

References agfstnode(), agnnodes(), agnxtnode(), cell::bb, maze::cells, cell::flags, free(), maze::gcells, gv_alloc(), gv_calloc(), boxf::LL, MARGIN, mkMazeGraph(), MZ_ISNODE, maze::ncells, ND_alg, ND_coord, ND_xsize, ND_ysize, maze::ngcells, odb_flags, partition(), psdump(), maze::sg, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by orthoEdges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateWts()

void updateWts ( sgraph g,
cell cp,
sedge ep 
)

Iterate over edges in a cell, adjust weights as necessary. It always updates the bent edges belonging to a cell. A horizontal/vertical edge is updated only if the edge traversed is bent, or if it is the traversed edge.

Definition at line 168 of file maze.c.

References cell::bb, BEND, CHANSZ, cell::edges, HORZ, boxf::LL, cell::nedges, updateWt(), boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by convertSPtoRoute().

Here is the call graph for this function:
Here is the caller graph for this function: