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 303 - (hide annotations) (download) (as text)
Sat Nov 14 19:39:20 2009 UTC (15 years, 4 months ago) by amb
File MIME type: text/x-chdr
File size: 3218 byte(s)
If a selected waypoint is not very close to an existing node then insert a fake
node in the segment that comes closest and use that instead.

1 amb 2 /***************************************
2 amb 303 $Header: /home/amb/CVS/routino/src/functions.h,v 1.45 2009-11-14 19:39:19 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 151 This file Copyright 2008,2009 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     #include <stdio.h>
29    
30 amb 97 #include "types.h"
31 amb 82 #include "profiles.h"
32 amb 31 #include "results.h"
33 amb 2
34 amb 26
35 amb 303 /* In router.c */
36    
37     /*+ Return true if this is a fake node. +*/
38     #define IsFakeNode(xxx) ((xxx)&NODE_SUPER)
39    
40     index_t CreateFakes(Nodes *nodes,int point,Segment *segment,index_t node1,index_t node2,distance_t dist1,distance_t dist2);
41    
42     void GetFakeLatLong(index_t node, double *latitude,double *longitude);
43    
44     Segment *FirstFakeSegment(index_t node);
45     Segment *NextFakeSegment(Segment *segment,index_t node);
46     Segment *ExtraFakeSegment(index_t node,index_t fakenode);
47    
48    
49 amb 2 /* In files.c */
50    
51 amb 162 char *FileName(const char *dirname,const char *prefix, const char *name);
52    
53 amb 250 void *MapFile(const char *filename);
54 amb 255 void *UnmapFile(const char *filename);
55 amb 2
56 amb 87 int OpenFile(const char *filename);
57 amb 251 int ReOpenFile(const char *filename);
58    
59 amb 259 int WriteFile(int fd,const void *address,size_t length);
60 amb 251 int ReadFile(int fd,void *address,size_t length);
61     int SeekFile(int fd,size_t position);
62    
63 amb 97 void CloseFile(int fd);
64 amb 2
65 amb 251 int DeleteFile(char *filename);
66 amb 87
67 amb 251
68 amb 2 /* In optimiser.c */
69    
70 amb 238 Results *FindNormalRoute(Nodes *nodes,Segments *segments,Ways *ways,index_t start,index_t finish,Profile *profile);
71     Results *FindMiddleRoute(Nodes *supernodes,Segments *supersegments,Ways *superways,Results *begin,Results *end,Profile *profile);
72 amb 2
73 amb 126 Results *FindStartRoutes(Nodes *nodes,Segments *segments,Ways *ways,index_t start,Profile *profile);
74     Results *FindFinishRoutes(Nodes *nodes,Segments *segments,Ways *ways,index_t finish,Profile *profile);
75 amb 31
76 amb 165 Results *CombineRoutes(Results *results,Nodes *nodes,Segments *segments,Ways *ways,Profile *profile);
77 amb 31
78 amb 290 void FixForwardRoute(Results *results,index_t finish);
79 amb 31
80 amb 290
81 amb 161 /* In output.c */
82    
83 amb 164 void PrintRouteHead(const char *copyright);
84 amb 165 void PrintRoute(Results *results,Nodes *nodes,Segments *segments,Ways *ways,Profile *profile);
85 amb 164 void PrintRouteTail(void);
86 amb 161
87    
88 amb 270 /* In sorting.c */
89    
90     void filesort(int fd_in,int fd_out,size_t itemsize,size_t ramsize,int (*compare)(const void*,const void*),
91 amb 274 int (*buildindex)(void*,index_t));
92 amb 270 void heapsort(void **datap,size_t nitems,int(*compare)(const void*, const void*));
93    
94    
95 amb 2 #endif /* FUNCTIONS_H */

Properties

Name Value
cvs:description Function prototypes.