pgRouting  2.2
pgRouting extends the PostGIS / PostgreSQL geospatial database to provide geospatial routing functionality.
 All Classes Functions Variables Pages
dijkstra.h
1 /*PGR-GNU*****************************************************************
2 
3 Copyright (c) 2015 pgRouting developers
4 Mail: project@pgrouting.org
5 
6 ------
7 
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 
22 ********************************************************************PGR-GNU*/
23 /*
24  * Shortest path algorithm for PostgreSQL
25  *
26  * Copyright (c) 2005 Sylvain Pasche
27  *
28  * This program is free software; you can redistribute it and/or modify
29  * it under the terms of the GNU General Public License as published by
30  * the Free Software Foundation; either version 2 of the License, or
31  * (at your option) any later version.
32  *
33  * This program is distributed in the hope that it will be useful,
34  * but WITHOUT ANY WARRANTY; without even the implied warranty of
35  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36  * GNU General Public License for more details.
37  *
38  * You should have received a copy of the GNU General Public License
39  * along with this program; if not, write to the Free Software
40  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
41  *
42  */
43 
44 #ifndef _DIJKSTRA_H
45 #define _DIJKSTRA_H
46 
47 typedef double float8;
48 
49 typedef struct edge
50 {
51  int id;
52  int source;
53  int target;
54  float8 cost;
55  float8 reverse_cost;
56 } edge_t;
57 
58 typedef struct path_element
59 {
60  int vertex_id;
61  int edge_id;
62  float8 cost;
64 
65 #ifdef __cplusplus
66 extern "C"
67 #endif
68 int boost_dijkstra(edge_t *edges, unsigned int count, int start_vertex, int end_vertex,
69  bool directed, bool has_reverse_cost,
70  path_element_t **path, int *path_count, char **err_msg);
71 
72 #endif