19 template <Automaton Aut>
63 auto i = std::find_if(
path.rbegin(),
path.rend(), [&] (
auto curr) {
66 assert(i !=
path.rend());
70 for (
auto i =
path.begin(); i != last; ++i)
71 res.emplace_back(
aut_->weight_of(*i), *i);
78 const auto& ws = *
aut_->weightset();
82 if (s ==
aut_->null_state() || next ==
aut_->null_state())
87 assert(t !=
aut_->null_transition());
99 auto min_tr =
aut_->null_transition();
101 if (min_tr ==
aut_->null_transition()
102 ||
aut_->weightset()->less(
aut_->weight_of(tr),
103 aut_->weight_of(min_tr)))
static constexpr int null_parent_path
const path_t & get_path() const
bool operator<(const implicit_path &other) const
state_t_of< automaton_t > state_t
typename detail::state_t_of_impl< base_t< ValueSet > >::type state_t_of
value_impl< detail::weight_tag > weight
const weight_t & get_weight() const
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.
typename detail::weight_t_of_impl< base_t< ValueSet > >::type weight_t_of
transition_t get_sidetrack() const
implicit_path(const automaton_t &aut, transition_t sidetrack, int parent_path, weight_t weight)
Explicit path representation.
Implicit Path representation.
typename detail::transition_t_of_impl< base_t< ValueSet > >::type transition_t_of
transition_t find_transition(state_t src, state_t dst) const
Find the lightest transition from src to dst.
transition_t_of< automaton_t > transition_t
auto outin(const Aut &aut, state_t_of< Aut > s, state_t_of< Aut > d)
Indexes of visible transitions from state s to state d.
int parent_path_
Parent path indexes in the results array.
state_t get_parent_of(state_t s)
weight_t_of< automaton_t > weight_t