20 template <Automaton Aut>
65 auto i = std::find_if(
path.rbegin(),
path.rend(), [&] (
auto curr) {
68 assert(i !=
path.rend());
72 for (
auto i =
path.begin(); i != last; ++i)
73 res.emplace_back(
aut_->weight_of(*i), *i);
80 const auto& ws = *
aut_->weightset();
84 if (s ==
aut_->null_state() || next ==
aut_->null_state())
89 assert(t !=
aut_->null_transition());
106 [
this] (
auto t1,
auto t2)
108 return aut_->weightset()->less
109 (
aut_->weight_of(t1),
110 aut_->weight_of(t2));
transition_t find_transition(state_t src, state_t dst) const
Find the lightest transition from src to dst.
typename detail::transition_t_of_impl< base_t< ValueSet > >::type transition_t_of
typename detail::state_t_of_impl< base_t< ValueSet > >::type state_t_of
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.
Implicit Path representation.
transition_t get_sidetrack() const
Container::value_type min_forward(const Container &container, Comp comp)
Same as *std::max_element, but works with an input iterator, not just a forward iterator.
const weight_t & get_weight() const
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.
Explicit path representation.
int parent_path_
Parent path indexes in the results array.
static constexpr int null_parent_path
weight_t_of< automaton_t > weight_t
state_t get_parent_of(state_t s) const
path< automaton_t > path_t
transition_t_of< automaton_t > transition_t
typename detail::weight_t_of_impl< base_t< ValueSet > >::type weight_t_of
implicit_path(const automaton_t &aut, transition_t sidetrack, int parent_path, weight_t weight)
state_t_of< automaton_t > state_t
value_impl< detail::weight_tag > weight
const path_t & get_path() const
bool operator<(const implicit_path &other) const