~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to include/defs/neta.h

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef GRASS_NETADEFS_H
 
2
#define GRASS_NETADEFS_H
 
3
 
 
4
/*bridge.c */
 
5
int NetA_compute_bridges(dglGraph_s * graph, struct ilist *bridge_list);
 
6
int NetA_articulation_points(dglGraph_s * graph,
 
7
                             struct ilist *articulation_list);
 
8
 
 
9
/*components.c */
 
10
int NetA_weakly_connected_components(dglGraph_s * graph, int *component);
 
11
int NetA_strongly_connected_components(dglGraph_s * graph, int *component);
 
12
 
 
13
/*spanningtree.c */
 
14
int NetA_spanning_tree(dglGraph_s * graph, struct ilist *tree_list);
 
15
 
 
16
/*neta_flow.c */
 
17
int NetA_flow(dglGraph_s * graph, struct ilist *source_list,
 
18
              struct ilist *sink_list, int *flow);
 
19
int NetA_min_cut(dglGraph_s * graph, struct ilist *source_list,
 
20
                 struct ilist *sink_list, int *flow, struct ilist *cut);
 
21
int NetA_split_vertices(dglGraph_s * in, dglGraph_s * out, int *node_costs);
 
22
 
 
23
/*utils.c */
 
24
void NetA_add_point_on_node(struct Map_info *In, struct Map_info *Out, int node,
 
25
                            struct line_cats *Cats);
 
26
void NetA_points_to_nodes(struct Map_info *In, struct ilist *point_list);
 
27
int NetA_get_node_costs(struct Map_info *In, int layer, char *column,
 
28
                        int *node_costs);
 
29
void NetA_varray_to_nodes(struct Map_info *map, struct varray * varray,
 
30
                          struct ilist *nodes, int *nodes_to_features);
 
31
int NetA_initialise_varray(struct Map_info *In, int layer, int mask_type,
 
32
                           char *where, char *cat, struct varray ** varray);
 
33
/*centrality.c */
 
34
void NetA_degree_centrality(dglGraph_s * graph, double *degree);
 
35
int NetA_eigenvector_centrality(dglGraph_s * graph, int iterations,
 
36
                                double error, double *eigenvector);
 
37
int NetA_betweenness_closeness(dglGraph_s * graph, double *betweenness,
 
38
                               double *closeness);
 
39
 
 
40
/*path.c */
 
41
int NetA_distance_from_points(dglGraph_s * graph, struct ilist *from, int *dst,
 
42
                              dglInt32_t ** prev);
 
43
int NetA_find_path(dglGraph_s * graph, int from, int to, int *edges,
 
44
                   struct ilist *list);
 
45
 
 
46
/*timetables.c */
 
47
 
 
48
/*Structure containing all information about a timetable.
 
49
 * Everything in indexed from 0.
 
50
 */
 
51
typedef struct
 
52
{
 
53
    int routes;                 /*Number of different routes. Two routes are different even if they differ only in time. */
 
54
    int *route_length;          /*Length of each route, i.e., number of stops */
 
55
    int **route_stops;          /*list of stops on each route in order (time increases) */
 
56
    int **route_times;          /*stop arrival times on overy route. Stops are given in the same order as above */
 
57
    int stops;                  /*number of stops */
 
58
    int *stop_length;           /*Number of routes stopping at each stop */
 
59
    int **stop_routes;          /*List of routes for each stop. Routes are in increasing order */
 
60
    int **stop_times;           /*arrival times of routes for each stop. Routes are given in the same order as above */
 
61
    int *walk_length;           /*number of stops with "walking connection" for each stop */
 
62
    int **walk_stops;           /*list of stops within walking distance for each stop */
 
63
    int **walk_times;           /*walking times between stops as given above */
 
64
} neta_timetable;
 
65
 
 
66
typedef struct
 
67
{
 
68
    int **dst;
 
69
    int **prev_stop;
 
70
    int **prev_route;
 
71
    int **prev_conn;
 
72
    int rows, routes;
 
73
} neta_timetable_result;
 
74
int NetA_init_timetable_from_db(struct Map_info *In, int route_layer,
 
75
                                int walk_layer, char *route_id, char *times,
 
76
                                char *to_stop, char *walk_length,
 
77
                                neta_timetable * timetable, int **route_ids,
 
78
                                int **stop_ids);
 
79
int NetA_timetable_shortest_path(neta_timetable * timetable, int from_stop,
 
80
                                 int to_stop, int start_time, int min_change,
 
81
                                 int max_changes, int walking_change,
 
82
                                 neta_timetable_result * result);
 
83
int NetA_timetable_get_route_time(neta_timetable * timetable, int stop,
 
84
                                  int route);
 
85
void NetA_timetable_result_release(neta_timetable_result * result);
 
86
 
 
87
#endif