Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
FunctionalMethods< Container, T > Class Template Reference

Common methods to the Aleph-w ( \(\aleph_\omega\)) containers. More...

#include <ah-dry.H>

Inherited by Aleph::Array< size_t >, Aleph::Array< Aleph::Gen_Euler_Tour_LCA::DepthEntry >, Aleph::Array< value_type >, Aleph::Array< lazy_type >, Aleph::Array< Item >, Aleph::Array< Aleph::AABBTree::Node >, Aleph::Array< Aleph::AABBTree::Entry >, Aleph::Array< Aleph::AABBTree::DebugNode >, Aleph::Array< Aleph::AdversarialIterativeDeepeningIteration< Move, Score > >, Aleph::Array< Move >, Aleph::Array< Aleph::Aho_Corasick::Node >, Aleph::Array< std::string >, Aleph::Array< Aleph::Point >, Aleph::Array< Aleph::DelaunayTriangulationBowyerWatson::IndexedTriangle >, Aleph::Array< Aleph::Segment >, Aleph::Array< typename GT::Arc * >, Aleph::Array< Arc * >, Aleph::Array< uint32_t >, Aleph::Array< uint16_t >, Aleph::Array< double >, Aleph::Array< uint64_t >, Aleph::Array< unsigned char >, Aleph::Array< const void * >, Aleph::Array< ca_size_t >, Aleph::Array< Coord_Vec< 2 > >, Aleph::Array< std::pair< std::size_t, std::filesystem::path > >, Aleph::Array< Aleph::CA::ca_gif_detail::Frame >, Aleph::Array< Aleph::Array< std::size_t > >, Aleph::Array< std::size_t >, Aleph::Array< state_type >, Aleph::Array< Aleph::CA::ca_html_detail::Frame >, Aleph::Array< Aleph::CA::ca_hashlife_detail::Node * >, Aleph::Array< int >, Aleph::Array< Aleph::CA::Lattice >, Aleph::Array< std::uint64_t >, Aleph::Array< std::uint8_t >, Aleph::Array< Aleph::CA::RGB8 >, Aleph::Array< Aleph::Compact_Cuckoo_Filter::Bucket >, Aleph::Array< Aleph::ConstrainedDelaunayTriangulation::IndexedEdge >, Aleph::Array< Aleph::Convex_Hull_Trick::Line >, Aleph::Array< long double >, Aleph::Array< Aleph::Cuckoo_Filter::Bucket >, Aleph::Array< Cost >, Aleph::Array< Aleph::Array< size_t > >, Aleph::Array< Complex >, Aleph::Array< Real >, Aleph::Array< Aleph::FFT::ISTFTProcessor >, Aleph::Array< Aleph::FFT::STFTProcessor >, Aleph::Array< Aleph::FFT::LFilter >, Aleph::Array< Aleph::Array< Real > >, Aleph::Array< bool >, Aleph::Array< Aleph::Array< Complex > >, Aleph::Array< Aleph::FFT::BiquadSection >, Aleph::Array< Aleph::FFT::IIRCoefficients >, Aleph::Array< Aleph::FFT::SOSFilter >, Aleph::Array< Aleph::detail::SPP_Portal >, Aleph::Array< Aleph::FunnelTraceStep >, Aleph::Array< Node * >, Aleph::Array< char >, Aleph::Array< Aleph::lca_detail::Depth_Node >, Aleph::Array< Aleph::Gen_File_BPlus_Tree::Page >, Aleph::Array< Aleph::Gen_File_B_Tree::Page >, Aleph::Array< typename GT::Node::Node_Type >, Aleph::Array< Aleph::Gen_Link_Cut_Tree::Node * >, Aleph::Array< Aleph::Gen_Link_Cut_Tree_WithEdges::EdgeRec >, Aleph::Array< Aleph::Tree_Node * >, Aleph::Array< long >, Aleph::Array< uint8_t >, Aleph::Array< Aleph::IDAStarIteration< Distance > >, Aleph::Array< Aleph::KDTreePointSearch::DebugPartition >, Aleph::Array< std::optional< Move > >, Aleph::Array< Aleph::Array< Cost > >, Aleph::Array< Aleph::DynList< long > >, Aleph::Array< Aleph::Li_Chao_Tree::Node >, Aleph::Array< Aleph::MonotonePolygonTriangulation::EdgeStatusTree::Node * >, Aleph::Array< Aleph::Naive_Suffix_Tree::Node >, Aleph::Array< Aleph::Packed_Row >, Aleph::Array< NodePtr >, Aleph::Array< std::pair< Key, T > >, Aleph::Array< Aleph::Planar_Dual_Metadata::Face_Boundary >, Aleph::Array< Aleph::Planar_Dual_Edge_Info< GT > >, Aleph::Array< Aleph::Planar_Dual_Metadata::Face_Dart >, Aleph::Array< Aleph::Planar_Geometric_Drawing::Node_Position >, Aleph::Array< Aleph::Planarity_Test_Result::Rotation_Entry >, Aleph::Array< Aleph::Array< Node * > >, Aleph::Array< Aleph::Planarity_Test_Result::Path_Witness >, Aleph::Array< Aleph::Planarity_Test_Result::Edge_Witness >, Aleph::Array< C >, Aleph::Array< Aleph::Polygon >, Aleph::Array< Aleph::PowerDiagram::WeightedSite >, Aleph::Array< Aleph::PowerDiagram::PowerEdge >, Aleph::Array< Aleph::PowerDiagram::PowerCell >, Aleph::Array< Aleph::RTree::Entry >, Aleph::Array< Aleph::Rectangle >, Aleph::Array< Aleph::RTree::DebugNode >, Aleph::Array< Aleph::RTree::Child >, Aleph::Array< std::pair< Char, std::unique_ptr< Aleph::RadixTree::Node > > >, Aleph::Array< Aleph::RangeTree2D::Node >, Aleph::Array< Aleph::RangeTree2D::DebugNode >, Aleph::Array< Aleph::RegularTriangulationBowyerWatson::WeightedSite >, Aleph::Array< Aleph::SegmentArrangement::ArrEdge >, Aleph::Array< Aleph::SegmentArrangement::ArrFace >, Aleph::Array< Aleph::Segment_Tree_Beats::Node >, Aleph::Array< Aleph::Suffix_Automaton::State >, Aleph::Array< Aleph::SweepLineSegmentIntersection::StatusTree::Node * >, Aleph::Array<::Polygon >, Aleph::Array<::Segment >, Aleph::Array<::Point >, Aleph::Array< Aleph::Tikz_Plane::Legend_Entry >, Aleph::Array< Aleph::Tikz_Plane::Styled_Object >, Aleph::Array< Aleph::TrapezoidalMapPointLocation::Trapezoid >, Aleph::Array< Aleph::TrapezoidalMapPointLocation::DagNode >, Aleph::Array< __gmp_expr< mpq_t, mpq_t > >, Aleph::Array< Aleph::VoronoiDiagramFromDelaunay::Edge >, Aleph::Array< Aleph::VoronoiDiagramFromDelaunay::Cell >, Aleph::Array< VertexId >, Aleph::Array< Aleph::blossom_weighted_detail::mwmatching::impl::Blossom >, Aleph::Array< Aleph::blossom_weighted_detail::mwmatching::impl::Blossom * >, Aleph::Array< WeightType >, Aleph::Array< const Aleph::blossom_weighted_detail::mwmatching::Edge * >, Aleph::Array< Aleph::blossom_weighted_detail::mwmatching::Edge >, Aleph::Array< Aleph::Graph_Anode * >, Aleph::Array< Key >, Aleph::Array< std::unique_ptr< Aleph::detail::BPlusTreeNode > >, Aleph::Array< std::unique_ptr< Aleph::detail::BTreeNode > >, Aleph::Array< Eta >, Aleph::Array< Bias >, Aleph::Array< typename GT::Node * >, Aleph::Array< Cost_Type >, Aleph::Array< Component >, Aleph::Array< Aleph::negative_cycles_detail::Arc_Rec< GT, Cost_Type > >, Aleph::Array< Aleph::planarity_detail::Simple_Edge >, Aleph::Array< Aleph::Array< Arc * > >, Aleph::Array< Aleph::planarity_detail::Conflict_Pair >, Aleph::Array< Aleph::Array< std::string > >, Aleph::Array< string >, Aleph::Array< adaptive_huffman_demo::Display_Node >, Aleph::ArrayQueue< int >, Aleph::ArrayQueue< Aleph::DynList< int > >, Aleph::ArrayStack< int >, Aleph::ArrayStack< Aleph::DynList< int > >, Aleph::DynArray< GT_Node * >, Aleph::DynArray< Aleph::Point >, Aleph::DynArray< Node * >, Aleph::DynArray< Entry_Type >, Aleph::DynArray< Aleph::Byte >, Aleph::DynArray< typename GT::Node * >, Aleph::DynArray< Aleph::Compiler_Ast_Context::Owned_Object >, Aleph::DynArray< Aleph::Compiler_Stmt * >, Aleph::DynArray< Aleph::Compiler_Bytecode_Context::Owned_Object >, Aleph::DynArray< Aleph::Compiler_IR_Slot >, Aleph::DynArray< Aleph::Compiler_Bytecode_Constant >, Aleph::DynArray< Aleph::Compiler_Bytecode_Block_Info >, Aleph::DynArray< Aleph::Compiler_Bytecode_Instruction >, Aleph::DynArray< Compiler_Bytecode_Register_Id >, Aleph::DynArray< Aleph::Compiler_Bytecode_Function * >, Aleph::DynArray< Aleph::Compiler_Bytecode_Value >, Aleph::DynArray< Aleph::Compiler_Bytecode_VM::Frame >, Aleph::DynArray< std::string >, Aleph::DynArray< const Aleph::Compiler_HIR_Stmt * >, Aleph::DynArray< Compiler_CFG_Block_Id >, Aleph::DynArray< Aleph::Compiler_CFG_Context::Owned_Object >, Aleph::DynArray< Aleph::Compiler_CFG_Block >, Aleph::DynArray< Aleph::Compiler_CFG_Function * >, Aleph::DynArray< Aleph::Compiler_Expr * >, Aleph::DynArray< unsigned char >, Aleph::DynArray< Aleph::Compiler_Dataflow_Constant >, Aleph::DynArray< bool >, Aleph::DynArray< Aleph::Compiler_Dataflow_Bit_Set >, Aleph::DynArray< Aleph::DynArray< Aleph::Compiler_Dataflow_Constant > >, Aleph::DynArray< Aleph::Compiler_Dataflow_Uninitialized_Read >, Aleph::DynArray< Source_File_Id >, Aleph::DynArray< Aleph::Compiler_Module * >, Aleph::DynArray< size_t >, Aleph::DynArray< Aleph::Compiler_Driver_Artifact >, Aleph::DynArray< Aleph::Compiler_Enum_Variant >, Aleph::DynArray< Aleph::Compiler_Param >, Aleph::DynArray< Aleph::Compiler_Type_Expr * >, Aleph::DynArray< Aleph::Compiler_HIR_Stmt * >, Aleph::DynArray< Aleph::Compiler_HIR_Expr * >, Aleph::DynArray< Aleph::Compiler_HIR_Context::Owned_Object >, Aleph::DynArray< Aleph::Compiler_HIR_Param >, Aleph::DynArray< Aleph::Compiler_HIR_Function * >, Aleph::DynArray< Aleph::Compiler_IR_Instruction >, Aleph::DynArray< Compiler_IR_Block_Id >, Aleph::DynArray< Aleph::Compiler_IR_Context::Owned_Object >, Aleph::DynArray< std::pair< std::string, Aleph::Compiler_IR_Detail::Binding > >, Aleph::DynArray< Aleph::Compiler_IR_Block >, Aleph::DynArray< Compiler_IR_Value_Id >, Aleph::DynArray< std::pair< std::string, Compiler_IR_Function_Id > >, Aleph::DynArray< Aleph::Compiler_IR_Function * >, Aleph::DynArray< Aleph::Compiler_Module_Descriptor >, Aleph::DynArray< Aleph::Compiler_Module_Metadata >, Aleph::DynArray< Aleph::Compiler_Line_Frontend::Parsed_Source >, Aleph::DynArray< Aleph::Compiler_Line_Frontend::Function_Definition >, Aleph::DynArray< Aleph::Compiler_Line_Frontend::Let_Definition >, Aleph::DynArray< Aleph::Compiler_Module_Dependency >, Aleph::DynArray< Aleph::Compiler_Import_Decl * >, Aleph::DynArray< Aleph::Compiler_Type_Decl * >, Aleph::DynArray< Aleph::Compiler_Function_Decl * >, Aleph::DynArray< Aleph::Compiler_Module_Bindings >, Aleph::DynArray< Aleph::Compiler_Module_Binding_Issue >, Aleph::DynArray< Aleph::Compiler_Module_Bound_Name >, Aleph::DynArray< Aleph::Compiler_Module_Linkage >, Aleph::DynArray< Aleph::Compiler_Module_Linkage_Issue >, Aleph::DynArray< Aleph::Compiler_Module_Visible_Export >, Aleph::DynArray< Aleph::Compiler_Module_Export >, Aleph::DynArray< Aleph::Compiler_Module_Name_Table_Entry >, Aleph::DynArray< Aleph::Compiler_Module_Ambiguous_Name >, Aleph::DynArray< Aleph::Compiler_Module_Resolution_Issue >, Aleph::DynArray< Aleph::Compiler_Module_Semantic_Module >, Aleph::DynArray< Aleph::Compiler_SSA_Phi >, Aleph::DynArray< Aleph::Compiler_SSA_Instruction >, Aleph::DynArray< Compiler_SSA_Block_Id >, Aleph::DynArray< Aleph::Compiler_SSA_Context::Owned_Object >, Aleph::DynArray< Aleph::DynArray< Compiler_SSA_Block_Id > >, Aleph::DynArray< Aleph::Compiler_SSA_Parameter >, Aleph::DynArray< Aleph::Compiler_SSA_Block >, Aleph::DynArray< Compiler_SSA_Value_Id >, Aleph::DynArray< Aleph::Compiler_SSA_Function * >, Aleph::DynArray< Aleph::Compiler_Name_Resolution >, Aleph::DynArray< Aleph::Compiler_Struct_Field >, Aleph::DynArray< Aleph::Compiler_Symbol >, Aleph::DynArray< Aleph::Scope::Frame >, Aleph::DynArray< Compiler_Type_Id >, Aleph::DynArray< Aleph::Compiler_Type >, Aleph::DynArray< Aleph::Compiler_Type_Substitution::Binding >, Aleph::DynArray< Aleph::Compiler_Expr_Type_Assignment >, Aleph::DynArray< Aleph::Compiler_Function_Type_Assignment >, Aleph::DynArray< Aleph::Compiler_Let_Type_Assignment >, Aleph::DynArray< Aleph::Compiler_Param_Type_Assignment >, Aleph::DynArray< Aleph::Compiler_Typed_Semantic_Analyzer::Compiler_Function_Annotation_Type_Variable >, Aleph::DynArray< Aleph::Compiler_Typed_Semantic_Analyzer::Compiler_Active_Binding >, Aleph::DynArray< Aleph::Compiler_Typed_Semantic_Analyzer::Compiler_Module_Type_Binding >, Aleph::DynArray< Aleph::Equality_Constraint< T > >, Aleph::DynArray< Aleph::Diagnostic_Label >, Aleph::DynArray< Aleph::Diagnostic >, Aleph::DynArray< long >, Aleph::DynArray< Distance_Type >, Aleph::DynArray< Aleph::Dlink >, Aleph::DynArray< Aleph::Interpreter_Binding >, Aleph::DynArray< Aleph::Interpreter_Runtime::Interpreter_Call_Frame >, Aleph::DynArray< Aleph::Interpreter_Value >, Aleph::DynArray< Interpreter_Value >, Aleph::DynArray< Aleph::Map_Matrix_Graph::Mat_Entry >, Aleph::DynArray< Node_Type >, Aleph::DynArray< Arc_Type >, Aleph::DynArray< Aleph::Simplex_Node_Info >, Aleph::DynArray< Aleph::Simplex_Arc_Info >, Aleph::DynArray< Aleph::Scope::Binding >, Aleph::DynArray< Source_Offset >, Aleph::DynArray< Aleph::Source_File >, Aleph::DynArray< string >, Aleph::DynArray< int >, Aleph::DynArray< Event_Handler >, Aleph::DynArray< void * >, Aleph::DynArray< Aleph::DynArray< Node * > >, Aleph::DynArray< double >, Aleph::DynDlist< typename GT::Node * >, Aleph::DynDlist< Aleph::Path::Path_Desc >, Aleph::DynDlist< T * >, Aleph::DynDlist< ConstraintType >, Aleph::DynDlist< VertexPair >, Aleph::DynDlist< Aleph::blossom_weighted_detail::mwmatching::impl::NonTrivialBlossom >, Aleph::DynDlist< Aleph::blossom_weighted_detail::mwmatching::impl::NonTrivialBlossom::SubBlossom >, Aleph::DynDlist< const Aleph::blossom_weighted_detail::mwmatching::Edge< WeightType > * >, Aleph::DynDlist< int >, Aleph::DynDlist< Tag_Data >, Aleph::DynDlist< Arc_Desc >, Aleph::DynDlist< Thread_Desc >, Aleph::DynDlist< Eepic_Geom_Object * >, Aleph::DynDlist< Polinomio::Termino >, Aleph::DynDlist< Arc_Data >, Aleph::DynDlist< Connexion_Data >, Aleph::DynHashTable< std::pair< Key, Data >, LhashTable, Dft_Pair_Cmp< Key, Data, Aleph::equal_to< Key > > >, Aleph::DynHashTable< Key, LhashTable, Aleph::equal_to< Key > >, Aleph::DynHashTable< Key, LinearHashTable, Aleph::equal_to< Key > >, Aleph::DynHashTable< std::pair< GT_Node *, size_t >, LhashTable, Dft_Pair_Cmp< GT_Node *, size_t, Aleph::equal_to< GT_Node * > > >, Aleph::DynHashTable< std::pair< Key, T >, LhashTable, Dft_Pair_Cmp< Key, T, Cmp > >, Aleph::DynHashTable< std::pair< Aleph::Gen_Link_Cut_Tree_WithEdges::EdgeKey, size_t >, Aleph::Gen_Link_Cut_Tree_WithEdges::EdgeKeyEq, Dft_Pair_Cmp< Aleph::Gen_Link_Cut_Tree_WithEdges::EdgeKey, size_t, Aleph::equal_to< Aleph::Gen_Link_Cut_Tree_WithEdges::EdgeKey > > >, Aleph::DynHashTable< std::pair< Node *, int >, Aleph::Gen_Link_Cut_Tree_WithEdges::NodePtrEq, Dft_Pair_Cmp< Node *, int, Aleph::equal_to< Node * > > >, Aleph::DynIntervalTree< int >, Aleph::DynList< int >, Aleph::DynList< Event >, Aleph::DynList< std::pair< size_t, size_t > >, Aleph::DynList< typename GT::Node * >, Aleph::DynList< typename GT::Arc * >, Aleph::DynList< Arc * >, Aleph::DynList< Node * >, Aleph::DynList< Aleph::FlowPath< Aleph::Net_Graph > >, Aleph::DynList< Aleph::FlowCycle< Aleph::Net_Graph > >, Aleph::DynList< void * >, Aleph::DynList< long >, Aleph::DynList< GT_Arc * >, Aleph::DynList< Aleph::Point >, Aleph::DynList< Solution >, Aleph::DynList< size_t >, Aleph::DynList< Aleph::DynList< typename GT::Node * > >, Aleph::DynList< Aleph::Tree_Node * >, Aleph::DynList< std::string >, Aleph::DynList< Pair >, Aleph::DynList< std::pair< Node *, Aleph::Zero_One_BFS::Node_Info * > >, Aleph::DynList< VertexId >, Aleph::DynList< Df_Low_Non_Tree_Arc >, Aleph::DynList< Aleph::DynList< int > >, Aleph::DynList< QueueTheadsPool::ConsumerQueueEvent * >, Aleph::DynList< char >, Aleph::DynList< string >, Aleph::DynList< std::thread >, Aleph::DynListQueue< size_t >, Aleph::DynListQueue< VertexId >, Aleph::DynListQueue< Aleph::DynList< int > >, Aleph::DynListQueue< int >, Aleph::DynListStack< typename GT::Node * >, Aleph::DynListStack< Aleph::Tree_Node * >, Aleph::DynListStack< Aleph::DynList< int > >, Aleph::DynListStack< int >, Aleph::DynListStack< string >, Aleph::DynMatrix< long >, Aleph::DynMatrix< Distance_Type >, Aleph::DynMatrix< int >, Aleph::DynMatrix< double >, Aleph::DynSetTree< GT::Arc *, Treap, Dft_Arc_Cmp< GT > >, Aleph::DynSetTree< std::pair< Key, Type >, Avl_Tree, Dft_Pair_Cmp< Key, Type, Aleph::less< Key > > >, Aleph::DynSetTree< std::pair< Key, Type >, BinTree, Dft_Pair_Cmp< Key, Type, Aleph::less< Key > > >, Aleph::DynSetTree< std::pair< Key, Type >, Rand_Tree, Dft_Pair_Cmp< Key, Type, Aleph::less< Key > > >, Aleph::DynSetTree< std::pair< Key, Type >, Rb_Tree, Dft_Pair_Cmp< Key, Type, Aleph::less< Key > > >, Aleph::DynSetTree< std::pair< Key, Type >, Splay_Tree, Dft_Pair_Cmp< Key, Type, Aleph::less< Key > > >, Aleph::DynSetTree< std::pair< Key, Type >, Treap, Dft_Pair_Cmp< Key, Type, Aleph::less< Key > > >, Aleph::DynSetTree< std::pair< Key, Type >, Treap_Rk, Dft_Pair_Cmp< Key, Type, Aleph::less< Key > > >, Aleph::DynSetTree< std::pair< Key, Data >, Avl_Tree, Dft_Pair_Cmp< Key, Data, Aleph::less< Key > > >, Aleph::DynSetTree< Key, Avl_Tree_Rk, Aleph::less< Key > >, Aleph::DynSetTree< Key, Avl_Tree, Aleph::less< Key > >, Aleph::DynSetTree< Key, BinTree, Aleph::less< Key > >, Aleph::DynSetTree< Key, HtdRbTreeRk, Aleph::less< Key > >, Aleph::DynSetTree< Key, HtdRbTree, Aleph::less< Key > >, Aleph::DynSetTree< Key, Rand_Tree, Aleph::less< Key > >, Aleph::DynSetTree< Key, Rb_Tree_Rk, Aleph::less< Key > >, Aleph::DynSetTree< Key, Rb_Tree, Aleph::less< Key > >, Aleph::DynSetTree< Key, Splay_Tree_Rk, Aleph::less< Key > >, Aleph::DynSetTree< Key, Splay_Tree, Aleph::less< Key > >, Aleph::DynSetTree< Key, TdRbTreeRk, Aleph::less< Key > >, Aleph::DynSetTree< Key, TdRbTree, Aleph::less< Key > >, Aleph::DynSetTree< Key, Treap, Aleph::less< Key > >, Aleph::DynSetTree< Key, Treap_Rk, Aleph::less< Key > >, Aleph::DynSetTree< Node * >, Aleph::DynSetTree< GT::Node *, Treap, Dft_Node_Cmp< GT > >, Aleph::DynSetTree< std::pair< Key, Operation >, Avl_Tree, Dft_Pair_Cmp< Key, Operation, Aleph::less< Key > > >, Aleph::DynSetTree< std::pair< Key, ValueType >, Avl_Tree, Dft_Pair_Cmp< Key, ValueType, Aleph::less< Key > > >, Aleph::DynSetTree< std::pair< void *, Flow_Type >, Avl_Tree, Dft_Pair_Cmp< void *, Flow_Type, Aleph::less< void * > > >, Aleph::DynSetTree< std::pair< const Aleph::Compiler_Expr *, size_t >, Avl_Tree, Dft_Pair_Cmp< const Aleph::Compiler_Expr *, size_t, Aleph::less< const Aleph::Compiler_Expr * > > >, Aleph::DynSetTree< std::pair< Aleph::Array< size_t >, double >, Aleph::Avl_Tree, Dft_Pair_Cmp< Aleph::Array< size_t >, double, Grevlex_Order > >, Aleph::DynSetTree< std::pair< size_t, double >, Avl_Tree, Dft_Pair_Cmp< size_t, double, Aleph::less< size_t > > >, Aleph::DynSetTree< std::pair< Node *, Node * >, Treap, Dft_Pair_Cmp< Node *, Node *, Aleph::less< Node * > > >, Aleph::DynSetTree< std::pair< std::string, Huffman_Node * >, Treap_Vtl, Dft_Pair_Cmp< std::string, Huffman_Node *, Aleph::less< std::string > > >, Aleph::DynSetTree< std::pair< std::string, BitArray >, Treap_Vtl, Dft_Pair_Cmp< std::string, BitArray, Aleph::less< std::string > > >, Aleph::DynSetTree< GT_Arc *, Rand_Tree, Aleph::IndexArc::Cmp_Arc >, Aleph::DynSetTree< GT_Node *, Treap, Dft_Node_Cmp< GT > >, Aleph::DynSetTree< GT_Arc *, Treap, Aleph::IndexArc::Cmp_Arc >, Aleph::DynSetTree< std::pair< int, int >, Avl_Tree, Aleph::less< std::pair< int, int > > >, Aleph::DynSetTree< std::pair< Node *, size_t >, Avl_Tree, Dft_Pair_Cmp< Node *, size_t, Aleph::less< Node * > > >, Aleph::DynSetTree< std::pair< Node *, Node * >, Avl_Tree, Dft_Pair_Cmp< Node *, Node *, Aleph::less< Node * > > >, Aleph::DynSetTree< Aleph::LineSweepFramework::SeqEvent, Aleph::Avl_Tree, Aleph::LineSweepFramework::CmpSeqEvent >, Aleph::DynSetTree< Node *, Rand_Tree >, Aleph::DynSetTree< Arc *, Rand_Tree >, Aleph::DynSetTree< std::pair< Arc *, size_t >, Avl_Tree, Dft_Pair_Cmp< Arc *, size_t, Aleph::less< Arc * > > >, Aleph::DynSetTree< Aleph::VisibilityPolygon::EdgeStatusTree::EdgeKey, Aleph::Treap, Aleph::VisibilityPolygon::EdgeStatusTree::EdgeKeyCmp >, Aleph::DynSetTree< std::pair< Pair_Key, Arc * >, Avl_Tree, Dft_Pair_Cmp< Pair_Key, Arc *, Aleph::less< Pair_Key > > >, Aleph::DynSetTree< std::pair< Node *, Aleph::Tree_Node * >, Avl_Tree, Dft_Pair_Cmp< Node *, Aleph::Tree_Node *, Aleph::less< Node * > > >, Aleph::DynSetTree< std::pair< Node *, Aleph::DynSetTree< Node * > >, Avl_Tree, Dft_Pair_Cmp< Node *, Aleph::DynSetTree< Node * >, Aleph::less< Node * > > >, Aleph::DynSetTree< Arc * >, Aleph::DynSetTree< std::pair< Arc *, Arc * >, Avl_Tree, Dft_Pair_Cmp< Arc *, Arc *, Aleph::less< Arc * > > >, Aleph::DynSetTree< std::pair< Node *, Cost_Type >, Avl_Tree, Dft_Pair_Cmp< Node *, Cost_Type, Aleph::less< Node * > > >, Aleph::DynSetTree< std::pair< Node *, Arc * >, Avl_Tree, Dft_Pair_Cmp< Node *, Arc *, Aleph::less< Node * > > >, Aleph::DynSetTree< int >, Aleph::DynSetTree< GT_Node *, Treap, TestNodeCmp >, Aleph::DynSetTree< Relation_T::Pair, Avl_Tree, Relation_T::Cmp >, Aleph::DynSetTree< std::pair< Event::EventId, TimeoutQueue::Event * >, Avl_Tree, Dft_Pair_Cmp< Event::EventId, TimeoutQueue::Event *, Aleph::less< Event::EventId > > >, Aleph::DynSetTree< TimeoutQueue::Event * >, Aleph::DynSetTree< size_t >, Aleph::DynSkipList< int >, Aleph::FixedQueue< Aleph::DynList< int > >, Aleph::FixedQueue< int >, Aleph::FixedQueue< void * >, Aleph::FixedStack< Node * >, Aleph::FixedStack< Aleph::DynList< int > >, Aleph::FixedStack< int >, Aleph::ODhashTable< P, AhHashDispatcher::Equal >, Aleph::ODhashTable< int >, Aleph::OLhashTable< int >, Aleph::Random_Set< int >, Aleph::ArrayHeap< T, Compare >, Aleph::DynArrayHeap< T, Compare >, Aleph::DynBinHeap< T, Compare >, Aleph::DynDlist< T >, Aleph::DynHashTable< Key, HashTable, Cmp >, Aleph::DynIntervalTree< T, Compare >, Aleph::DynList< T >, Aleph::DynSetTree< Key, Tree, Compare >, Aleph::DynSkipList< Key, Compare >, Aleph::ODhashTable< Key, Cmp >, and Aleph::OLhashTable< Key, Cmp >.

Public Member Functions

void emplace (Args &&... args)
 Appends a new element into the container by constructing it from the given args.
 
void emplace_end (Args &&... args)
 See emplace(Args && ... args).
 
void emplace_ins (Args &&... args)
 
template<typename... Args>
requires ((std::convertible_to<Args &&, T> and ...) and (Aleph::InsertableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<Args...>>::type, Item_Arg<Args>> and ...))
size_t ninsert (Args &&... args)
 Insert n variadic items.
 
template<typename... Args>
requires ((std::convertible_to<Args &&, T> and ...) and (Aleph::AppendableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<Args...>>::type, Item_Arg<Args>> and ...))
size_t nappend (Args &&... args)
 Append n variadic items.
 
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
void for_each (Operation &operation) const
 Traverse all the container and performs an operation on each element.
 
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
void for_each (Operation &&operation) const
 Overload of for_each() that accepts rvalues.
 
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
void each (Operation &operation) const
 Alias of for_each().
 
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
void each (Operation &&operation) const
 Alias of for_each() that accepts rvalues.
 
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
void each (const size_t pos, const size_t slice, Operation &operation) const
 Traverse the container starting at pos taking one item every slice, performing an operation on each visited element.
 
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
void each (const size_t pos, const size_t slice, Operation &&operation) const
 See each(size_t pos, size_t slice, Operation & operation) const.
 
template<class Operation >
requires Aleph::InvocableWith<Operation &, T &>
and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void each (const size_t pos, const size_t slice, Operation &operation)
 Traverse the container starting at pos taking one item every slice, performing an operation that may modify each visited item.
 
template<class Operation >
requires Aleph::InvocableWith<Operation &, T &>
and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void each (const size_t pos, const size_t slice, Operation &&operation)
 See each(size_t pos, size_t slice, Operation & operation).
 
template<class Operation >
requires Aleph::InvocableWith<Operation &, T &>
and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void mutable_for_each (Operation &operation)
 Apply a mutable operation to each element of the container.
 
template<class Operation >
requires Aleph::InvocableWith<Operation &, T &>
and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void mutable_for_each (Operation &&operation)
 See mutable_for_each(Operation & operation).
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
bool all (Operation &operation) const
 Check if all the elements of the container satisfy a condition.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
bool all (Operation &&operation) const
 Overload of all() that accepts rvalues.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
bool exists (Operation &op) const
 Test for existence in the container of an element satisfying a criterion.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
bool exists (Operation &&op) const
 Overload of exists() that accepts rvalues.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
bool none (Operation &op) const
 Test that no element satisfies a criterion.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
bool none (Operation &&op) const
 Overload of none() that accepts rvalues.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
size_t count_if (Operation &op) const
 Count the elements that satisfy a criterion.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
size_t count_if (Operation &&op) const
 Overload of count_if() that accepts rvalues.
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > maps (Operation &op) const
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > maps (Operation &&op) const
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > maps_if (Prop prop, Operation &op) const
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > maps_if (Prop prop, Operation &&op) const
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > map (Operation &op) const
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > map (Operation &&op) const
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > map_if (Prop prop, Operation &op) const
 
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > map_if (Prop prop, Operation &&op) const
 
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
auto flat_map (Operation &op) const
 Map each element to a container and concatenate the results.
 
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
auto flat_map (Operation &&op) const
 Overload of flat_map() that accepts rvalues.
 
Aleph::DynList< T > to_dynlist () const
 Convert container to DynList.
 
std::vector< T > to_vector () const
 Convert container to std::vector.
 
template<typename Acc = T, class Op >
requires Aleph::dry_detail::FoldOperation<Op, Acc, T>
Acc foldl (const Acc &init, Op &op) const
 Fold the elements of the container to a specific result.
 
template<typename Acc = T, class Op >
requires Aleph::dry_detail::FoldOperation<Op, Acc, T>
Acc foldl (const Acc &init, Op &&op) const
 Overload of foldl() that accepts rvalues.
 
template<typename Acc = T, class Op >
requires Aleph::dry_detail::FoldOperation<Op, Acc, T>
Acc fold_left (const Acc &init, Op &op) const
 Alias for foldl().
 
template<typename Acc = T, class Op >
requires Aleph::dry_detail::FoldOperation<Op, Acc, T>
Acc fold_left (const Acc &init, Op &&op) const
 Overload of fold_left() that accepts rvalues.
 
template<class Operation >
requires Aleph::dry_detail::FoldOperation<Operation, T, T>
T fold (const T &init, Operation &operation) const
 Simplified version of foldl() where the folded type is the same type of elements stored in the container.
 
template<class Operation >
requires Aleph::dry_detail::FoldOperation<Operation, T, T>
T fold (const T &init, Operation &&operation) const
 Overload of fold() that accepts rvalues.
 
template<typename Acc = T, class Op >
requires Aleph::dry_detail::FoldRightOperation<Op, Acc, T>
Acc foldr (const Acc &init, Op &op) const
 Fold the elements from the last to the first.
 
template<typename Acc = T, class Op >
requires Aleph::dry_detail::FoldRightOperation<Op, Acc, T>
Acc foldr (const Acc &init, Op &&op) const
 Overload of foldr() that accepts rvalues.
 
template<class Op , class U = T>
requires Aleph::dry_detail::FoldOperation<Op, T, T>
and std::copy_constructible< U > std::optional< T > reduce (Op &op) const
 Fold the elements with no initial value.
 
template<class Op , class U = T>
requires Aleph::dry_detail::FoldOperation<Op, T, T>
and std::copy_constructible< U > std::optional< T > reduce (Op &&op) const
 Overload of reduce() that accepts rvalues.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< T > filter (Operation &operation) const
 Filter the elements of a container according to a matching criterion.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< T > filter (Operation &&operation) const
 Overload of filter() that accepts rvalues.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< const T * > ptr_filter (Operation &operation) const
 Filter the elements of a container according to a matching criterion and return a pointer to the matched items in the container.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< const T * > ptr_filter (Operation &&operation) const
 Overload of ptr_filter() that accepts rvalues.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< std::tuple< T, size_t > > pfilter (Operation &operation) const
 Filter the elements of a container according to a matching criterion and determine its positions respect to the traversal of container.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< std::tuple< T, size_t > > pfilter (Operation &&operation) const
 Overload of pfilter() that accepts rvalues.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > partition (Operation &op) const
 Exclusive partition of container according to a filter criterion.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > partition (Operation &&op) const
 Overload of partition() that accepts rvalues.
 
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > partition (size_t n) const
 Exclusive partition of container in the nth item.
 
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > split_half () const
 Split the container into two halves by alternating elements.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
std::tuple< Aleph::DynList< T >, Aleph::DynList< T > > tpartition (Operation &op) const
 Exclusive partition of container according to a filter criterion.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
std::tuple< Aleph::DynList< T >, Aleph::DynList< T > > tpartition (Operation &&op) const
 Overload of tpartition() that accepts rvalues.
 
size_t length () const noexcept(Aleph::dry_detail::const_traversal_is_noexcept< Container, T >)
 Count the number of elements of a container.
 
Aleph::DynList< T > rev () const
 Return a list with the elements of container in reverse order respect to its traversal order.
 
Aleph::DynList< T > take (const size_t n) const
 Return a list with the first n elements seen in the container during its traversal.
 
Aleph::DynList< T > take (size_t i, const size_t j, const size_t step=1) const
 Return a list with the elements at positions i, i + step, i + 2 step, ... that are not greater than j, respect to the traversal order.
 
Aleph::DynList< T > drop (const size_t n) const
 Drop the first n elements seen in the container during its traversal.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< T > take_while (Operation &op) const
 The longest prefix of elements that satisfy a criterion.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< T > take_while (Operation &&op) const
 Overload of take_while() that accepts rvalues.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< T > drop_while (Operation &op) const
 The elements after the longest prefix that satisfies a criterion.
 
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< T > drop_while (Operation &&op) const
 Overload of drop_while() that accepts rvalues.
 
template<class C = Container>
requires requires (C & c) { c.remove(); }
void mutable_drop (const size_t n)
 Drop the first n elements seen from container.
 

Static Public Member Functions

template<typename... Items>
requires ((std::convertible_to<Items &&, T> and ...) and (Aleph::AppendableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<Items...>>::type, Item_Arg<Items>> and ...))
static Container build (Items &&... items)
 Build a container that holds the given items.
 
template<class D , typename... Items>
requires (std::derived_from<D, typename Aleph::concepts_detail::defer<Container, D>::type> and std::default_initializable<D> and (std::convertible_to<Items &&, T> and ...) and (Aleph::AppendableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<D, Items...>>::type, Item_Arg<Items>> and ...))
static D build_as (Items &&... items)
 Build a D, a class derived from the container, holding the given items.
 

Public Attributes

template<typename... Args>
requires (typename Aleph::concepts_detail::defer<Container, std::tuple<Args...>>::type & c, T && x)
 and { c.append(std::move(x))
 Insert a new element into the container by constructing it from the given args.
 
template<typename R = void, class Prop , class Operation >
requires (Aleph::DynList<Aleph::dry_detail::map_result_t<R, Operation &, T>> & l, Operation & op, const T & item)
and Aleph::InvocableWith< Operation &, const T & > and { l.append(std::invoke(op, item))
 Conditional mapping of the elements of the container.
 

Private Types

template<class Arg >
using Item_Arg = std::conditional_t< std::is_same_v< std::remove_cvref_t< Arg >, T >, Arg, T >
 

Private Member Functions

Container * me () noexcept
 
const Container * const_me () const noexcept
 
template<class Operation >
bool const_traverse (Operation &&operation) const
 

Static Private Member Functions

template<class Arg >
static decltype(auto) as_item (Arg &&arg)
 

Detailed Description

template<class Container, typename T>
class FunctionalMethods< Container, T >

Common methods to the Aleph-w ( \(\aleph_\omega\)) containers.

This class contains many and practice methods that are common to any Aleph-w ( \(\aleph_\omega\)) container.

The members that only read traverse the container with its constant traverse(), so their operations receive each item as const T &. The operations are called through std::invoke: a pointer to member works as a projection.

Definition at line 1234 of file ah-dry.H.

Member Typedef Documentation

◆ Item_Arg

template<class Container , typename T >
template<class Arg >
using FunctionalMethods< Container, T >::Item_Arg = std::conditional_t<std::is_same_v<std::remove_cvref_t<Arg>, T>, Arg, T>
private

Definition at line 1258 of file ah-dry.H.

Member Function Documentation

◆ all() [1/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
bool FunctionalMethods< Container, T >::all ( Operation &&  operation) const
inline

Overload of all() that accepts rvalues.

The operation is passed (invoked) as a named lvalue to the lvalue-reference overload rather than being perfectly forwarded.

Template Parameters
OperationCallable with signature bool(const T &).
Parameters
[in]operationcondition to test.
Returns
true if all elements satisfy the condition.
Exceptions
Maythrow the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided.

Definition at line 1687 of file ah-dry.H.

◆ all() [2/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
bool FunctionalMethods< Container, T >::all ( Operation &  operation) const
inline

Check if all the elements of the container satisfy a condition.

all(operation) checks if for each element item of container operation(item) returns true.

This method has complexity \(O(n)\) in average and worst case.

Parameters
[in]operationto be used as condition
Returns
true if all the elements satisfy the criterion: false otherwise.
Exceptions
anythingthat could throw operation

Definition at line 1666 of file ah-dry.H.

References FunctionalMethods< Container, T >::const_traverse().

Referenced by Aleph::Matrix< Trow, Tcol, NumType >::check_vectors(), demo_functional(), demo_predicates(), demonstrate_functional(), demonstrate_functional_features(), Aleph::Matrix< Trow, Tcol, NumType >::equal_to(), main(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), and TYPED_TEST_P().

◆ as_item()

template<class Container , typename T >
template<class Arg >
static decltype(auto) FunctionalMethods< Container, T >::as_item ( Arg &&  arg)
inlinestaticprivate

◆ build()

template<class Container , typename T >
template<typename... Items>
requires ((std::convertible_to<Items &&, T> and ...) and (Aleph::AppendableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<Items...>>::type, Item_Arg<Items>> and ...))
static Container FunctionalMethods< Container, T >::build ( Items &&...  items)
inlinestatic

Build a container that holds the given items.

C::build(a, b, c) builds the same container as C{a, b, c}: an empty container that receives each item, in argument order, through its append(). Hence the result follows the rules of the container:

  • a sequence (DynList, Array, DynArray, ...) keeps the order;
  • a stack ends with the last item on top, and a queue with the first item at its front;
  • a set or a map keeps one item per key: of two equal keys, the first one stays;
  • a heap keeps every item, in heap order;
  • a fixed-capacity container (FixedStack, FixedQueue, ArrayHeap) has its default capacity, as with the braces.

Unlike the braces, the items are forwarded: an rvalue is moved, so move-only types such as std::unique_ptr can be stored, and an item may have any type implicitly convertible to T, without the narrowing errors of a braced list. Because build() is a named function and not a constructor, Array<int>::build(10) always means the one-element array {10}; a capacity is reserved with create_reserved().

A class derived from a container declares its own build() with Derived_Build(Name), so that it builds the derived class.

Parameters
[in]itemsthe items, in insertion order.
Returns
the container.
Exceptions
anythingthat the default constructor of the container, the conversion of an item to T or append() throws; then the partially built container is destroyed and nothing leaks.
See also
build_as() Derived_Build

Definition at line 1423 of file ah-dry.H.

Referenced by TEST().

◆ build_as()

template<class Container , typename T >
template<class D , typename... Items>
requires (std::derived_from<D, typename Aleph::concepts_detail::defer<Container, D>::type> and std::default_initializable<D> and (std::convertible_to<Items &&, T> and ...) and (Aleph::AppendableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<D, Items...>>::type, Item_Arg<Items>> and ...))
static D FunctionalMethods< Container, T >::build_as ( Items &&...  items)
inlinestatic

Build a D, a class derived from the container, holding the given items.

The items are appended exactly as build() appends them, through the append() of the container, even if D declares an append() with another meaning (as DynMapTree does, whose append(key, data) takes the data apart). It is what Derived_Build(Name) uses.

Template Parameters
Dthe class to build; it derives from the container and is default constructible.
Parameters
[in]itemsthe items, in insertion order.
Returns
the D.
Exceptions
anythingthat build() throws.

Definition at line 1448 of file ah-dry.H.

References FunctionalMethods< Container, T >::as_item().

◆ const_me()

template<class Container , typename T >
const Container * FunctionalMethods< Container, T >::const_me ( ) const
inlineprivatenoexcept

◆ const_traverse()

template<class Container , typename T >
template<class Operation >
bool FunctionalMethods< Container, T >::const_traverse ( Operation &&  operation) const
inlineprivate

◆ count_if() [1/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
size_t FunctionalMethods< Container, T >::count_if ( Operation &&  op) const
inline

Overload of count_if() that accepts rvalues.

Parameters
[in]oppredicate to test.
Returns
the number of elements for which op is true.
Exceptions
anythingthat op throws.

Definition at line 1791 of file ah-dry.H.

◆ count_if() [2/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
size_t FunctionalMethods< Container, T >::count_if ( Operation &  op) const
inline

Count the elements that satisfy a criterion.

Template Parameters
OperationCallable with signature bool(const T &).
Parameters
[in]oppredicate to test.
Returns
the number of elements for which op is true.
Exceptions
anythingthat op throws.

Definition at line 1772 of file ah-dry.H.

References FunctionalMethods< Container, T >::const_traverse().

Referenced by TEST().

◆ drop()

template<class Container , typename T >
Aleph::DynList< T > FunctionalMethods< Container, T >::drop ( const size_t  n) const
inline

Drop the first n elements seen in the container during its traversal.

The complexity of this method is \(O(N)\) where N always is the number of elements of container.

Parameters
[in]nnumber of elements to drop
Returns
A DynList<T> having the remainder \(N - n\) elements according to traversal order; it is empty if n is not less than N.
Exceptions
bad_allocif there is no enough memory

Definition at line 2757 of file ah-dry.H.

References Aleph::DynList< T >::append(), and FunctionalMethods< Container, T >::const_traverse().

Referenced by main(), TEST(), TEST(), and TYPED_TEST_P().

◆ drop_while() [1/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< T > FunctionalMethods< Container, T >::drop_while ( Operation &&  op) const
inline

Overload of drop_while() that accepts rvalues.

Parameters
[in]oppredicate.
Returns
DynList with the elements from the first one that does not satisfy op to the end.
Exceptions
anythingthat op throws, or bad_alloc.

Definition at line 2841 of file ah-dry.H.

◆ drop_while() [2/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< T > FunctionalMethods< Container, T >::drop_while ( Operation &  op) const
inline

The elements after the longest prefix that satisfies a criterion.

Template Parameters
OperationCallable with signature bool(const T &).
Parameters
[in]oppredicate; it is not called again after it first returns false.
Returns
DynList with the elements from the first one that does not satisfy op to the end, in traversal order.
Exceptions
anythingthat op throws, or bad_alloc.

Definition at line 2818 of file ah-dry.H.

References FunctionalMethods< Container, T >::and, Aleph::DynList< T >::append(), and FunctionalMethods< Container, T >::const_traverse().

◆ each() [1/6]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocableWith<Operation &, T &>
and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void FunctionalMethods< Container, T >::each ( const size_t  pos,
const size_t  slice,
Operation &&  operation 
)
inline

See each(size_t pos, size_t slice, Operation & operation).

Definition at line 1613 of file ah-dry.H.

◆ each() [2/6]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
void FunctionalMethods< Container, T >::each ( const size_t  pos,
const size_t  slice,
Operation &&  operation 
) const
inline

See each(size_t pos, size_t slice, Operation & operation) const.

Definition at line 1566 of file ah-dry.H.

◆ each() [3/6]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocableWith<Operation &, T &>
and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void FunctionalMethods< Container, T >::each ( const size_t  pos,
const size_t  slice,
Operation &  operation 
)
inline

Traverse the container starting at pos taking one item every slice, performing an operation that may modify each visited item.

Available only if the container's modifiable traversal hands out modifiable references. Be very careful with the fact that this method allows modifying the elements themselves, which could badly alter the internal state of the container. This would be the case for heaps, binary trees and hash tables.

Parameters
[in]posposition of the first visited item (0-based)
[in]slicedistance between two consecutive visited items
[in]operationto be done on each visited element, with signature void(T &).
Exceptions
anythingthat can throw operation

Definition at line 1590 of file ah-dry.H.

References FunctionalMethods< Container, T >::me().

◆ each() [4/6]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
void FunctionalMethods< Container, T >::each ( const size_t  pos,
const size_t  slice,
Operation &  operation 
) const
inline

Traverse the container starting at pos taking one item every slice, performing an operation on each visited element.

each(pos, slice, operation) visits the items at positions pos, pos + slice, pos + 2 slice, ... and on each one performs operation(item), which receives it as const T &. Nothing is visited if slice is zero or pos is not smaller than the number of items.

Parameters
[in]posposition of the first visited item (0-based)
[in]slicedistance between two consecutive visited items
[in]operationto be done on each visited element.
Exceptions
anythingthat can throw operation

Definition at line 1545 of file ah-dry.H.

References FunctionalMethods< Container, T >::const_traverse().

◆ each() [5/6]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
void FunctionalMethods< Container, T >::each ( Operation &&  operation) const
inline

Alias of for_each() that accepts rvalues.

The operation is passed (invoked) as a named lvalue to the lvalue-reference overload rather than being perfectly forwarded.

Template Parameters
OperationCallable with signature void(const T &).
Parameters
[in]operationto be performed on each item.
Exceptions
Maythrow the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided.

Definition at line 1524 of file ah-dry.H.

◆ each() [6/6]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
void FunctionalMethods< Container, T >::each ( Operation &  operation) const
inline

Alias of for_each().

Parameters
[in]operationto be performed on each item.
Exceptions
anythingthat operation throws.

Definition at line 1507 of file ah-dry.H.

References FunctionalMethods< Container, T >::for_each().

Referenced by TEST().

◆ emplace()

template<class Container , typename T >
void FunctionalMethods< Container, T >::emplace ( Args &&...  args)
inline

Appends a new element into the container by constructing it from the given args.

emplace(args) builds a T from args with direct initialization, as T item(args...), and moves it into the container with append(). It accepts only the arguments a constructor of T takes: unlike a cast, it never converts a pointer to an integer nor drops const.

Note
The semantic of append depends on container. In general, this has some sense for lists and arrays, and it means insertion at the end of sequence. On other type of container append() is equivalent to insert().
Parameters
[in]argsvariadic arguments list
Exceptions
bad_allocif there is no enough memory, and anything that the constructor of T throws.

Definition at line 1292 of file ah-dry.H.

References FunctionalMethods< Container, T >::me().

Referenced by TEST(), and TEST().

◆ emplace_end()

template<class Container , typename T >
void FunctionalMethods< Container, T >::emplace_end ( Args &&...  args)
inline

See emplace(Args && ... args).

Definition at line 1303 of file ah-dry.H.

References FunctionalMethods< Container, T >::me().

◆ emplace_ins()

template<class Container , typename T >
void FunctionalMethods< Container, T >::emplace_ins ( Args &&...  args)
inline

Definition at line 1329 of file ah-dry.H.

References FunctionalMethods< Container, T >::me().

Referenced by TEST().

◆ exists() [1/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
bool FunctionalMethods< Container, T >::exists ( Operation &&  op) const
inline

Overload of exists() that accepts rvalues.

The operation is passed (invoked) as a named lvalue to the lvalue-reference overload rather than being perfectly forwarded.

Template Parameters
OperationCallable with signature bool(const T &).
Parameters
[in]oppredicate to test.
Returns
true if any element satisfies the predicate.
Exceptions
Maythrow the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided.

Definition at line 1728 of file ah-dry.H.

◆ exists() [2/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
bool FunctionalMethods< Container, T >::exists ( Operation &  op) const
inline

Test for existence in the container of an element satisfying a criterion.

exists(op) returns true if it exists any element item in container for which op(item) return true.

This method has complexity \(O(n)\) in average and worst case.

Parameters
[in]opoperation for testing existence
Returns
true if it exists an item for which op return true; false otherwise.
Exceptions
anythingthat could throw op

Definition at line 1707 of file ah-dry.H.

References FunctionalMethods< Container, T >::const_traverse().

Referenced by QueueTheadsPool< T >::create_thread(), demo_functional(), demo_predicates(), demonstrate_functional(), demonstrate_functional_features(), FunctionalMethods< Container, T >::none(), Aleph::Stoer_Wagner_Min_Cut< GT, Distance, SA >::operator()(), TEST(), TEST(), TEST_F(), TEST_F(), and TEST_F().

◆ filter() [1/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< T > FunctionalMethods< Container, T >::filter ( Operation &&  operation) const
inline

Overload of filter() that accepts rvalues.

The operation is passed (invoked) as a named lvalue to the lvalue-reference overload rather than being perfectly forwarded.

Template Parameters
OperationFilter callable.
Parameters
[in]operationfilter predicate.
Returns
DynList<T> with matching elements.
Exceptions
Maythrow the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided.

Definition at line 2381 of file ah-dry.H.

◆ filter() [2/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< T > FunctionalMethods< Container, T >::filter ( Operation &  operation) const
inline

Filter the elements of a container according to a matching criterion.

This method builds a dynamic list with copies of items of container matching a criterion defined by operation, which should have the following signature:

bool operation(const T & item)

If operation return true then item matches the criterion; otherwise, operation must return false.

For example, if the container has integer, then the following code snippet would return a list containing the items greater than 100:

c.filter([] (auto item) { return item > 100; });

Parameters
[in]operationdefining the filter criterion
Returns
a DynList<T> with the matched elements.
Exceptions
anythingthat could throw operation or bad_alloc if there is no enough memory

Definition at line 2356 of file ah-dry.H.

References Aleph::DynList< T >::append(), and FunctionalMethods< Container, T >::const_traverse().

Referenced by demo_dynarray(), demo_functional(), demo_integration(), demo_transformation(), demonstrate_functional_features(), Aleph::intercept(), TEST(), TEST(), TEST(), test_DynSet(), test_DynSetLinHash(), TEST_F(), TEST_F(), and TEST_F().

◆ flat_map() [1/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
auto FunctionalMethods< Container, T >::flat_map ( Operation &&  op) const
inline

Overload of flat_map() that accepts rvalues.

Parameters
[in]opoperation that maps an item to a container.
Returns
DynList with the concatenation of the containers.
Exceptions
anythingthat op throws, or bad_alloc.

Definition at line 2062 of file ah-dry.H.

◆ flat_map() [2/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
auto FunctionalMethods< Container, T >::flat_map ( Operation &  op) const
inline

Map each element to a container and concatenate the results.

flat_map(op) appends, in traversal order, all the items of each container op(item). The result holds the item type of that container: its Item_Type for an Aleph container, or else its value_type.

Template Parameters
OperationCallable with signature C(const T &), where C is an Aleph container with for_each() or a range.
Parameters
[in]opoperation that maps an item to a container.
Returns
DynList with the concatenation of the containers.
Exceptions
anythingthat op throws, or bad_alloc.

Definition at line 2034 of file ah-dry.H.

References Aleph::DynList< T >::append(), and FunctionalMethods< Container, T >::const_traverse().

◆ fold() [1/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::dry_detail::FoldOperation<Operation, T, T>
T FunctionalMethods< Container, T >::fold ( const T &  init,
Operation &&  operation 
) const
inline

Overload of fold() that accepts rvalues.

The operation is passed (invoked) as a named lvalue to the lvalue-reference overload rather than being perfectly forwarded.

Template Parameters
OperationFolding callable.
Parameters
[in]initinitial accumulator value.
[in]operationfolding operation.
Returns
folded result.
Exceptions
Maythrow the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided.

Definition at line 2241 of file ah-dry.H.

◆ fold() [2/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::dry_detail::FoldOperation<Operation, T, T>
T FunctionalMethods< Container, T >::fold ( const T &  init,
Operation &  operation 
) const
inline

Simplified version of foldl() where the folded type is the same type of elements stored in the container.

Parameters
[in]initinitial accumulator value.
[in]operationfolding operation.
Returns
folded result.
Exceptions
anythingthat operation throws.
See also
foldl(const Acc & init, Op & op)

Definition at line 2222 of file ah-dry.H.

Referenced by main(), and TEST().

◆ fold_left() [1/2]

template<class Container , typename T >
template<typename Acc = T, class Op >
requires Aleph::dry_detail::FoldOperation<Op, Acc, T>
Acc FunctionalMethods< Container, T >::fold_left ( const Acc &  init,
Op &&  op 
) const
inline

Overload of fold_left() that accepts rvalues.

The operation is passed (invoked) as a named lvalue to the lvalue-reference overload rather than being perfectly forwarded.

Template Parameters
Accaccumulator type, deduced from init.
OpFolding callable.
Parameters
[in]initinitial accumulator value.
[in]opfolding operation.
Returns
folded result.
Exceptions
Maythrow the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided.

Definition at line 2206 of file ah-dry.H.

◆ fold_left() [2/2]

template<class Container , typename T >
template<typename Acc = T, class Op >
requires Aleph::dry_detail::FoldOperation<Op, Acc, T>
Acc FunctionalMethods< Container, T >::fold_left ( const Acc &  init,
Op &  op 
) const
inline

Alias for foldl().

Template Parameters
Accaccumulator type, deduced from init.
Parameters
[in]initinitial accumulator value
[in]opfolding operation
Returns
folded result
Exceptions
anythingthat op throws.

Definition at line 2186 of file ah-dry.H.

Referenced by TEST().

◆ foldl() [1/2]

template<class Container , typename T >
template<typename Acc = T, class Op >
requires Aleph::dry_detail::FoldOperation<Op, Acc, T>
Acc FunctionalMethods< Container, T >::foldl ( const Acc &  init,
Op &&  op 
) const
inline

Overload of foldl() that accepts rvalues.

The operation is passed (invoked) as a named lvalue to the lvalue-reference overload rather than being perfectly forwarded.

Template Parameters
Accaccumulator type, deduced from init.
OpFolding callable.
Parameters
[in]initinitial accumulator value.
[in]opfolding operation.
Returns
folded result.
Exceptions
Maythrow the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided.

Definition at line 2171 of file ah-dry.H.

◆ foldl() [2/2]

template<class Container , typename T >
template<typename Acc = T, class Op >
requires Aleph::dry_detail::FoldOperation<Op, Acc, T>
Acc FunctionalMethods< Container, T >::foldl ( const Acc &  init,
Op &  op 
) const
inline

Fold the elements of the container to a specific result.

foldl(init, op) set an internal variable acc of type Acc to init value. Then it traverses the container, and on each item it performs:

acc = op(acc, item);

So acc serves as a sort of accumulator. If op accepts it as an rvalue, acc is moved into op instead of copied, so folding into a container costs O(1) per item, as std::accumulate does.

op should have the following signature:

Acc op(Acc acc, const T & item);

Since foldl is overloaded with several operation structures, there is a certain flexibility with the parameter qualifiers. You could, for example, declare acc and/or item by value.

The first template parameter Acc is the folded type; it is deduced from init. For example, to determine the maximum of all elements:

c.foldl(std::numeric_limits<int>::min(), [] (int acc, int item) { return std::max(acc, item); });

and to sum the inverted elements as double:

c.template foldl<double>(0, [] (double acc, int item) { return acc + 1.0/item; });

Parameters
[in]initinitial value of folded value (or accumulator).
[in]opoperation to be performed on each item and used for folding.
Returns
the final folded computation.
Exceptions
anythingthat could throw op

Definition at line 2145 of file ah-dry.H.

References FunctionalMethods< Container, T >::const_traverse(), and Aleph::dry_detail::fold_left_step().

Referenced by demo_dynarray(), demo_functional(), demo_integration(), demo_vector_dynlist(), Aleph::format_string(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), Aleph::to_Pascalcase(), and TYPED_TEST_P().

◆ foldr() [1/2]

template<class Container , typename T >
template<typename Acc = T, class Op >
requires Aleph::dry_detail::FoldRightOperation<Op, Acc, T>
Acc FunctionalMethods< Container, T >::foldr ( const Acc &  init,
Op &&  op 
) const
inline

Overload of foldr() that accepts rvalues.

Parameters
[in]initinitial accumulator value.
[in]opfolding operation.
Returns
folded result.
Exceptions
anythingthat op throws, or bad_alloc.

Definition at line 2287 of file ah-dry.H.

◆ foldr() [2/2]

template<class Container , typename T >
template<typename Acc = T, class Op >
requires Aleph::dry_detail::FoldRightOperation<Op, Acc, T>
Acc FunctionalMethods< Container, T >::foldr ( const Acc &  init,
Op &  op 
) const
inline

Fold the elements from the last to the first.

foldr(init, op) computes op(x0, op(x1, ... op(xn-1, init))) for the items x0, ..., xn-1 in traversal order: the operation receives the item first and the accumulator second, as Haskell's foldr. The accumulator is moved into op when op accepts an rvalue.

Template Parameters
Accaccumulator type, deduced from init.
OpFolding callable, with signature Acc(const T &, Acc).
Parameters
[in]initinitial accumulator value.
[in]opfolding operation.
Returns
folded result.
Exceptions
anythingthat op throws, or bad_alloc.
Note
It keeps a list of pointers to the n items: O(n) extra memory.

Definition at line 2263 of file ah-dry.H.

References FunctionalMethods< Container, T >::const_traverse(), and Aleph::dry_detail::fold_right_step().

◆ for_each() [1/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
void FunctionalMethods< Container, T >::for_each ( Operation &&  operation) const
inline

Overload of for_each() that accepts rvalues.

The operation is passed (invoked) as a named lvalue to the lvalue-reference overload rather than being perfectly forwarded.

Template Parameters
OperationCallable with signature void(const T &).
Parameters
[in]operationto be performed on each item.
Exceptions
Maythrow the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided.

Definition at line 1496 of file ah-dry.H.

◆ for_each() [2/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocableWith<Operation &, const T &>
void FunctionalMethods< Container, T >::for_each ( Operation &  operation) const
inline

Traverse all the container and performs an operation on each element.

for_each(operation) traverses the container, and on each element item is performed operation(item).

operation must have the following signature:

void operation(const T & item)

Overloading of this method allows that the signature can be lightly different; for example, remove the reference. To modify the items, use mutable_for_each().

Parameters
[in]operationto be done on each element.
Exceptions
anythingthat can throw operation

Definition at line 1475 of file ah-dry.H.

References FunctionalMethods< Container, T >::const_traverse().

Referenced by Aleph::Array< T >::Array(), Aleph::Gen_Polynomial< Coefficient >::Gen_Polynomial(), Aleph::Matrix< Trow, Tcol, NumType >::Matrix(), OHashTest< HashTbl >::OHashTest(), Aleph::Random_Set< T >::Random_Set(), Aleph::Random_Set< T >::Random_Set(), SpecialCtors< Container, T >::SpecialCtors(), Aleph::HashSet< Key, HashSetTable, Cmp >::add(), Aleph::Two_Sat< GT >::add_at_most_one(), Aleph::build_spanning_tree(), Aleph::Bellman_Ford< GT, Distance, Ait, NAit, SA >::build_tree(), Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::clear(), Aleph::VoronoiDiagramFromDelaunay::clipped_cells(), Aleph::DynIntervalTree< T, Compare >::copy_from(), count_distinct_colors(), create_table(), ctors_test(), demo_dynarray(), demo_dynlist(), demo_dynset_lhash(), demo_functional(), demo_iteration(), demo_performance(), demo_practical(), demo_subset_enumeration(), demonstrate_basic_operations(), demonstrate_functional(), demonstrate_functional_features(), demonstrate_ranked_operations(), Aleph::Gen_Polynomial< Coefficient >::divide_scalar_inplace(), Aleph::dyndlist_to_DynArray(), Aleph::dyndlist_to_DynList(), Aleph::dynlist_to_DynDlist(), FunctionalMethods< Container, T >::each(), Aleph::filter(), Aleph::filter(), Aleph::Gen_MultiPolynomial< Coefficient, MonomOrder >::for_each_term_desc(), Aleph::format_string(), Aleph::Gen_Polynomial< Coefficient >::from_roots(), main(), main(), Aleph::maphash_keys_to_DynList(), Aleph::maphash_to_Array(), Aleph::maphash_to_DynList(), Aleph::maphash_to_stdmap(), Aleph::maphash_values_to_DynList(), Aleph::maptree_keys_to_DynList(), Aleph::maptree_to_Array(), Aleph::maptree_to_DynList(), Aleph::maptree_to_stdmap(), Aleph::maptree_values_to_DynList(), meeting_scheduler(), Aleph::Gen_Polynomial< Coefficient >::multi_eval(), Aleph::Matrix< Trow, Tcol, NumType >::operator+=(), Aleph::Matrix< Trow, Tcol, NumType >::operator-=(), Aleph::Random_Set< T >::operator=(), SimpleQueue::print(), Aleph::Cnode::print_words(), GraphCommon< GT, Node, Arc >::remove_arcs_if(), Aleph::List_SGraph< __Graph_Node, __Graph_Arc >::remove_node(), Aleph::Gen_MultiPolynomial< Coefficient, MonomOrder >::remove_zeros(), Aleph::Gen_Polynomial< Coefficient >::remove_zeros(), Aleph::reverse(), roots_and_interpolation(), Aleph::Gen_Polynomial< Coefficient >::scale_inplace(), Aleph::sethash_to_Array(), Aleph::sethash_to_DynArray(), Aleph::sethash_to_DynList(), Aleph::sethash_to_vector(), Aleph::settree_to_Array(), Aleph::settree_to_DynArray(), Aleph::settree_to_DynList(), Aleph::settree_to_stdset(), Aleph::settree_to_vector(), Aleph::shuffle(), Aleph::shuffle_ptr(), test(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), test_tree(), to_sorted_vector(), Aleph::Gen_MultiPolynomial< Coefficient, MonomOrder >::to_str(), Aleph::to_string(), transfer_function(), Aleph::GeomBowyerWatsonUtils::triangulate(), TYPED_TEST_P(), TYPED_TEST_P(), Moved_From_Case< DynSkipList< int > >::use(), and Moved_From_Case< Random_Set< int > >::use().

◆ length()

template<class Container , typename T >
size_t FunctionalMethods< Container, T >::length ( ) const
inlinenoexcept

Count the number of elements of a container.

This method counts the number of elements stored in the container.

Note
Take in account that this method computes; it does not retrieve. Consequently, it always takes \(O(n)\). However, for many containers this number is already stored and retrievable in \(O(1)\) through the method size()
Returns
the number of elements stored in the container.
Exceptions
nothing,unlessthe traversal of the container throws.

Definition at line 2654 of file ah-dry.H.

References FunctionalMethods< Container, T >::const_traverse().

Referenced by demo_grouping(), main(), Aleph::Rope< Char, LeafSize >::maybe_rebalance(), and TEST().

◆ map() [1/2]

template<class Container , typename T >
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > FunctionalMethods< Container, T >::map ( Operation &&  op) const
inline

Definition at line 1967 of file ah-dry.H.

◆ map() [2/2]

template<class Container , typename T >
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > FunctionalMethods< Container, T >::map ( Operation &  op) const
inline

Definition at line 1946 of file ah-dry.H.

Referenced by TEST(), TEST(), and TYPED_TEST_P().

◆ map_if() [1/2]

template<class Container , typename T >
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > FunctionalMethods< Container, T >::map_if ( Prop  prop,
Operation &&  op 
) const
inline

Definition at line 2014 of file ah-dry.H.

◆ map_if() [2/2]

template<class Container , typename T >
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > FunctionalMethods< Container, T >::map_if ( Prop  prop,
Operation &  op 
) const
inline

Definition at line 1990 of file ah-dry.H.

Referenced by TEST(), TEST(), and TYPED_TEST_P().

◆ maps() [1/2]

template<class Container , typename T >
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > FunctionalMethods< Container, T >::maps ( Operation &&  op) const
inline

Definition at line 1859 of file ah-dry.H.

◆ maps() [2/2]

template<class Container , typename T >
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > FunctionalMethods< Container, T >::maps ( Operation &  op) const
inline

◆ maps_if() [1/2]

template<class Container , typename T >
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > FunctionalMethods< Container, T >::maps_if ( Prop  prop,
Operation &&  op 
) const
inline

Definition at line 1923 of file ah-dry.H.

◆ maps_if() [2/2]

template<class Container , typename T >
Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > FunctionalMethods< Container, T >::maps_if ( Prop  prop,
Operation &  op 
) const
inline

◆ me()

◆ mutable_drop()

template<class Container , typename T >
template<class C = Container>
requires requires (C & c) { c.remove(); }
void FunctionalMethods< Container, T >::mutable_drop ( const size_t  n)
inline

Drop the first n elements seen from container.

It calls remove() n times, so it is available only for containers whose remove() takes no arguments and removes the first element, such as DynList. On the others its constraint is not satisfied: requires { c.mutable_drop(n); } is false, instead of the body failing to compile when used.

The complexity of this method is n times that of remove().

Parameters
[in]nnumber of elements to remove
Exceptions
whatremove() throws when the container runs out of elements, for instance underflow_error on DynList. The elements already removed stay removed.

Definition at line 2863 of file ah-dry.H.

References FunctionalMethods< Container, T >::me().

◆ mutable_for_each() [1/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocableWith<Operation &, T &>
and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void FunctionalMethods< Container, T >::mutable_for_each ( Operation &&  operation)
inline

See mutable_for_each(Operation & operation).

Definition at line 1647 of file ah-dry.H.

◆ mutable_for_each() [2/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocableWith<Operation &, T &>
and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void FunctionalMethods< Container, T >::mutable_for_each ( Operation &  operation)
inline

Apply a mutable operation to each element of the container.

Traverses the container and calls operation on every element, allowing the operation to modify each item in place. Available only if the container's modifiable traversal hands out modifiable references.

Template Parameters
OperationCallable with signature void(T &).
Parameters
operationFunctor applied to each element; may modify it.
Exceptions
Anythingthat operation or the underlying traverse may throw.

Definition at line 1633 of file ah-dry.H.

References FunctionalMethods< Container, T >::me().

Referenced by WorkersSet< WorkerFct >::~WorkersSet(), and Aleph::to_Pascalcase().

◆ nappend()

template<class Container , typename T >
template<typename... Args>
requires ((std::convertible_to<Args &&, T> and ...) and (Aleph::AppendableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<Args...>>::type, Item_Arg<Args>> and ...))
size_t FunctionalMethods< Container, T >::nappend ( Args &&...  args)
inline

Append n variadic items.

Each item goes, in argument order, through the append() of the container.

Parameters
[in]argsitems to be appended; an rvalue is moved, and an argument of another type is converted to T.
Returns
the number of items the container added: a set or a hash table leaves out a key it already holds, for which its append() returns a null pointer. DynSkipList::append() returns the key it already holds instead, so its nappend() counts every argument; its ninsert() counts the keys it adds.
Exceptions
bad_allocif there is no enough memory; the items appended before stay appended.

Definition at line 1379 of file ah-dry.H.

References FunctionalMethods< Container, T >::as_item(), and FunctionalMethods< Container, T >::me().

Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().

◆ ninsert()

template<class Container , typename T >
template<typename... Args>
requires ((std::convertible_to<Args &&, T> and ...) and (Aleph::InsertableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<Args...>>::type, Item_Arg<Args>> and ...))
size_t FunctionalMethods< Container, T >::ninsert ( Args &&...  args)
inline

Insert n variadic items.

Each item goes, in argument order, through the insert() of the container: a container that inserts at its front, as DynList, ends with the last argument first.

Parameters
[in]argsitems to be inserted; an rvalue is moved, and an argument of another type is converted to T.
Returns
the number of items the container added: a set leaves out a key it already holds, for which its insert() returns a null pointer.
Exceptions
bad_allocif there is no enough memory; the items inserted before stay inserted.

Definition at line 1353 of file ah-dry.H.

References FunctionalMethods< Container, T >::as_item(), and FunctionalMethods< Container, T >::me().

Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().

◆ none() [1/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
bool FunctionalMethods< Container, T >::none ( Operation &&  op) const
inline

Overload of none() that accepts rvalues.

Parameters
[in]oppredicate to test.
Returns
true if no element satisfies op.
Exceptions
anythingthat op throws.

Definition at line 1758 of file ah-dry.H.

◆ none() [2/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
bool FunctionalMethods< Container, T >::none ( Operation &  op) const
inline

Test that no element satisfies a criterion.

Equivalent to not exists(op); it stops at the first element that satisfies op.

Template Parameters
OperationCallable with signature bool(const T &).
Parameters
[in]oppredicate to test.
Returns
true if no element satisfies op, including when the container is empty.
Exceptions
anythingthat op throws.

Definition at line 1746 of file ah-dry.H.

References FunctionalMethods< Container, T >::exists().

◆ partition() [1/3]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > FunctionalMethods< Container, T >::partition ( Operation &&  op) const
inline

Overload of partition() that accepts rvalues.

The operation is passed (invoked) as a named lvalue to the lvalue-reference overload rather than being perfectly forwarded.

Template Parameters
OperationFilter callable.
Parameters
[in]opfilter predicate.
Returns
pair of lists (matched, not matched).
Exceptions
Maythrow the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided.

Definition at line 2542 of file ah-dry.H.

◆ partition() [2/3]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > FunctionalMethods< Container, T >::partition ( Operation &  op) const
inline

Exclusive partition of container according to a filter criterion.

partition(op) traverses the container and filters its elements according to the filter criterion defined by op. The filtered elements are copied to a first list and the not filtered ones to a second list. When all the container is traversed, a pair containing these lists is returned.

The op requirements are the same as for filter().

Parameters
[in]opoperation instrumenting the filter criterion
Returns
a std::pair<DynList<T>, DynList<T>>.firstcontains the filtered elements andsecondthe non-filtered ones. \throw anything that could throw op orbad_alloc` if there is no enough memory
See also
filter()

Definition at line 2515 of file ah-dry.H.

References FunctionalMethods< Container, T >::const_traverse().

Referenced by TEST(), TEST(), TEST(), TEST_F(), and TEST_F().

◆ partition() [3/3]

template<class Container , typename T >
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > FunctionalMethods< Container, T >::partition ( size_t  n) const
inline

Exclusive partition of container in the nth item.

partition(n) traverses the container and produces a pair of lists. The first one contains the first n elements and the second one the this->size() - n remaining elements.

Parameters
[in]nthe first n items of the first list
Returns
pair of lists (first n items, the rest).
Exceptions
`bad_alloc`if there is no enough memory

Definition at line 2557 of file ah-dry.H.

References FunctionalMethods< Container, T >::const_traverse().

◆ pfilter() [1/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< std::tuple< T, size_t > > FunctionalMethods< Container, T >::pfilter ( Operation &&  operation) const
inline

Overload of pfilter() that accepts rvalues.

The operation is passed (invoked) as a named lvalue to the lvalue-reference overload rather than being perfectly forwarded.

Template Parameters
OperationFilter callable.
Parameters
[in]operationfilter predicate.
Returns
DynList<std::tuple<T, size_t>> with matching elements and positions.
Exceptions
Maythrow the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided.

Definition at line 2491 of file ah-dry.H.

◆ pfilter() [2/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< std::tuple< T, size_t > > FunctionalMethods< Container, T >::pfilter ( Operation &  operation) const
inline

Filter the elements of a container according to a matching criterion and determine its positions respect to the traversal of container.

pfilter(operation) is very similar to filter(), but instead of building a list of filtered elements, it builds a list of pairs with form (item, pos), where item is a copy of filtered element and pos is its position respect to the traversal order. The position is relative to the container type.

The pair is defined with a tuple:

std::tuple<T, size_t>

Parameters
[in]operationthat defines the filter criterion
Returns
a DynList
Exceptions
anythingthat operation throws, or bad_alloc if there is no enough memory
See also
filter(Operation & operation)

Definition at line 2463 of file ah-dry.H.

References Aleph::DynList< T >::append(), FunctionalMethods< Container, T >::const_traverse(), and TT.

◆ ptr_filter() [1/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< const T * > FunctionalMethods< Container, T >::ptr_filter ( Operation &&  operation) const
inline

Overload of ptr_filter() that accepts rvalues.

The operation is passed (invoked) as a named lvalue to the lvalue-reference overload rather than being perfectly forwarded.

Template Parameters
OperationFilter callable.
Parameters
[in]operationfilter predicate.
Returns
DynList<const T*> with pointers to matching elements.
Exceptions
Maythrow the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided.

Definition at line 2436 of file ah-dry.H.

◆ ptr_filter() [2/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< const T * > FunctionalMethods< Container, T >::ptr_filter ( Operation &  operation) const
inline

Filter the elements of a container according to a matching criterion and return a pointer to the matched items in the container.

This method builds a dynamic list with stores pointers to the items of matching a criterion defined by operation, which should have the following signature:

bool operation(const T & item)

If operation return true then item matches the criterion; otherwise, operation must return false.

For example, if the container has integer, then the following code snippet would return a list containing the items greater than 100:

c.ptr_filter([] (auto item) { return item > 100; });

Parameters
[in]operationdefining the filter criterion
Returns
a DynList<const T*> with the pointers to the matched elements.
Exceptions
anythingthat could throw operation or bad_alloc if there is no enough memory

Definition at line 2411 of file ah-dry.H.

References Aleph::DynList< T >::append(), and FunctionalMethods< Container, T >::const_traverse().

Referenced by TYPED_TEST_P().

◆ reduce() [1/2]

template<class Container , typename T >
template<class Op , class U = T>
requires Aleph::dry_detail::FoldOperation<Op, T, T>
and std::copy_constructible< U > std::optional< T > FunctionalMethods< Container, T >::reduce ( Op &&  op) const
inline

Overload of reduce() that accepts rvalues.

Parameters
[in]opfolding operation.
Returns
the folded value, or std::nullopt if the container is empty.
Exceptions
anythingthat op or the copy of T throws.

Definition at line 2326 of file ah-dry.H.

◆ reduce() [2/2]

template<class Container , typename T >
template<class Op , class U = T>
requires Aleph::dry_detail::FoldOperation<Op, T, T>
and std::copy_constructible< U > std::optional< T > FunctionalMethods< Container, T >::reduce ( Op &  op) const
inline

Fold the elements with no initial value.

reduce(op) folds from the left, as foldl(), taking the first item as the initial accumulator: for the items x0, x1, ..., xn-1 it computes op(... op(op(x0, x1), x2) ..., xn-1).

Template Parameters
OpFolding callable, with signature T(T, const T &).
Parameters
[in]opfolding operation.
Returns
the folded value, or std::nullopt if the container is empty.
Exceptions
anythingthat op or the copy of T throws.

Definition at line 2305 of file ah-dry.H.

References FunctionalMethods< Container, T >::const_traverse(), and Aleph::dry_detail::fold_left_step().

◆ rev()

template<class Container , typename T >
Aleph::DynList< T > FunctionalMethods< Container, T >::rev ( ) const
inline

Return a list with the elements of container in reverse order respect to its traversal order.

Returns
a DynList<T> inversely ordered according to the traversal order.
Exceptions
bad_allocif there is no enough memory

Definition at line 2673 of file ah-dry.H.

References FunctionalMethods< Container, T >::const_traverse(), and Aleph::DynList< T >::insert().

Referenced by TEST_F(), and TEST_F().

◆ split_half()

template<class Container , typename T >
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > FunctionalMethods< Container, T >::split_half ( ) const
inline

Split the container into two halves by alternating elements.

Elements at even positions go to the first list, odd positions to the second.

Returns
pair of lists (even‑indexed, odd‑indexed)
Exceptions
`bad_alloc`if there is no enough memory

Definition at line 2579 of file ah-dry.H.

References FunctionalMethods< Container, T >::const_traverse().

◆ take() [1/2]

template<class Container , typename T >
Aleph::DynList< T > FunctionalMethods< Container, T >::take ( const size_t  n) const
inline

Return a list with the first n elements seen in the container during its traversal.

The complexity of this method is \(O(n)\) where n can be less than the number of elements of container.

Parameters
[in]nnumber of elements to take
Returns
A DynList<T> having the first n elements according to its traversal order, or all of them if n is not less than the number of elements.
Exceptions
bad_allocif there is no enough memory

Definition at line 2696 of file ah-dry.H.

References Aleph::DynList< T >::append(), and FunctionalMethods< Container, T >::const_traverse().

Referenced by main(), TEST(), TEST(), TEST(), TEST(), TEST(), and TYPED_TEST_P().

◆ take() [2/2]

template<class Container , typename T >
Aleph::DynList< T > FunctionalMethods< Container, T >::take ( size_t  i,
const size_t  j,
const size_t  step = 1 
) const
inline

Return a list with the elements at positions i, i + step, i + 2 step, ... that are not greater than j, respect to the traversal order.

The complexity of this method is \(O(\min(j, N))\), where N is the number of elements of the container.

Parameters
[in]iposition of the first element taken
[in]jgreatest position that may be taken
[in]stepdistance between two consecutive taken positions
Returns
A DynList<T> with the selected elements in traversal order. It is empty if step is zero, if i is greater than j, or if i is not smaller than the number of elements, as take(n) and drop(n) do with an n out of range.
Exceptions
bad_allocif there is no enough memory

Definition at line 2726 of file ah-dry.H.

References Aleph::DynList< T >::append(), and FunctionalMethods< Container, T >::const_traverse().

◆ take_while() [1/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< T > FunctionalMethods< Container, T >::take_while ( Operation &&  op) const
inline

Overload of take_while() that accepts rvalues.

Parameters
[in]oppredicate.
Returns
DynList with the leading elements that satisfy op.
Exceptions
anythingthat op throws, or bad_alloc.

Definition at line 2802 of file ah-dry.H.

◆ take_while() [2/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
Aleph::DynList< T > FunctionalMethods< Container, T >::take_while ( Operation &  op) const
inline

The longest prefix of elements that satisfy a criterion.

It stops at the first element that does not satisfy op.

Template Parameters
OperationCallable with signature bool(const T &).
Parameters
[in]oppredicate.
Returns
DynList with the leading elements that satisfy op, in traversal order.
Exceptions
anythingthat op throws, or bad_alloc.

Definition at line 2782 of file ah-dry.H.

References Aleph::DynList< T >::append(), and FunctionalMethods< Container, T >::const_traverse().

◆ to_dynlist()

template<class Container , typename T >
Aleph::DynList< T > FunctionalMethods< Container, T >::to_dynlist ( ) const
inline

Convert container to DynList.

Returns
DynList<T> containing all elements in traversal order.
Exceptions
bad_allocif there is no enough memory

Definition at line 2072 of file ah-dry.H.

References Aleph::DynList< T >::append(), and FunctionalMethods< Container, T >::const_traverse().

Referenced by TYPED_TEST_P().

◆ to_vector()

template<class Container , typename T >
std::vector< T > FunctionalMethods< Container, T >::to_vector ( ) const
inline

Convert container to std::vector.

Returns
std::vector<T> containing all elements in traversal order.
Exceptions
bad_allocif there is no enough memory

Definition at line 2088 of file ah-dry.H.

References FunctionalMethods< Container, T >::const_me(), and FunctionalMethods< Container, T >::const_traverse().

◆ tpartition() [1/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
std::tuple< Aleph::DynList< T >, Aleph::DynList< T > > FunctionalMethods< Container, T >::tpartition ( Operation &&  op) const
inline

Overload of tpartition() that accepts rvalues.

The operation is passed (invoked) as a named lvalue to the lvalue-reference overload rather than being perfectly forwarded.

Template Parameters
OperationFilter callable.
Parameters
[in]opfilter predicate.
Returns
tuple of lists (matched, not matched).
Exceptions
Maythrow the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided.

Definition at line 2637 of file ah-dry.H.

◆ tpartition() [2/2]

template<class Container , typename T >
template<class Operation >
requires Aleph::InvocablePredicateWith<Operation &, const T &>
std::tuple< Aleph::DynList< T >, Aleph::DynList< T > > FunctionalMethods< Container, T >::tpartition ( Operation &  op) const
inline

Exclusive partition of container according to a filter criterion.

This method has exactly the same semantic as partition(Operation & op), excepts than instead of returning a std::pair it returns a std::tuple.

Parameters
[in]opoperation instrumenting the filter criterion
Returns
a std::tuple<DynList<T>, DynList<T>>.firstcontains the filtered elements andsecondthe non-filtered ones. \throw anything that could throw op orbad_alloc` if there is no enough memory
See also
partition(Operation & op)

Definition at line 2610 of file ah-dry.H.

References Aleph::DynList< T >::append(), and FunctionalMethods< Container, T >::const_traverse().

Referenced by TEST().

Member Data Documentation

◆ and [1/2]

template<class Container , typename T >
template<typename... Args>
requires (typename Aleph::concepts_detail::defer<Container, std::tuple<Args...>>::type & c, T && x)
FunctionalMethods< Container, T >::and { c.append(std::move(x))

Insert a new element into the container by constructing it from the given args.

Overload of map() that accepts rvalues.

Synonym of maps().

Overload of maps() that accepts rvalues.

Map the elements of the container.

emplace_ins(args) builds a T from args with direct initialization, as T item(args...), and moves it into the container with insert().

Note
The semantic of insert() depends on the container. In general, this has some sense for lists and arrays, and it means insertion at the beginning of the sequence. On another type of container append() is equivalent to insert().
Parameters
[in]argsvariadic arguments list
Exceptions
bad_allocif there is no enough memory, and anything that the constructor of T throws.

maps(op) produces a dynamic list resulting of mapping of each element of container item to the result of operation op(item).

The item type of the result is that of op(item), without references and const: mapping int items with x / 2.0 gives a DynList<double>, and with std::to_string a DynList<std::string>. To force a type, give it as the first template argument:

c.template maps<long>([] (int item) { return item * 4; });

operation should have the following signature:

R operation(const T & item)

Parameters
[in]opoperation to be performed in order to do the transformation on an item; it may also be a pointer to member, as &Point::get_x.
Returns
a DynList object containing the mapped items. The order of resulting list is the same than the order of visit of the iterator for the container.
Exceptions
anythingthat could throw op or bad_alloc if there is no enough memory

The operation is passed (invoked) as a named lvalue to the lvalue-reference overload rather than being perfectly forwarded.

Template Parameters
Ritem type of the result, or void (the default) to take the type that op returns.
OperationTransformation callable.
Parameters
[in]optransformation operation.
Returns
DynList with mapped elements.
Exceptions
Maythrow the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided.

This method is a synonym for maps() with the classic functional name "map". It exists because early C++ compilers had difficulty distinguishing between the functional map operation and the standard library's map container. Modern compilers no longer have this issue.

Parameters
[in]optransformation operation.
Returns
DynList with mapped elements.
Exceptions
anythingthat op throws, or bad_alloc.
See also
maps()
Template Parameters
Ritem type of the result, or void (the default) to take the type that op returns.
OperationTransformation callable.
Parameters
[in]optransformation operation.
Returns
DynList with mapped elements.
Exceptions
anythingthat op throws, or bad_alloc.
See also
maps()

Definition at line 1272 of file ah-dry.H.

Referenced by Aleph::DynSkipList< Key, Compare >::DynSkipList(), Aleph::DynSkipList< Key, Compare >::DynSkipList(), Aleph::ArrayHeap< T, Compare >::~ArrayHeap(), Aleph::OLhashTable< Key, Cmp >::cleanup_deleted_chain(), Aleph::OLhashTable< Key, Cmp >::deallocate_bucket(), Aleph::DynSkipList< Key, Compare >::del(), FunctionalMethods< Container, T >::drop_while(), Aleph::DynList< T >::get(), Aleph::DynArrayHeap< T, Compare >::Iterator::has_curr(), Aleph::DynSkipList< Key, Compare >::insert(), Aleph::DynSkipList< Key, Compare >::insert(), Aleph::DynArrayHeap< T, Compare >::Iterator::is_last(), Aleph::DynSkipList< Key, Compare >::Iterator::is_last(), Aleph::DynSkipList< Key, Compare >::keys_equal(), Aleph::DynSkipList< Key, Compare >::random_level(), Aleph::DynSkipList< Key, Compare >::remove(), Aleph::OLhashTable< Key, Cmp >::remove(), Aleph::ArrayHeap< T, Compare >::remove(), Aleph::ODhashTable< Key, Cmp >::remove_without_shrinking(), Aleph::DynSkipList< Key, Compare >::search(), Aleph::ODhashTable< Key, Cmp >::search(), Aleph::OLhashTable< Key, Cmp >::search(), Aleph::DynList< T >::split_list_ne(), Aleph::ODhashTable< Key, Cmp >::stats(), Aleph::OLhashTable< Key, Cmp >::stats(), Aleph::OLhashTable< Key, Cmp >::undo_allocate_bucket(), Aleph::ArrayHeap< T, Compare >::update(), Aleph::ODhashTable< Key, Cmp >::Bucket::valid(), and Aleph::DynSetTree< Key, Tree, Compare >::verify().

◆ and [2/2]

template<class Container , typename T >
template<typename R = void, class Prop , class Operation >
requires (Aleph::DynList<Aleph::dry_detail::map_result_t<R, Operation &, T>> & l, Operation & op, const T & item)
and Aleph::InvocableWith< Operation &, const T & > FunctionalMethods< R, Prop, Operation >::and { l.append(std::invoke(op, item))

Conditional mapping of the elements of the container.

Overload of map_if() that accepts rvalues.

Synonym of maps_if().

Overload of maps_if() that accepts rvalues.

maps_if(prop, op) traverses each item of container, on each item it tests the proposition prop. If this last is true, then the item is mapped through the function op(item).

The item type of the result is deduced as in maps().

Parameters
[in]opoperation to be performed in order to do the transformation on an item.
[in]propa lambda returning a bool which perform the logical test.
Returns
a DynList object containing the mapped items. The order of resulting list is the same as the order of visit of the iterator for the container.
Exceptions
anythingthat could throw op or bad_alloc if there is no enough memory

The operation is passed (invoked) as a named lvalue to the lvalue-reference overload rather than being perfectly forwarded.

Template Parameters
Ritem type of the result, or void (the default) to take the type that op returns.
PropPredicate callable.
OperationTransformation callable.
Parameters
[in]proppredicate.
[in]optransformation operation.
Returns
DynList with conditionally mapped elements.
Exceptions
Maythrow the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided.

This method is a synonym for maps_if() with the classic functional name "map_if". It exists for consistency with map() as a synonym of maps().

Parameters
[in]proppredicate.
[in]optransformation operation.
Returns
DynList with conditionally mapped elements.
Exceptions
anythingthat prop or op throws, or bad_alloc.
See also
maps_if()
Template Parameters
Ritem type of the result, or void (the default) to take the type that op returns.
PropPredicate callable.
OperationTransformation callable.
Parameters
[in]proppredicate.
[in]optransformation operation.
Returns
DynList with conditionally mapped elements.
Exceptions
anythingthat prop or op throws, or bad_alloc.
See also
maps_if()

Definition at line 1885 of file ah-dry.H.


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