|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Functional-style utilities (map/filter/fold), zip utilities, ranges adapters, and parallel variants. More...
Files | |
| file | ah-parallel.H |
| Parallel functional programming operations using ThreadPool. | |
| file | ah-ranges.H |
| C++20 Ranges support and adaptors for Aleph-w containers. | |
| file | ah-stl-functional.H |
| Functional programming utilities for C++ Standard Library containers. | |
| file | ah-uni-functional.H |
| Unified functional programming utilities for both STL and Aleph containers. | |
| file | ah-zip-utils.H |
| Unified zip operations for both STL and Aleph containers. | |
| file | ah-zip.H |
| Zip iterators and functional operations for multiple containers. | |
Functional-style utilities (map/filter/fold), zip utilities, ranges adapters, and parallel variants.
This module covers two related layers:
maps(), filter(), foldl()) via CRTP mixins.Many Aleph-w containers provide functional operations as member functions because they inherit from the CRTP mixin FunctionalMixin (see ah-dry-mixin.H).
In practice, this means that if a container provides a suitable traverse() method (directly or via TraverseMixin), it automatically gets methods such as:
for_each(...)maps<NewT>(...)filter(...)foldl(init, ...)all(...), exists(...)partition(...), take(n), drop(n), rev(), length()See tpl_dynSetTree.H.
BitArray inherits from FunctionalMixin, so it also supports the same family of member functions. See bitArray.H.
Graphs expose functional-style helpers, but they are generally specialized to node/arc traversal rather than being treated as a simple sequence container.
Common patterns include:
for_each_node, for_each_arc).none_node, count_nodes, etc.).nodes_map, arcs_map).See tpl_graph.H and graph-dry.H.