straph.paths package¶
Submodules¶
straph.paths.path_object module¶
straph.paths.paths module¶
-
straph.paths.paths.
FP_update
(L, R, t0, t1, u, v)[source]¶ Lu is sorted by the value of su and we analyze temporal links in temporal order. :param R: :param L: :param t0: :param t1: :param u: :param v: :return:
-
straph.paths.paths.
FoP
(S, source, destination=None, start_time=None, E=None)[source]¶ If destination is specified: Return the time to reach destination from source in S. Otherwise: Return the time to reach every reachable node in S from source. :param E: :param S: Stream graph :param source: temporal source node :param destination: optional :param start_time: optional, if not specified assume that the start time is source[0] :return:
-
straph.paths.paths.
FoP_initialisation
(S, source)[source]¶ ‘L’ initialisation for FoP
- Parameters
-
S –
source –
- Returns
-
straph.paths.paths.
FoP_postprocess
(R, source, destination=None, start_time=None)[source]¶ Post process elements in ‘L’ to obtain time to reach ‘ttr’
- Parameters
-
start_time –
R –
source –
destination – optional
- Returns
-
straph.paths.paths.
FoP_update
(L, R, t0, t1, u, v)[source]¶ We update ‘L’ according to the link (t0,t1,u,v) and FoP properties.
- Parameters
-
R –
L –
t0 –
t1 –
u –
v –
- Returns
-
straph.paths.paths.
L_Algorithm
(S, source, initialisation_function, update_function, source_init_function, start_time=None, is_temporal_source=False, sfp_special_case=False, E=None)[source]¶ An implementation of L-Algorithm (described in ~add ref): Single Source Algorithm to compute temporal paths in Stream Graph IMPORTANT : We suppose that we are in the WCC of ‘source’ otherwise it’s fucking expensive !
- Parameters
-
E –
sfp_special_case –
is_temporal_source –
start_time –
source_init_function –
update_function –
S – A Stream Graph
source – A temporal source node
initialisation_function – Functions according to the path’s type (supported: - foremost path - shortest foremost path - shortest path - fastest shortest path - fastest path - shortest fastest path)
- Returns
R containing the best results
-
straph.paths.paths.
SFP_update
(L, R, t0, t1, u, v)[source]¶ Update L and R according to the link (t0,t1,u,v) :param L: :param R: :param t0: :param t1: :param u: :param v: :return:
-
straph.paths.paths.
SFP_update_old
(L, R, t0, t1, u, v)[source]¶ Update Lv from (t0,t1,u,v) according to SFP constraints. Dans L_u pour les SFP on a : soit un seul triplet et a_u > s_u either many triplets and a_u <= s_u, they are sorted by their departure time
- Parameters
-
R –
L –
t0 –
t1 –
u –
v –
- Returns
-
straph.paths.paths.
SFoP_postprocess
(R, source, destination=None, start_time=None)[source]¶ Post Process elements in ‘L’ to obtain times to reach and lengths of shortest foremost path
- Parameters
-
R –
source –
destination –
start_time –
- Returns
-
straph.paths.paths.
SP_update
(L, R, t0, t1, u, v)[source]¶ Update Lv with the best element of Lu ! :param R: :param L: :param t0: :param t1: :param u: :param v: :return:
-
straph.paths.paths.
bfs_update
(L, R, source, batch_links, temporal_adjacency_list, update_function, sfp_special_case=False)[source]¶ Proceeds to browse every links present at instant :math:’t_0’ in order to propagate the update on current possible paths
- Parameters
-
sfp_special_case –
R –
L –
source –
batch_links –
temporal_adjacency_list –
update_function –
- Returns
-
straph.paths.paths.
get_temporal_sources
(S, source)[source]¶ Return the maximal segmented nodes (t0,t1,u) s.t u = source.
- Parameters
-
S – Stream Graph
source – source node
- Returns