Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Dfs_Arc_Frame< It > Struct Template Reference

The next arc of a node to look at, for a depth-first search that keeps only that in a frame. More...

#include <tpl_dfs_stack.H>

Collaboration diagram for Aleph::Dfs_Arc_Frame< It >:
[legend]

Public Types

using Node = std::remove_pointer_t< decltype(std::declval< It & >().get_tgt_node_ne())>
 The type of the nodes of the graph.
 

Public Member Functions

template<class... Args>
requires std::constructible_from<It, Args &&...>
 Dfs_Arc_Frame (Args &&...args)
 Builds the iterator with args, if they build one, so that a frame is copied by the copy constructor; inlined, with all it calls.
 
void next_arc () noexcept(noexcept(it.next_ne()))
 Moves to the next arc; inlined, with all it calls.
 
template<int Bit, bool Marked_Too = false>
Node * next_target (Node *goal=nullptr) noexcept(noexcept(it.next_ne()))
 Moves the iterator to the next arc to follow, and gives its target.
 

Public Attributes

It it
 The arcs of the node, on the next one to look at.
 

Detailed Description

template<class It>
struct Aleph::Dfs_Arc_Frame< It >

The next arc of a node to look at, for a depth-first search that keeps only that in a frame.

The search keeps the frame of the node that it visits in a local variable until that node visits another; then the frame waits in a Dfs_Stack until the search comes back to it.

Template Parameters
ItIterator over the arcs of a node, with has_curr(), next_ne(), get_current_arc_ne() and get_tgt_node_ne().

Definition at line 517 of file tpl_dfs_stack.H.

Member Typedef Documentation

◆ Node

template<class It >
using Aleph::Dfs_Arc_Frame< It >::Node = std::remove_pointer_t<decltype(std::declval<It &>().get_tgt_node_ne())>

The type of the nodes of the graph.

Definition at line 520 of file tpl_dfs_stack.H.

Constructor & Destructor Documentation

◆ Dfs_Arc_Frame()

template<class It >
template<class... Args>
requires std::constructible_from<It, Args &&...>
Aleph::Dfs_Arc_Frame< It >::Dfs_Arc_Frame ( Args &&...  args)
inlineexplicit

Builds the iterator with args, if they build one, so that a frame is copied by the copy constructor; inlined, with all it calls.

Definition at line 528 of file tpl_dfs_stack.H.

Member Function Documentation

◆ next_arc()

template<class It >
void Aleph::Dfs_Arc_Frame< It >::next_arc ( )
inlinenoexcept

Moves to the next arc; inlined, with all it calls.

Definition at line 533 of file tpl_dfs_stack.H.

References Aleph::Dfs_Arc_Frame< It >::it, and Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne().

Referenced by Aleph::Depth_First_Traversal< GT, Operation, SA >::__dft().

◆ next_target()

template<class It >
template<int Bit, bool Marked_Too = false>
Node * Aleph::Dfs_Arc_Frame< It >::next_target ( Node *  goal = nullptr)
inlinenoexcept

Moves the iterator to the next arc to follow, and gives its target.

The arc to follow is the next one without the control bit Bit whose target is goal, or has not Bit either, or has it, if Marked_Too. The arcs without Bit that it passes, and the one that it gives, get Bit.

Parameters
goalA node to give even if it has Bit.
Returns
The target of the arc where the iterator stops, or nullptr when the arcs are done.

Definition at line 551 of file tpl_dfs_stack.H.

References Aleph::HTList::Iterator::has_curr(), Aleph::Dfs_Arc_Frame< It >::it, and Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne().

Member Data Documentation

◆ it

template<class It >
It Aleph::Dfs_Arc_Frame< It >::it

The arcs of the node, on the next one to look at.

Definition at line 522 of file tpl_dfs_stack.H.

Referenced by Aleph::Depth_First_Traversal< GT, Operation, SA >::__dft(), Aleph::Dfs_Arc_Frame< It >::next_arc(), and Aleph::Dfs_Arc_Frame< It >::next_target().


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