Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::graph_coloring_detail Namespace Reference

Functions

voidencode_color (size_t c) noexcept
 
bool is_colored (void *cookie) noexcept
 
size_t decode_color (void *cookie) noexcept
 
size_t smallest_available (const DynSetTree< size_t > &used)
 
template<class GT , class SA >
void build_undirected_adj (const GT &g, DynMapTree< typename GT::Node *, DynList< typename GT::Node * > > &adj)
 Internal helper to pre-build undirected adjacency lists.
 
template<class GT , class SA = Dft_Show_Arc<GT>>
void validate_no_self_loops (const GT &g)
 

Function Documentation

◆ build_undirected_adj()

template<class GT , class SA >
void Aleph::graph_coloring_detail::build_undirected_adj ( const GT g,
DynMapTree< typename GT::Node *, DynList< typename GT::Node * > > &  adj 
)

Internal helper to pre-build undirected adjacency lists.

Ensures O(degree) iteration even for directed graphs.

Parallel/multi-arcs are deduplicated so that each neighbor appears at most once in the adjacency list of a node.

Definition at line 111 of file Graph_Coloring.H.

References Aleph::divide_and_conquer_partition_dp(), GraphCommon< GT, Node, Arc >::get_arc_it(), GraphCommon< GT, Node, Arc >::get_node_it(), GraphCommon< GT, Node, Arc >::get_src_node(), GraphCommon< GT, Node, Arc >::get_tgt_node(), Aleph::DynMapTree< Key, Data, Tree, Compare >::insert(), and Aleph::Dlink::insert().

◆ decode_color()

size_t Aleph::graph_coloring_detail::decode_color ( void cookie)
inlinenoexcept

Definition at line 91 of file Graph_Coloring.H.

References Aleph::divide_and_conquer_partition_dp().

◆ encode_color()

void * Aleph::graph_coloring_detail::encode_color ( size_t  c)
inlinenoexcept

Definition at line 81 of file Graph_Coloring.H.

References Aleph::divide_and_conquer_partition_dp().

◆ is_colored()

bool Aleph::graph_coloring_detail::is_colored ( void cookie)
inlinenoexcept

Definition at line 86 of file Graph_Coloring.H.

◆ smallest_available()

size_t Aleph::graph_coloring_detail::smallest_available ( const DynSetTree< size_t > &  used)
inline

Definition at line 96 of file Graph_Coloring.H.

References Aleph::divide_and_conquer_partition_dp().

◆ validate_no_self_loops()