File: meshgraph.h

package info (click to toggle)
pcb-rnd 3.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 29,624 kB
  • sloc: ansic: 197,571; yacc: 6,153; sh: 5,808; awk: 2,708; makefile: 2,139; lex: 1,107; python: 519; xml: 261; lisp: 169; tcl: 67; perl: 34; javascript: 6; ruby: 5
file content (26 lines) | stat: -rw-r--r-- 626 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef PCB_ACOMPNET_MESHGRAPH_H
#define PCB_ACOMPNET_MESHGRAPH_H
#include <librnd/poly/rtree.h>
#include <librnd/core/box.h>
#include <genht/htip.h>

typedef struct {
	rnd_box_t bbox;
	long int id;
	long int came_from;
	double gscore, fscore;
	int iscore; /* input score: how much we prefer to use this node */
} pcb_meshnode_t;


typedef struct {
	rnd_rtree_t ntree;
	htip_t id2node;
	long int next_id;
} pcb_meshgraph_t;

void pcb_msgr_init(pcb_meshgraph_t *gr);
long int pcb_msgr_add_node(pcb_meshgraph_t *gr, rnd_box_t *bbox, int score);
int pcb_msgr_astar(pcb_meshgraph_t *gr, long int startid, long int endid);

#endif