PGROUTING  3.2
trsp.h
Go to the documentation of this file.
1 /*PGR-GNU*****************************************************************
2 
3 FILE: trsp.h
4 
5 Copyright (c) 2015 pgRouting developers
7 
8 ------
9 
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
14 
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19 
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 
24  ********************************************************************PGR-GNU*/
25 
26 #ifndef INCLUDE_C_TYPES_TRSP_TRSP_H_
27 #define INCLUDE_C_TYPES_TRSP_TRSP_H_
28 
29 #define MAX_RULE_LENGTH 5
30 
31 
32 /* for int64_t */
33 #ifdef __cplusplus
34 # include <cstdint>
35 typedef int64_t int64;
36 typedef double float8;
37 #else
38 # include <stdint.h>
39 #endif
40 
41 typedef struct edge {
42  int64 id;
43  int64 source;
44  int64 target;
45  float8 cost;
46  float8 reverse_cost;
47 } edge_t;
48 
49 typedef struct restrict_struct {
50  int target_id;
51  float8 to_cost;
53 }
55 
56 typedef struct path_element {
57  int64 vertex_id;
58  int64 edge_id;
59  float8 cost;
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
67  edge_t *edges,
68  size_t edge_count,
69  restrict_t *restricts,
70  size_t restrict_count,
71  int64_t start_edge,
72  double start_pos,
73  int64_t end_edge,
74  double end_pos,
75  bool directed,
76  bool has_reverse_cost,
77  path_element_tt **path,
78  size_t *path_count,
79  char **err_msg
80 );
81 
82 #ifdef __cplusplus
83 }
84 #endif
85 
86 #endif // INCLUDE_C_TYPES_TRSP_TRSP_H_
edge::reverse_cost
float8 reverse_cost
Definition: trsp.h:46
edge::cost
float8 cost
Definition: trsp.h:45
path_element::edge_id
int64 edge_id
Definition: trsp.h:58
edge::target
int64 target
Definition: trsp.h:44
edge_t
Definition: trsp_types.h:37
path_element
Definition: trsp.h:56
edge_t
struct edge edge_t
restrict_struct
Definition: trsp.h:49
MAX_RULE_LENGTH
#define MAX_RULE_LENGTH
Definition: trsp.h:29
restrict_struct::to_cost
float8 to_cost
Definition: trsp.h:51
edge
Definition: trsp.h:41
restrict_struct::target_id
int target_id
Definition: trsp.h:50
edge::source
int64 source
Definition: trsp.h:43
path_element::cost
float8 cost
Definition: trsp.h:59
edge::id
int64 id
Definition: trsp.h:42
restrict_t
struct restrict_struct restrict_t
path_element::vertex_id
int64 vertex_id
Definition: trsp.h:57
restrict_struct::via
int via[5]
Definition: trsp.h:52
trsp_edge_wrapper
int trsp_edge_wrapper(edge_t *edges, size_t edge_count, restrict_t *restricts, size_t restrict_count, int64_t start_edge, double start_pos, int64_t end_edge, double end_pos, bool directed, bool has_reverse_cost, path_element_tt **path, size_t *path_count, char **err_msg)
Definition: trsp_core.cpp:37
path_element_tt
struct path_element path_element_tt