Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Contents of /trunk/src/functions.h
Parent Directory
|
Revision Log
Revision 358 -
(show annotations)
(download)
(as text)
Fri Apr 9 15:15:02 2010 UTC (14 years, 11 months ago) by amb
File MIME type: text/x-chdr
File size: 3621 byte(s)
Fri Apr 9 15:15:02 2010 UTC (14 years, 11 months ago) by amb
File MIME type: text/x-chdr
File size: 3621 byte(s)
Add an option '--sort-ram-size' to specify the RAM to use for sorting - defaults to 256MB if not using slim mode.
1 | /*************************************** |
2 | $Header: /home/amb/CVS/routino/src/functions.h,v 1.52 2010-04-09 15:15:02 amb Exp $ |
3 | |
4 | Header file for function prototypes |
5 | |
6 | Part of the Routino routing software. |
7 | ******************/ /****************** |
8 | This file Copyright 2008-2010 Andrew M. Bishop |
9 | |
10 | 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 | ***************************************/ |
23 | |
24 | |
25 | #ifndef FUNCTIONS_H |
26 | #define FUNCTIONS_H /*+ To stop multiple inclusions. +*/ |
27 | |
28 | #include <sys/types.h> |
29 | #include <stdio.h> |
30 | |
31 | #include "types.h" |
32 | #include "profiles.h" |
33 | #include "results.h" |
34 | |
35 | |
36 | /* In router.c */ |
37 | |
38 | /*+ Return true if this is a fake node. +*/ |
39 | #define IsFakeNode(xxx) ((xxx)&NODE_SUPER) |
40 | |
41 | index_t CreateFakes(Nodes *nodes,int point,Segment *segment,index_t node1,index_t node2,distance_t dist1,distance_t dist2); |
42 | |
43 | void GetFakeLatLong(index_t node, double *latitude,double *longitude); |
44 | |
45 | Segment *FirstFakeSegment(index_t node); |
46 | Segment *NextFakeSegment(Segment *segment,index_t node); |
47 | Segment *ExtraFakeSegment(index_t node,index_t fakenode); |
48 | |
49 | |
50 | /* In files.c */ |
51 | |
52 | char *FileName(const char *dirname,const char *prefix, const char *name); |
53 | |
54 | void *MapFile(const char *filename); |
55 | void *UnmapFile(const char *filename); |
56 | |
57 | int OpenFile(const char *filename); |
58 | int AppendFile(const char *filename); |
59 | int ReOpenFile(const char *filename); |
60 | |
61 | int WriteFile(int fd,const void *address,size_t length); |
62 | int ReadFile(int fd,void *address,size_t length); |
63 | |
64 | off_t SizeFile(const char *filename); |
65 | int ExistsFile(const char *filename); |
66 | |
67 | int SeekFile(int fd,off_t position); |
68 | |
69 | void CloseFile(int fd); |
70 | |
71 | int DeleteFile(char *filename); |
72 | |
73 | |
74 | /* In optimiser.c */ |
75 | |
76 | Results *FindNormalRoute(Nodes *nodes,Segments *segments,Ways *ways,index_t start,index_t finish,Profile *profile); |
77 | Results *FindMiddleRoute(Nodes *supernodes,Segments *supersegments,Ways *superways,Results *begin,Results *end,Profile *profile); |
78 | |
79 | Results *FindStartRoutes(Nodes *nodes,Segments *segments,Ways *ways,index_t start,Profile *profile); |
80 | Results *FindFinishRoutes(Nodes *nodes,Segments *segments,Ways *ways,index_t finish,Profile *profile); |
81 | |
82 | Results *CombineRoutes(Results *results,Nodes *nodes,Segments *segments,Ways *ways,Profile *profile); |
83 | |
84 | void FixForwardRoute(Results *results,index_t finish); |
85 | |
86 | |
87 | /* In output.c */ |
88 | |
89 | void PrintRouteHead(const char *copyright); |
90 | void PrintRoute(Results **results,int nresults,Nodes *nodes,Segments *segments,Ways *ways,Profile *profile); |
91 | void PrintRouteTail(void); |
92 | |
93 | |
94 | /* In sorting.c */ |
95 | |
96 | /*+ The type, size and alignment of variable to store the variable length +*/ |
97 | #define FILESORT_VARINT unsigned short |
98 | #define FILESORT_VARSIZE sizeof(FILESORT_VARINT) |
99 | #define FILESORT_VARALIGN sizeof(void*) |
100 | |
101 | void filesort_fixed(int fd_in,int fd_out,size_t itemsize,int (*compare)(const void*,const void*),int (*buildindex)(void*,index_t)); |
102 | |
103 | void filesort_vary(int fd_in,int fd_out,int (*compare)(const void*,const void*),int (*buildindex)(void*,index_t)); |
104 | |
105 | void heapsort(void **datap,size_t nitems,int(*compare)(const void*, const void*)); |
106 | |
107 | |
108 | #endif /* FUNCTIONS_H */ |
Properties
Name | Value |
---|---|
cvs:description | Function prototypes. |