|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Comprehensive examples of ah-stl-functional.H usage. More...
#include <iostream>#include <iomanip>#include <vector>#include <list>#include <set>#include <string>#include <ah-stl-functional.H>#include <ah-uni-functional.H>#include <htlist.H>#include <tpl_dynSetTree.H>Go to the source code of this file.
Functions | |
| template<typename T > | |
| void | print_vec (const string &label, const vector< T > &v) |
| template<typename T1 , typename T2 > | |
| void | print_pairs (const string &label, const vector< pair< T1, T2 > > &v) |
| template<typename T > | |
| void | print_nested (const string &label, const vector< vector< T > > &v) |
| int | main () |
Comprehensive examples of ah-stl-functional.H usage.
This file demonstrates the functional programming utilities available in ah-stl-functional.H for working with STL containers.
Compile with: g++ -std=c++20 -I.. -o ah-stl-functional-example ah-stl-functional-example.cc
Or using CMake from the build directory: make ah-stl-functional-example
Definition in file ah_stl_functional_example.cc.
| int main | ( | ) |
Definition at line 102 of file ah_stl_functional_example.cc.
References Aleph::DynList< T >::append(), Aleph::count(), LocateFunctions< Container, Type >::get_it(), Aleph::DynList< T >::insert(), Aleph::is_even(), Aleph::maps(), print_nested(), print_pairs(), print_vec(), Aleph::product(), Aleph::rep(), Aleph::HTList::size(), Aleph::stl_all(), Aleph::stl_arrangements(), Aleph::stl_cartesian_product(), Aleph::stl_chunks(), Aleph::stl_combinations(), Aleph::stl_concat(), Aleph::stl_count(), Aleph::stl_count_value(), Aleph::stl_distinct(), Aleph::stl_drop(), Aleph::stl_drop_while(), Aleph::stl_enumerate_to_pairs(), Aleph::stl_exists(), Aleph::stl_filter(), Aleph::stl_filteri(), Aleph::stl_find(), Aleph::stl_find_index(), Aleph::stl_find_last(), Aleph::stl_first(), Aleph::stl_flat_map(), Aleph::stl_flatten(), Aleph::stl_foldl(), Aleph::stl_foldr(), Aleph::stl_generate(), Aleph::stl_group(), Aleph::stl_group_by(), Aleph::stl_init(), Aleph::stl_intersperse(), Aleph::stl_last(), Aleph::stl_linspace(), Aleph::stl_map(), Aleph::stl_mapi(), Aleph::stl_max(), Aleph::stl_max_by(), Aleph::stl_mem(), Aleph::stl_min(), Aleph::stl_min_by(), Aleph::stl_min_max(), Aleph::stl_none(), Aleph::stl_nth(), Aleph::stl_partition(), Aleph::stl_permutations(), Aleph::stl_power_set(), Aleph::stl_product(), Aleph::stl_range(), Aleph::stl_reject(), Aleph::stl_rep(), Aleph::stl_reverse(), Aleph::stl_scan_left(), Aleph::stl_sliding_window(), Aleph::stl_sort(), Aleph::stl_sort_by(), Aleph::stl_span(), Aleph::stl_split_at(), Aleph::stl_sum(), Aleph::stl_tail(), Aleph::stl_take(), Aleph::stl_take_last(), Aleph::stl_take_while(), Aleph::stl_tally(), Aleph::stl_unique(), Aleph::stl_unzip_pairs(), Aleph::stl_zip_to_pairs(), Aleph::sum(), Aleph::to_string(), Aleph::uni_all(), Aleph::uni_equal(), Aleph::uni_exists(), Aleph::uni_filter(), Aleph::uni_foldl(), Aleph::uni_map(), Aleph::uni_min(), Aleph::uni_sum(), and Aleph::uni_take().
Definition at line 87 of file ah_stl_functional_example.cc.
References Aleph::maps(), and Aleph::HTList::size().
Referenced by main().
| void print_pairs | ( | const string & | label, |
| const vector< pair< T1, T2 > > & | v | ||
| ) |
Definition at line 74 of file ah_stl_functional_example.cc.
References Aleph::maps().
Referenced by main().
Definition at line 61 of file ah_stl_functional_example.cc.
References Aleph::maps().
Referenced by demo_vector_arithmetic(), and main().