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

Dijkstra Node implementation. More...

#include <dijkstra-node.hh>

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

Public Member Functions

 dijkstra_node ()=default
 
 dijkstra_node (const automaton_t &aut, state_t state, state_t parent, weight_t weight=weightset_t::max(), unsigned depth=std::numeric_limits< unsigned >::max())
 
bool operator< (const self_t &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 self_t = dijkstra_node
 
using weight_t = weight_t_of< automaton_t >
 
using state_t = state_t_of< automaton_t >
 
using weightset_t = weightset_t_of< automaton_t >
 

Private Attributes

unsigned depth_
 
state_t state_
 
state_t parent_
 
weight_t weight_
 
const weightset_tws_
 

Detailed Description

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

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 21 of file dijkstra-node.hh.

Member Typedef Documentation

◆ automaton_t

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

Definition at line 23 of file dijkstra-node.hh.

◆ self_t

template<Automaton Aut>
using vcsn::detail::dijkstra_node< Aut >::self_t = dijkstra_node
private

Definition at line 24 of file dijkstra-node.hh.

◆ state_t

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

Definition at line 26 of file dijkstra-node.hh.

◆ weight_t

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

Definition at line 25 of file dijkstra-node.hh.

◆ weightset_t

template<Automaton Aut>
using vcsn::detail::dijkstra_node< Aut >::weightset_t = weightset_t_of<automaton_t>
private

Definition at line 27 of file dijkstra-node.hh.

Constructor & Destructor Documentation

◆ dijkstra_node() [1/2]

template<Automaton Aut>
vcsn::detail::dijkstra_node< Aut >::dijkstra_node ( )
default

◆ dijkstra_node() [2/2]

template<Automaton Aut>
vcsn::detail::dijkstra_node< Aut >::dijkstra_node ( const automaton_t aut,
state_t  state,
state_t  parent,
weight_t  weight = weightset_t::max(),
unsigned  depth = std::numeric_limits<unsigned>::max() 
)
inline

Member Function Documentation

◆ get_depth()

template<Automaton Aut>
unsigned vcsn::detail::dijkstra_node< Aut >::get_depth ( ) const
inline

Definition at line 70 of file dijkstra-node.hh.

References vcsn::detail::dijkstra_node< Aut >::depth_.

◆ get_parent()

template<Automaton Aut>
state_t vcsn::detail::dijkstra_node< Aut >::get_parent ( ) const
inline

Definition at line 88 of file dijkstra-node.hh.

References vcsn::detail::dijkstra_node< Aut >::parent_.

◆ get_state()

template<Automaton Aut>
state_t vcsn::detail::dijkstra_node< Aut >::get_state ( ) const
inline

Definition at line 64 of file dijkstra-node.hh.

References vcsn::detail::dijkstra_node< Aut >::state_.

◆ get_weight()

template<Automaton Aut>
weight_t vcsn::detail::dijkstra_node< Aut >::get_weight ( ) const
inline

If there is no weight in the node then its weight is the weightset's maximum.

Definition at line 52 of file dijkstra-node.hh.

References vcsn::detail::dijkstra_node< Aut >::weight_.

Referenced by vcsn::detail::shortest_path_tree< Aut >::compute_().

◆ operator<()

template<Automaton Aut>
bool vcsn::detail::dijkstra_node< Aut >::operator< ( const self_t other) const
inline

Compare weights, used to order nodes in the shortest path heap.

Definition at line 44 of file dijkstra-node.hh.

References vcsn::detail::dijkstra_node< Aut >::weight_, and vcsn::detail::dijkstra_node< Aut >::ws_.

◆ set_depth()

template<Automaton Aut>
void vcsn::detail::dijkstra_node< Aut >::set_depth ( unsigned  depth)
inline

Definition at line 76 of file dijkstra-node.hh.

References vcsn::detail::dijkstra_node< Aut >::depth_.

◆ set_parent()

template<Automaton Aut>
void vcsn::detail::dijkstra_node< Aut >::set_parent ( state_t  parent)
inline

Definition at line 82 of file dijkstra-node.hh.

References vcsn::detail::dijkstra_node< Aut >::parent_.

◆ set_weight()

template<Automaton Aut>
void vcsn::detail::dijkstra_node< Aut >::set_weight ( weight_t  weight)
inline

Definition at line 58 of file dijkstra-node.hh.

References vcsn::detail::dijkstra_node< Aut >::weight_.

Member Data Documentation

◆ depth_

template<Automaton Aut>
unsigned vcsn::detail::dijkstra_node< Aut >::depth_
private

◆ parent_

◆ state_

◆ weight_

◆ ws_

template<Automaton Aut>
const weightset_t* vcsn::detail::dijkstra_node< Aut >::ws_
private

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