Vcsn  2.8
Be Rational
vcsn::detail::implicit_path< Aut > Class Template Reference

Implicit Path representation. More...

#include <implicit-path.hh>

Collaboration diagram for vcsn::detail::implicit_path< Aut >:

Public Member Functions

 implicit_path (const automaton_t &aut, transition_t sidetrack, int parent_path, weight_t weight)
 
path_t explicit_path (const std::vector< path_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_tget_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 >
 
using path_t = path< automaton_t >
 

Private Attributes

const automaton_taut_
 
transition_t sidetrack_
 
int parent_path_
 Parent path indexes in the results array. More...
 
weight_t weight_
 

Detailed Description

template<Automaton Aut>
class vcsn::detail::implicit_path< Aut >

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 21 of file implicit-path.hh.

Member Typedef Documentation

◆ automaton_t

template<Automaton Aut>
using vcsn::detail::implicit_path< Aut >::automaton_t = Aut
private

Definition at line 23 of file implicit-path.hh.

◆ path_t

template<Automaton Aut>
using vcsn::detail::implicit_path< Aut >::path_t = path<automaton_t>
private

Definition at line 27 of file implicit-path.hh.

◆ state_t

template<Automaton Aut>
using vcsn::detail::implicit_path< Aut >::state_t = state_t_of<automaton_t>
private

Definition at line 24 of file implicit-path.hh.

◆ transition_t

template<Automaton Aut>
using vcsn::detail::implicit_path< Aut >::transition_t = transition_t_of<automaton_t>
private

Definition at line 25 of file implicit-path.hh.

◆ weight_t

template<Automaton Aut>
using vcsn::detail::implicit_path< Aut >::weight_t = weight_t_of<automaton_t>
private

Definition at line 26 of file implicit-path.hh.

Constructor & Destructor Documentation

◆ implicit_path()

template<Automaton Aut>
vcsn::detail::implicit_path< Aut >::implicit_path ( const automaton_t aut,
transition_t  sidetrack,
int  parent_path,
weight_t  weight 
)
inline

Member Function Documentation

◆ explicit_path()

template<Automaton Aut>
path_t vcsn::detail::implicit_path< Aut >::explicit_path ( const std::vector< path_t > &  ksp,
shortest_path_tree< automaton_t > &  tree,
state_t  src 
)
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 49 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_.

Here is the call graph for this function:

◆ find_transition()

template<Automaton Aut>
transition_t vcsn::detail::implicit_path< Aut >::find_transition ( state_t  src,
state_t  dst 
) const
inline

Find the lightest transition from src to dst.

Definition at line 99 of file implicit-path.hh.

References vcsn::detail::implicit_path< Aut >::aut_, vcsn::detail::min_forward(), and vcsn::detail::outin().

Referenced by vcsn::detail::implicit_path< Aut >::explicit_path().

Here is the call graph for this function:

◆ get_sidetrack()

template<Automaton Aut>
transition_t vcsn::detail::implicit_path< Aut >::get_sidetrack ( ) const
inline

◆ get_weight()

◆ operator<()

template<Automaton Aut>
bool vcsn::detail::implicit_path< Aut >::operator< ( const implicit_path< Aut > &  other) const
inline

Member Data Documentation

◆ aut_

◆ null_parent_path

template<Automaton Aut>
constexpr int vcsn::detail::implicit_path< Aut >::null_parent_path = -1
static

Definition at line 30 of file implicit-path.hh.

Referenced by vcsn::detail::eppstein< Aut >::k_shortest_path().

◆ parent_path_

template<Automaton Aut>
int vcsn::detail::implicit_path< Aut >::parent_path_
private

Parent path indexes in the results array.

null_parent_path if the path has no parent.

Definition at line 134 of file implicit-path.hh.

Referenced by vcsn::detail::implicit_path< Aut >::explicit_path(), and vcsn::detail::implicit_path< Aut >::implicit_path().

◆ sidetrack_

◆ weight_


The documentation for this class was generated from the following file: