1
#ifndef GRASS_NETADEFS_H
2
#define GRASS_NETADEFS_H
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);
10
int NetA_weakly_connected_components(dglGraph_s * graph, int *component);
11
int NetA_strongly_connected_components(dglGraph_s * graph, int *component);
14
int NetA_spanning_tree(dglGraph_s * graph, struct ilist *tree_list);
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);
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,
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);
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,
41
int NetA_distance_from_points(dglGraph_s * graph, struct ilist *from, int *dst,
43
int NetA_find_path(dglGraph_s * graph, int from, int to, int *edges,
48
/*Structure containing all information about a timetable.
49
* Everything in indexed from 0.
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 */
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,
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,
85
void NetA_timetable_result_release(neta_timetable_result * result);