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

Functor wrapper for greedy_coloring. More...

#include <Graph_Coloring.H>

Public Member Functions

 Greedy_Coloring (SA __sa=SA())
 Keeps sa, the filter of the arcs.
 
size_t operator() (const GT &g, DynMapTree< typename GT::Node *, size_t > &colors) const
 Execute greedy coloring.
 

Private Attributes

SA sa
 

Detailed Description

template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>>
class Aleph::Greedy_Coloring< GT, SA >

Functor wrapper for greedy_coloring.

Provided for use with higher-order graph utilities that accept coloring algorithms as template parameters. Forwards directly to greedy_coloring; see that function for full semantics, complexity, and thread-safety notes.

Template Parameters
GTGraph type.
SAArc-filter functor (defaults to Dft_Show_Arc<GT>).

Definition at line 645 of file Graph_Coloring.H.

Constructor & Destructor Documentation

◆ Greedy_Coloring()

template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>>
Aleph::Greedy_Coloring< GT, SA >::Greedy_Coloring ( SA  __sa = SA())
inlineexplicit

Keeps sa, the filter of the arcs.

Definition at line 651 of file Graph_Coloring.H.

Member Function Documentation

◆ operator()()

template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>>
size_t Aleph::Greedy_Coloring< GT, SA >::operator() ( const GT &  g,
DynMapTree< typename GT::Node *, size_t > &  colors 
) const
inline

Execute greedy coloring.

Parameters
[in]gInput graph (no self-loops).
[out]colorsOutput node→color map (overwritten).
Returns
Number of distinct colors used.
Exceptions
std::domain_errorif g contains a self-loop.

Definition at line 659 of file Graph_Coloring.H.

References Aleph::Greedy_Coloring< GT, SA >::sa.

Member Data Documentation

◆ sa

template<AlephGraph GT, ArcFilter< GT > SA = Dft_Show_Arc<GT>>
SA Aleph::Greedy_Coloring< GT, SA >::sa
private

Definition at line 647 of file Graph_Coloring.H.

Referenced by Aleph::Greedy_Coloring< GT, SA >::operator()().


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