Routino SVN Repository Browser

Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino

ViewVC logotype

Annotation of /trunk/src/functions.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 471 - (hide annotations) (download) (as text)
Wed Aug 4 16:44:52 2010 UTC (14 years, 7 months ago) by amb
File MIME type: text/x-chdr
File size: 3210 byte(s)
Change the way that fake nodes and segments are recognised (allows nearly 4G
nodes to be stored instead of 2G nodes).

1 amb 2 /***************************************
2 amb 471 $Header: /home/amb/CVS/routino/src/functions.h,v 1.57 2010-08-04 16:44:51 amb Exp $
3 amb 2
4     Header file for function prototypes
5 amb 151
6     Part of the Routino routing software.
7 amb 2 ******************/ /******************
8 amb 326 This file Copyright 2008-2010 Andrew M. Bishop
9 amb 2
10 amb 151 This program is free software: you can redistribute it and/or modify
11     it under the terms of the GNU Affero General Public License as published by
12     the Free Software Foundation, either version 3 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 Affero General Public License for more details.
19    
20     You should have received a copy of the GNU Affero General Public License
21     along with this program. If not, see <http://www.gnu.org/licenses/>.
22 amb 2 ***************************************/
23    
24    
25     #ifndef FUNCTIONS_H
26     #define FUNCTIONS_H /*+ To stop multiple inclusions. +*/
27    
28 amb 449 #include "types.h"
29 amb 2
30 amb 82 #include "profiles.h"
31 amb 31 #include "results.h"
32 amb 2
33 amb 26
34 amb 456 /*+ The number of waypoints allowed to be specified. +*/
35     #define NWAYPOINTS 99
36 amb 303
37 amb 456
38     /* In fakes.c */
39    
40 amb 303 /*+ Return true if this is a fake node. +*/
41 amb 471 #define IsFakeNode(xxx) ((xxx)>=NODE_FAKE)
42 amb 303
43 amb 456 /*+ Return true if this is a fake segment. +*/
44 amb 471 #define IsFakeSegment(xxx) ((xxx)>=SEGMENT_FAKE)
45 amb 456
46 amb 303 index_t CreateFakes(Nodes *nodes,int point,Segment *segment,index_t node1,index_t node2,distance_t dist1,distance_t dist2);
47    
48     void GetFakeLatLong(index_t node, double *latitude,double *longitude);
49    
50     Segment *FirstFakeSegment(index_t node);
51     Segment *NextFakeSegment(Segment *segment,index_t node);
52     Segment *ExtraFakeSegment(index_t node,index_t fakenode);
53    
54 amb 456 Segment *LookupFakeSegment(index_t index);
55     index_t IndexFakeSegment(Segment *segment);
56 amb 303
57 amb 456
58 amb 2 /* In optimiser.c */
59    
60 amb 238 Results *FindNormalRoute(Nodes *nodes,Segments *segments,Ways *ways,index_t start,index_t finish,Profile *profile);
61     Results *FindMiddleRoute(Nodes *supernodes,Segments *supersegments,Ways *superways,Results *begin,Results *end,Profile *profile);
62 amb 2
63 amb 126 Results *FindStartRoutes(Nodes *nodes,Segments *segments,Ways *ways,index_t start,Profile *profile);
64     Results *FindFinishRoutes(Nodes *nodes,Segments *segments,Ways *ways,index_t finish,Profile *profile);
65 amb 31
66 amb 165 Results *CombineRoutes(Results *results,Nodes *nodes,Segments *segments,Ways *ways,Profile *profile);
67 amb 31
68 amb 290 void FixForwardRoute(Results *results,index_t finish);
69 amb 31
70 amb 290
71 amb 161 /* In output.c */
72    
73 amb 317 void PrintRoute(Results **results,int nresults,Nodes *nodes,Segments *segments,Ways *ways,Profile *profile);
74 amb 161
75    
76 amb 270 /* In sorting.c */
77    
78 amb 358 /*+ The type, size and alignment of variable to store the variable length +*/
79 amb 311 #define FILESORT_VARINT unsigned short
80     #define FILESORT_VARSIZE sizeof(FILESORT_VARINT)
81 amb 358 #define FILESORT_VARALIGN sizeof(void*)
82 amb 310
83 amb 311 void filesort_fixed(int fd_in,int fd_out,size_t itemsize,int (*compare)(const void*,const void*),int (*buildindex)(void*,index_t));
84 amb 310
85 amb 311 void filesort_vary(int fd_in,int fd_out,int (*compare)(const void*,const void*),int (*buildindex)(void*,index_t));
86    
87 amb 270 void heapsort(void **datap,size_t nitems,int(*compare)(const void*, const void*));
88    
89    
90 amb 2 #endif /* FUNCTIONS_H */

Properties

Name Value
cvs:description Function prototypes.