Graphle 1.0.0
A C++20 header-only graph library
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
graphle::search::search_visitor< Derived, Graph > Class Template Reference

#include <visitor.hpp>

Inheritance diagram for graphle::search::search_visitor< Derived, Graph >:
graphle::search::visitor_from_arguments< Graph, DiscoverVertex, DiscoverLeaf, DiscoverBranch, DiscoverNewEdge, DiscoverSeenEdge, BeginSearch, FinishSearch >

Public Types

using graph = std::remove_reference_t< Graph >
 
using vertex = vertex_of< Graph >
 
using edge = edge_of< Graph >
 

Public Member Functions

visitor_result discover_vertex_base (vertex v, graph &g)
 
visitor_result discover_branch_base (vertex v, graph &g)
 
visitor_result discover_leaf_base (vertex v, graph &g)
 
visitor_result discover_edge_to_new_vertex_base (edge e, graph &g)
 
visitor_result discover_edge_to_known_vertex_base (edge e, graph &g)
 
nonlocal_visitor_result begin_search_base (graph &g)
 
nonlocal_visitor_result finish_search_base (graph &g)
 

Detailed Description

template<typename Derived, graph_ref Graph>
class graphle::search::search_visitor< Derived, Graph >

CRTP base class for visitors used with search algorithms. Derived classes may override any of the methods marked with *_base in this class by removing the *_base suffix from the derived method. (i.e. your derived method should be called discover_vertex not discover_vertex_base). Derived methods may return either void or a visitor_result.

Template Parameters
DerivedThe CRTP-derived type.
GraphThe associated graph type.

Definition at line 69 of file visitor.hpp.

Member Typedef Documentation

◆ edge

template<typename Derived , graph_ref Graph>
using graphle::search::search_visitor< Derived, Graph >::edge = edge_of<Graph>

Definition at line 73 of file visitor.hpp.

◆ graph

template<typename Derived , graph_ref Graph>
using graphle::search::search_visitor< Derived, Graph >::graph = std::remove_reference_t<Graph>

Definition at line 71 of file visitor.hpp.

◆ vertex

template<typename Derived , graph_ref Graph>
using graphle::search::search_visitor< Derived, Graph >::vertex = vertex_of<Graph>

Definition at line 72 of file visitor.hpp.

Member Function Documentation

◆ begin_search_base()

template<typename Derived , graph_ref Graph>
nonlocal_visitor_result graphle::search::search_visitor< Derived, Graph >::begin_search_base ( graph &  g)
inline

Called before the first vertex is visited.

Definition at line 113 of file visitor.hpp.

◆ discover_branch_base()

template<typename Derived , graph_ref Graph>
visitor_result graphle::search::search_visitor< Derived, Graph >::discover_branch_base ( vertex  v,
graph &  g 
)
inline

Called after discover_vertex if the given vertex is a branch (I.e. it has outgoing edges). If the graph is non-directed, there is no difference between ingoing and outgoing edges, so this method is never called.

Definition at line 86 of file visitor.hpp.

◆ discover_edge_to_known_vertex_base()

template<typename Derived , graph_ref Graph>
visitor_result graphle::search::search_visitor< Derived, Graph >::discover_edge_to_known_vertex_base ( edge  e,
graph &  g 
)
inline

Called when an edge is visited that leads to an already-visited vertex.

Definition at line 107 of file visitor.hpp.

◆ discover_edge_to_new_vertex_base()

template<typename Derived , graph_ref Graph>
visitor_result graphle::search::search_visitor< Derived, Graph >::discover_edge_to_new_vertex_base ( edge  e,
graph &  g 
)
inline

Called when an edge is visited that leads to an unvisited vertex.

Definition at line 101 of file visitor.hpp.

◆ discover_leaf_base()

template<typename Derived , graph_ref Graph>
visitor_result graphle::search::search_visitor< Derived, Graph >::discover_leaf_base ( vertex  v,
graph &  g 
)
inline

Called after discover_vertex if the given vertex is a leaf (I.e. it has no outgoing edges). If the graph is non-directed, there is no difference between ingoing and outgoing edges, so this method is never called.

Definition at line 95 of file visitor.hpp.

◆ discover_vertex_base()

template<typename Derived , graph_ref Graph>
visitor_result graphle::search::search_visitor< Derived, Graph >::discover_vertex_base ( vertex  v,
graph &  g 
)
inline

Called when a vertex is first visited during search.

Definition at line 77 of file visitor.hpp.

◆ finish_search_base()

template<typename Derived , graph_ref Graph>
nonlocal_visitor_result graphle::search::search_visitor< Derived, Graph >::finish_search_base ( graph &  g)
inline

Called after the last vertex is visited.

Definition at line 119 of file visitor.hpp.


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