|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Helper class to compare nodes of a linked list. More...
#include <tpl_sort_utils.H>
Public Member Functions | |
| Compare_Tnode (Compare cmp_fct=Compare()) noexcept(std::is_nothrow_copy_constructible_v< Compare >) | |
| Construct from a comparison functor. | |
| bool | operator() (Tlink *l1, Tlink *l2) const noexcept(noexcept(std::declval< const Compare & >()(std::declval< const T & >(), std::declval< const T & >()))) |
| Compares two nodes based on their data. | |
| bool | operator() (Tlink *l, const T &x) const noexcept(noexcept(std::declval< const Compare & >()(std::declval< const T & >(), std::declval< const T & >()))) |
| Compares a node's data with a value. | |
Private Attributes | |
| Compare | cmp |
Helper class to compare nodes of a linked list.
Adapts a comparison functor for elements of type T to work with list nodes of type Tnode<T>.
| Tlink | Base link type (e.g., Dlink). |
| Tnode | Template for the node type (e.g., Dnode). |
| T | Element type. |
| Compare | Comparison functor for T. |
Definition at line 480 of file tpl_sort_utils.H.
|
inlinenoexcept |
Construct from a comparison functor.
Definition at line 486 of file tpl_sort_utils.H.
|
inlinenoexcept |
Compares a node's data with a value.
Definition at line 504 of file tpl_sort_utils.H.
References Aleph::Compare_Tnode< Tlink, Tnode, T, Compare >::cmp, Aleph::divide_and_conquer_partition_dp(), and l.
|
inlinenoexcept |
Compares two nodes based on their data.
Definition at line 492 of file tpl_sort_utils.H.
References Aleph::and, Aleph::Compare_Tnode< Tlink, Tnode, T, Compare >::cmp, Aleph::divide_and_conquer_partition_dp(), l1, and l2.
|
private |
Definition at line 482 of file tpl_sort_utils.H.
Referenced by Aleph::Compare_Tnode< Tlink, Tnode, T, Compare >::operator()(), and Aleph::Compare_Tnode< Tlink, Tnode, T, Compare >::operator()().