Debian Codegraph @

lib/label/node.h

raw
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 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 #include <label/index.h>
18
19 typedef struct Branch {
20 Rect_t rect;
21 struct Node *child;
22 } Branch_t;
23
24 typedef struct Node {
25 int count;
26 int level; /* 0 is leaf, others positive */
27 struct Branch branch[NODECARD];
28 } Node_t;
29
30 void InitNode(Node_t *);
31 void InitBranch(Branch_t *);
32 Rect_t NodeCover(Node_t *);
33 int PickBranch(Rect_t, Node_t *);
34 int AddBranch(RTree_t *, Branch_t *, Node_t *, Node_t **);
35 void DisconBranch(Node_t *, int);
36 void PrintBranch(int, Branch_t *);
37 Node_t *RTreeNewNode(void);
38 #ifdef RTDEBUG
39 void PrintNode(Node_t * n);
40 void PrintBranch(int i, Branch_t * b);
41 #endif
42
43 #ifdef __cplusplus
44 }
45 #endif