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

Filter of painter arcs with that are set the Spanning_Tree control bit. More...

#include <tpl_graph.H>

Collaboration diagram for Aleph::Painted_Min_Spanning_Tree< GT, Distance >:
[legend]

Public Member Functions

 Painted_Min_Spanning_Tree () noexcept(std::is_nothrow_default_constructible_v< Distance >)
 Build the filter with a distance accessor built by Distance().
 
 Painted_Min_Spanning_Tree (Distance __distance)
 Build the filter with a distance accessor.
 
bool operator() (typename GT::Arc *a)
 Show the arc if it is painted, and then add its weight to dist.
 

Public Attributes

Distance::Distance_Type dist
 Accumulative distance from the first seen arc until the last seen.
 
Distance distance
 Distance accessor for the arc weights.
 

Detailed Description

template<AlephGraph GT, class Distance>
struct Aleph::Painted_Min_Spanning_Tree< GT, Distance >

Filter of painter arcs with that are set the Spanning_Tree control bit.

Some Aleph-w ( \(\aleph_\omega\)) algorithms set the Spanning_Tree control bit in order to mark their results. This simple filter filters those arc and addition computes the accumulative distance between all the seen arcs.

The filter keeps a copy of its distance accessor, which may have state, or no default constructor.

Definition at line 5046 of file tpl_graph.H.

Constructor & Destructor Documentation

◆ Painted_Min_Spanning_Tree() [1/2]

template<AlephGraph GT, class Distance >
Aleph::Painted_Min_Spanning_Tree< GT, Distance >::Painted_Min_Spanning_Tree ( )
inlinenoexcept

Build the filter with a distance accessor built by Distance().

Definition at line 5055 of file tpl_graph.H.

◆ Painted_Min_Spanning_Tree() [2/2]

template<AlephGraph GT, class Distance >
Aleph::Painted_Min_Spanning_Tree< GT, Distance >::Painted_Min_Spanning_Tree ( Distance  __distance)
inlineexplicit

Build the filter with a distance accessor.

Parameters
[in]__distancedistance accessor for the arc weights

Definition at line 5065 of file tpl_graph.H.

Member Function Documentation

◆ operator()()

template<AlephGraph GT, class Distance >
bool Aleph::Painted_Min_Spanning_Tree< GT, Distance >::operator() ( typename GT::Arc *  a)
inline

Show the arc if it is painted, and then add its weight to dist.

Parameters
[in]athe arc
Returns
true if a is painted
Exceptions
anythingthat the distance throws; dist is then unchanged

Definition at line 5076 of file tpl_graph.H.

References Aleph::Painted_Min_Spanning_Tree< GT, Distance >::dist, Aleph::Painted_Min_Spanning_Tree< GT, Distance >::distance, IS_ARC_VISITED, and Aleph::Spanning_Tree.

Member Data Documentation

◆ dist

Accumulative distance from the first seen arc until the last seen.

Definition at line 5049 of file tpl_graph.H.

Referenced by Aleph::Painted_Min_Spanning_Tree< GT, Distance >::operator()(), and TEST().

◆ distance

template<AlephGraph GT, class Distance >
Distance Aleph::Painted_Min_Spanning_Tree< GT, Distance >::distance

Distance accessor for the arc weights.

Definition at line 5052 of file tpl_graph.H.

Referenced by Aleph::Painted_Min_Spanning_Tree< GT, Distance >::operator()().


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