![]() |
Vcsn
2.5
Be Rational
|
Implicit Path representation. More...
#include <implicit-path.hh>
Public Member Functions | |
implicit_path (const automaton_t &aut, transition_t sidetrack, int parent_path, weight_t weight) | |
path< automaton_t > | explicit_path (const std::vector< path< automaton_t >> &ksp, shortest_path_tree< automaton_t > &tree, state_t src) |
Create the explicit representation of the implicit path. More... | |
transition_t | find_transition (state_t src, state_t dst) const |
Find the lightest transition from src to dst. More... | |
bool | operator< (const implicit_path &other) const |
const weight_t & | get_weight () const |
transition_t | get_sidetrack () const |
Static Public Attributes | |
static constexpr int | null_parent_path = -1 |
Private Types | |
using | automaton_t = Aut |
using | state_t = state_t_of< automaton_t > |
using | transition_t = transition_t_of< automaton_t > |
using | weight_t = weight_t_of< automaton_t > |
Private Attributes | |
const automaton_t & | aut_ |
transition_t | sidetrack_ |
int | parent_path_ |
Parent path indexes in the results array. More... | |
weight_t | weight_ |
Implicit Path representation.
Abstract representation of paths represented by their parent path (N-th shortest path, previously computed) and the sidetrack transition (variation of the previous shortet path with a sidetrack transition). The path's weight is stored to be able to sort these paths in the next shortest path retrieval.
Definition at line 20 of file implicit-path.hh.
|
private |
Definition at line 22 of file implicit-path.hh.
|
private |
Definition at line 23 of file implicit-path.hh.
|
private |
Definition at line 24 of file implicit-path.hh.
|
private |
Definition at line 25 of file implicit-path.hh.
|
inline |
Definition at line 30 of file implicit-path.hh.
References vcsn::detail::implicit_path< Aut >::parent_path_, vcsn::detail::implicit_path< Aut >::sidetrack_, and vcsn::detail::implicit_path< Aut >::weight_.
|
inline |
Create the explicit representation of the implicit path.
Use the vector of previous ksp results to retrieve the parent path. Find the prefix path of sidetrack in the parent path and push it in the result path. Then, add transitions from sidetrack_ to the destination using tree. In case of initial path, use src as the prefix path.
Definition at line 47 of file implicit-path.hh.
References vcsn::detail::implicit_path< Aut >::aut_, vcsn::detail::implicit_path< Aut >::find_transition(), vcsn::detail::shortest_path_tree< Aut >::get_parent_of(), vcsn::detail::path< Aut >::get_path(), vcsn::detail::shortest_path_tree< Aut >::get_root(), vcsn::detail::implicit_path< Aut >::get_weight(), vcsn::detail::implicit_path< Aut >::parent_path_, vcsn::res, and vcsn::detail::implicit_path< Aut >::sidetrack_.
|
inline |
Find the lightest transition from src to dst.
Definition at line 97 of file implicit-path.hh.
References vcsn::detail::implicit_path< Aut >::aut_, and vcsn::detail::outin().
Referenced by vcsn::detail::implicit_path< Aut >::explicit_path().
|
inline |
Definition at line 118 of file implicit-path.hh.
References vcsn::detail::implicit_path< Aut >::sidetrack_.
Referenced by vcsn::detail::eppstein< Aut >::add_children_to_queue_().
|
inline |
Definition at line 113 of file implicit-path.hh.
References vcsn::detail::implicit_path< Aut >::weight_.
Referenced by vcsn::detail::eppstein< Aut >::add_children_to_queue_(), and vcsn::detail::implicit_path< Aut >::explicit_path().
|
inline |
Definition at line 108 of file implicit-path.hh.
References vcsn::detail::implicit_path< Aut >::aut_, and vcsn::detail::implicit_path< Aut >::weight_.
|
private |
Definition at line 124 of file implicit-path.hh.
Referenced by vcsn::detail::implicit_path< Aut >::explicit_path(), vcsn::detail::implicit_path< Aut >::find_transition(), and vcsn::detail::implicit_path< Aut >::operator<().
|
static |
Definition at line 28 of file implicit-path.hh.
Referenced by vcsn::detail::eppstein< Aut >::k_shortest_path().
|
private |
Parent path indexes in the results array.
-1 if the path has no parent, superior to 0 otherwise.
Definition at line 128 of file implicit-path.hh.
Referenced by vcsn::detail::implicit_path< Aut >::explicit_path(), and vcsn::detail::implicit_path< Aut >::implicit_path().
|
private |
Definition at line 125 of file implicit-path.hh.
Referenced by vcsn::detail::implicit_path< Aut >::explicit_path(), vcsn::detail::implicit_path< Aut >::get_sidetrack(), and vcsn::detail::implicit_path< Aut >::implicit_path().
|
private |
Definition at line 129 of file implicit-path.hh.
Referenced by vcsn::detail::implicit_path< Aut >::get_weight(), vcsn::detail::implicit_path< Aut >::implicit_path(), and vcsn::detail::implicit_path< Aut >::operator<().