pgRouting  2.2
pgRouting extends the PostGIS / PostgreSQL geospatial database to provide geospatial routing functionality.
 All Classes Functions Variables Pages
trsp.h
1 /*PGR-GNU*****************************************************************
2 
3  * Copyright (c) 2011 Stephen Woodbridge
4 
5 ------
6 
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11 
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 
21 ********************************************************************PGR-GNU*/
22 
23 #ifndef _TRSP_H
24 #define _TRSP_H
25 
26 #define MAX_RULE_LENGTH 5
27 
28 #include "../../common/src/pgr_types.h"
29 typedef pgr_edge_t edge_t;
30 typedef Restrict_t restrict_t;
31 
32 #if 0
33 typedef struct restrict_struct
34 {
35  int target_id;
36  float8 to_cost;
37  int via[MAX_RULE_LENGTH];
38 }
40 #endif
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 int trsp_node_wrapper(
47  edge_t *edges, size_t edge_count,
48  restrict_t *restricts, size_t restrict_count,
49  int start_vertex,
50  int end_vertex,
51  bool directed,
52  bool has_reverse_cost,
53  path_element_t **path, size_t *path_count,
54  char **err_msg
55  );
56 
57 
58 int trsp_edge_wrapper(
59  edge_t *edges, size_t edge_count,
60  restrict_t *restricts, size_t restrict_count,
61  int start_edge,
62  double start_pos,
63  int end_edge,
64  double end_pos,
65  bool directed,
66  bool has_reverse_cost,
67  path_element_t **path, size_t *path_count,
68  char **err_msg
69  );
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif