![]() |
Vcsn
2.5
Be Rational
|
Dijkstra Node implementation. More...
#include <dijkstra-node.hh>
Public Member Functions | |
dijkstra_node ()=default | |
dijkstra_node (const automaton_t &aut, state_t state, boost::optional< weight_t > weight, state_t parent, unsigned depth=std::numeric_limits< unsigned >::max()) | |
bool | operator< (const dijkstra_node &other) const |
Compare weights, used to order nodes in the shortest path heap. More... | |
weight_t | get_weight () const |
If there is no weight in the node then its weight is the weightset's maximum. More... | |
void | set_weight (weight_t weight) |
state_t | get_state () const |
unsigned | get_depth () const |
void | set_depth (unsigned depth) |
void | set_parent (state_t parent) |
state_t | get_parent () const |
Private Types | |
using | automaton_t = Aut |
using | weight_t = weight_t_of< automaton_t > |
using | state_t = state_t_of< automaton_t > |
using | weightset_ptr = const weightset_t_of< automaton_t > * |
We have 2 alternatives to raw pointer: More... | |
Private Attributes | |
unsigned | depth_ |
state_t | state_ |
state_t | parent_ |
boost::optional< weight_t > | weight_ |
weightset_ptr | ws_ |
Dijkstra Node implementation.
Abstract representation of each node in shortest paths. Represented by their corresponding state, weight, depth in the automaton, and parent in the shortest path tree. Used by Eppstein algorithm to retrieve the next best predecessor to be treated. Sorted in a heap considering their weights (during the first path computation). Default constructed weights correspond to the maximum value of the weightset.
Definition at line 23 of file dijkstra-node.hh.
|
private |
Definition at line 25 of file dijkstra-node.hh.
|
private |
Definition at line 27 of file dijkstra-node.hh.
|
private |
Definition at line 26 of file dijkstra-node.hh.
|
private |
We have 2 alternatives to raw pointer:
aut->weightset()
would work but slows the algorithm down as a lot of dijkstra nodes are created. Hence, we stick with the raw pointer for now. Definition at line 35 of file dijkstra-node.hh.
|
default |
|
inline |
Definition at line 39 of file dijkstra-node.hh.
References vcsn::detail::dijkstra_node< Aut >::parent_, vcsn::detail::dijkstra_node< Aut >::state_, vcsn::detail::dijkstra_node< Aut >::weight_, and vcsn::detail::dijkstra_node< Aut >::ws_.
|
inline |
Definition at line 82 of file dijkstra-node.hh.
References vcsn::detail::dijkstra_node< Aut >::depth_.
|
inline |
Definition at line 100 of file dijkstra-node.hh.
References vcsn::detail::dijkstra_node< Aut >::parent_.
|
inline |
Definition at line 76 of file dijkstra-node.hh.
References vcsn::detail::dijkstra_node< Aut >::state_.
|
inline |
If there is no weight in the node then its weight is the weightset's maximum.
Definition at line 64 of file dijkstra-node.hh.
References vcsn::detail::dijkstra_node< Aut >::weight_, and vcsn::detail::dijkstra_node< Aut >::ws_.
Referenced by vcsn::detail::compute_shortest_path_tree().
|
inline |
Compare weights, used to order nodes in the shortest path heap.
Definition at line 51 of file dijkstra-node.hh.
References vcsn::detail::dijkstra_node< Aut >::weight_, and vcsn::detail::dijkstra_node< Aut >::ws_.
|
inline |
Definition at line 88 of file dijkstra-node.hh.
References vcsn::detail::dijkstra_node< Aut >::depth_.
|
inline |
Definition at line 94 of file dijkstra-node.hh.
References vcsn::detail::dijkstra_node< Aut >::parent_.
|
inline |
Definition at line 70 of file dijkstra-node.hh.
References vcsn::detail::dijkstra_node< Aut >::weight_.
Referenced by vcsn::detail::compute_shortest_path_tree().
|
private |
Definition at line 106 of file dijkstra-node.hh.
Referenced by vcsn::detail::dijkstra_node< Aut >::get_depth(), and vcsn::detail::dijkstra_node< Aut >::set_depth().
|
private |
Definition at line 108 of file dijkstra-node.hh.
Referenced by vcsn::detail::dijkstra_node< Aut >::dijkstra_node(), vcsn::detail::dijkstra_node< Aut >::get_parent(), and vcsn::detail::dijkstra_node< Aut >::set_parent().
|
private |
Definition at line 107 of file dijkstra-node.hh.
Referenced by vcsn::detail::shortest_path_tree< Aut >::add(), vcsn::detail::dijkstra_node< Aut >::dijkstra_node(), and vcsn::detail::dijkstra_node< Aut >::get_state().
|
private |
Definition at line 109 of file dijkstra-node.hh.
Referenced by vcsn::detail::dijkstra_node< Aut >::dijkstra_node(), vcsn::detail::dijkstra_node< Aut >::get_weight(), vcsn::detail::dijkstra_node< Aut >::operator<(), and vcsn::detail::dijkstra_node< Aut >::set_weight().
|
private |
Definition at line 110 of file dijkstra-node.hh.
Referenced by vcsn::detail::dijkstra_node< Aut >::dijkstra_node(), vcsn::detail::dijkstra_node< Aut >::get_weight(), and vcsn::detail::dijkstra_node< Aut >::operator<().