|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
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) |
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.
|
private |
|
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.
| Operation | Callable with signature bool(const T &). |
| [in] | operation | condition to test. |
true if all elements satisfy the condition. | May | throw the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided. |
|
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.
| [in] | operation | to be used as condition |
true if all the elements satisfy the criterion: false otherwise. | anything | that 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().
|
inlinestaticprivate |
Definition at line 1261 of file ah-dry.H.
Referenced by FunctionalMethods< Container, T >::build_as(), FunctionalMethods< Container, T >::nappend(), and FunctionalMethods< Container, T >::ninsert().
|
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:
DynList, Array, DynArray, ...) keeps the order;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.
| [in] | items | the items, in insertion order. |
| anything | that 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. |
Definition at line 1423 of file ah-dry.H.
Referenced by TEST().
|
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.
| D | the class to build; it derives from the container and is default constructible. |
| [in] | items | the items, in insertion order. |
D. | anything | that build() throws. |
Definition at line 1448 of file ah-dry.H.
References FunctionalMethods< Container, T >::as_item().
|
inlineprivatenoexcept |
Definition at line 1241 of file ah-dry.H.
Referenced by FunctionalMethods< Container, T >::const_traverse(), and FunctionalMethods< Container, T >::to_vector().
|
inlineprivate |
Definition at line 1248 of file ah-dry.H.
References FunctionalMethods< Container, T >::const_me().
Referenced by FunctionalMethods< Container, T >::all(), FunctionalMethods< Container, T >::count_if(), FunctionalMethods< Container, T >::drop(), FunctionalMethods< Container, T >::drop_while(), FunctionalMethods< Container, T >::each(), FunctionalMethods< Container, T >::exists(), FunctionalMethods< Container, T >::filter(), FunctionalMethods< Container, T >::flat_map(), FunctionalMethods< Container, T >::foldl(), FunctionalMethods< Container, T >::foldr(), FunctionalMethods< Container, T >::for_each(), FunctionalMethods< Container, T >::length(), FunctionalMethods< Container, T >::maps(), FunctionalMethods< Container, T >::maps_if(), FunctionalMethods< Container, T >::partition(), FunctionalMethods< Container, T >::partition(), FunctionalMethods< Container, T >::pfilter(), FunctionalMethods< Container, T >::ptr_filter(), FunctionalMethods< Container, T >::reduce(), FunctionalMethods< Container, T >::rev(), FunctionalMethods< Container, T >::split_half(), FunctionalMethods< Container, T >::take(), FunctionalMethods< Container, T >::take(), FunctionalMethods< Container, T >::take_while(), FunctionalMethods< Container, T >::to_dynlist(), FunctionalMethods< Container, T >::to_vector(), and FunctionalMethods< Container, T >::tpartition().
|
inline |
Overload of count_if() that accepts rvalues.
| [in] | op | predicate to test. |
op is true. | anything | that op throws. |
|
inline |
Count the elements that satisfy a criterion.
| Operation | Callable with signature bool(const T &). |
| [in] | op | predicate to test. |
op is true. | anything | that op throws. |
Definition at line 1772 of file ah-dry.H.
References FunctionalMethods< Container, T >::const_traverse().
Referenced by TEST().
|
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.
| [in] | n | number of elements to drop |
DynList<T> having the remainder \(N - n\) elements according to traversal order; it is empty if n is not less than N. | bad_alloc | if 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().
|
inline |
Overload of drop_while() that accepts rvalues.
| [in] | op | predicate. |
op to the end. | anything | that op throws, or bad_alloc. |
|
inline |
The elements after the longest prefix that satisfies a criterion.
| Operation | Callable with signature bool(const T &). |
| [in] | op | predicate; it is not called again after it first returns false. |
op to the end, in traversal order. | anything | that 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().
|
inline |
|
inline |
|
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.
| [in] | pos | position of the first visited item (0-based) |
| [in] | slice | distance between two consecutive visited items |
| [in] | operation | to be done on each visited element, with signature void(T &). |
| anything | that can throw operation |
Definition at line 1590 of file ah-dry.H.
References FunctionalMethods< Container, T >::me().
|
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.
| [in] | pos | position of the first visited item (0-based) |
| [in] | slice | distance between two consecutive visited items |
| [in] | operation | to be done on each visited element. |
| anything | that can throw operation |
Definition at line 1545 of file ah-dry.H.
References FunctionalMethods< Container, T >::const_traverse().
|
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.
| Operation | Callable with signature void(const T &). |
| [in] | operation | to be performed on each item. |
| May | throw the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided. |
|
inline |
Alias of for_each().
| [in] | operation | to be performed on each item. |
| anything | that operation throws. |
Definition at line 1507 of file ah-dry.H.
References FunctionalMethods< Container, T >::for_each().
Referenced by TEST().
|
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.
append() is equivalent to insert().| [in] | args | variadic arguments list |
| bad_alloc | if 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().
|
inline |
See emplace(Args && ... args).
Definition at line 1303 of file ah-dry.H.
References FunctionalMethods< Container, T >::me().
|
inline |
Definition at line 1329 of file ah-dry.H.
References FunctionalMethods< Container, T >::me().
Referenced by TEST().
|
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.
| Operation | Callable with signature bool(const T &). |
| [in] | op | predicate to test. |
true if any element satisfies the predicate. | May | throw the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided. |
|
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.
| [in] | op | operation for testing existence |
true if it exists an item for which op return true; false otherwise. | anything | that 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().
|
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.
| Operation | Filter callable. |
| [in] | operation | filter predicate. |
| May | throw the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided. |
|
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; });
| [in] | operation | defining the filter criterion |
DynList<T> with the matched elements. | anything | that 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().
|
inline |
Overload of flat_map() that accepts rvalues.
| [in] | op | operation that maps an item to a container. |
| anything | that op throws, or bad_alloc. |
|
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.
| Operation | Callable with signature C(const T &), where C is an Aleph container with for_each() or a range. |
| [in] | op | operation that maps an item to a container. |
| anything | that 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().
|
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.
| Operation | Folding callable. |
| [in] | init | initial accumulator value. |
| [in] | operation | folding operation. |
| May | throw the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided. |
|
inline |
Simplified version of foldl() where the folded type is the same type of elements stored in the container.
| [in] | init | initial accumulator value. |
| [in] | operation | folding operation. |
| anything | that operation throws. |
|
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.
| Acc | accumulator type, deduced from init. |
| Op | Folding callable. |
| [in] | init | initial accumulator value. |
| [in] | op | folding operation. |
| May | throw the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided. |
|
inline |
|
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.
| Acc | accumulator type, deduced from init. |
| Op | Folding callable. |
| [in] | init | initial accumulator value. |
| [in] | op | folding operation. |
| May | throw the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided. |
|
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; });
| [in] | init | initial value of folded value (or accumulator). |
| [in] | op | operation to be performed on each item and used for folding. |
| anything | that 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().
|
inline |
|
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.
| Acc | accumulator type, deduced from init. |
| Op | Folding callable, with signature Acc(const T &, Acc). |
| [in] | init | initial accumulator value. |
| [in] | op | folding operation. |
| anything | that op throws, or bad_alloc. |
Definition at line 2263 of file ah-dry.H.
References FunctionalMethods< Container, T >::const_traverse(), and Aleph::dry_detail::fold_right_step().
|
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.
| Operation | Callable with signature void(const T &). |
| [in] | operation | to be performed on each item. |
| May | throw the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided. |
|
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().
| [in] | operation | to be done on each element. |
| anything | that 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().
|
inlinenoexcept |
Count the number of elements of a container.
This method counts the number of elements stored in the container.
size()| nothing,unless | the 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().
|
inline |
|
inline |
Definition at line 1946 of file ah-dry.H.
Referenced by TEST(), TEST(), and TYPED_TEST_P().
|
inline |
|
inline |
Definition at line 1990 of file ah-dry.H.
Referenced by TEST(), TEST(), and TYPED_TEST_P().
|
inline |
|
inline |
Definition at line 1829 of file ah-dry.H.
References Aleph::DynList< T >::append(), and FunctionalMethods< Container, T >::const_traverse().
Referenced by demo_dynarray(), Aleph::format_string(), Aleph::format_string(), main(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TYPED_TEST_P(), and TYPED_TEST_P().
|
inline |
|
inline |
Definition at line 1889 of file ah-dry.H.
References Aleph::DynList< T >::append(), and FunctionalMethods< Container, T >::const_traverse().
Referenced by TEST(), and TYPED_TEST_P().
|
inlineprivatenoexcept |
Definition at line 1236 of file ah-dry.H.
Referenced by FunctionalMethods< Container, T >::each(), FunctionalMethods< Container, T >::emplace(), FunctionalMethods< Container, T >::emplace_end(), FunctionalMethods< Container, T >::emplace_ins(), FunctionalMethods< Container, T >::mutable_drop(), FunctionalMethods< Container, T >::mutable_for_each(), FunctionalMethods< Container, T >::nappend(), and FunctionalMethods< Container, T >::ninsert().
|
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().
| [in] | n | number of elements to remove |
| what | remove() 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().
|
inline |
|
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.
| Operation | Callable with signature void(T &). |
| operation | Functor applied to each element; may modify it. |
| Anything | that 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().
|
inline |
Append n variadic items.
Each item goes, in argument order, through the append() of the container.
| [in] | args | items to be appended; an rvalue is moved, and an argument of another type is converted to T. |
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. | bad_alloc | if 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().
|
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.
| [in] | args | items to be inserted; an rvalue is moved, and an argument of another type is converted to T. |
insert() returns a null pointer. | bad_alloc | if 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().
|
inline |
|
inline |
Test that no element satisfies a criterion.
Equivalent to not exists(op); it stops at the first element that satisfies op.
| Operation | Callable with signature bool(const T &). |
| [in] | op | predicate to test. |
true if no element satisfies op, including when the container is empty. | anything | that op throws. |
Definition at line 1746 of file ah-dry.H.
References FunctionalMethods< Container, T >::exists().
|
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.
| Operation | Filter callable. |
| [in] | op | filter predicate. |
| May | throw the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided. |
|
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().
| [in] | op | operation instrumenting the filter criterion |
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 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().
|
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.
| [in] | n | the first n items of the first list |
| `bad_alloc` | if there is no enough memory |
Definition at line 2557 of file ah-dry.H.
References FunctionalMethods< Container, T >::const_traverse().
|
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.
| Operation | Filter callable. |
| [in] | operation | filter predicate. |
| May | throw the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided. |
|
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>
| [in] | operation | that defines the filter criterion |
| anything | that operation throws, or bad_alloc if there is no enough memory |
Definition at line 2463 of file ah-dry.H.
References Aleph::DynList< T >::append(), FunctionalMethods< Container, T >::const_traverse(), and TT.
|
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.
| Operation | Filter callable. |
| [in] | operation | filter predicate. |
| May | throw the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided. |
|
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; });
| [in] | operation | defining the filter criterion |
DynList<const T*> with the pointers to the matched elements. | anything | that 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().
|
inline |
|
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).
| Op | Folding callable, with signature T(T, const T &). |
| [in] | op | folding operation. |
std::nullopt if the container is empty. | anything | that 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().
|
inline |
Return a list with the elements of container in reverse order respect to its traversal order.
DynList<T> inversely ordered according to the traversal order. | bad_alloc | if 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().
|
inline |
Split the container into two halves by alternating elements.
Elements at even positions go to the first list, odd positions to the second.
| `bad_alloc` | if there is no enough memory |
Definition at line 2579 of file ah-dry.H.
References FunctionalMethods< Container, T >::const_traverse().
|
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.
| [in] | n | number of elements to take |
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. | bad_alloc | if 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().
|
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.
| [in] | i | position of the first element taken |
| [in] | j | greatest position that may be taken |
| [in] | step | distance between two consecutive taken positions |
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. | bad_alloc | if 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().
|
inline |
Overload of take_while() that accepts rvalues.
| [in] | op | predicate. |
op. | anything | that op throws, or bad_alloc. |
|
inline |
The longest prefix of elements that satisfy a criterion.
It stops at the first element that does not satisfy op.
| Operation | Callable with signature bool(const T &). |
| [in] | op | predicate. |
op, in traversal order. | anything | that 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().
|
inline |
Convert container to DynList.
| bad_alloc | if 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().
|
inline |
Convert container to std::vector.
| bad_alloc | if 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().
|
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.
| Operation | Filter callable. |
| [in] | op | filter predicate. |
| May | throw the same exceptions as the corresponding lvalue overload; no additional exception-safety guarantees are provided. |
|
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.
| [in] | op | operation instrumenting the filter criterion |
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 Definition at line 2610 of file ah-dry.H.
References Aleph::DynList< T >::append(), and FunctionalMethods< Container, T >::const_traverse().
Referenced by TEST().
| 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().
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().| [in] | args | variadic arguments list |
| bad_alloc | if 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)
| [in] | op | operation to be performed in order to do the transformation on an item; it may also be a pointer to member, as &Point::get_x. |
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. | anything | that 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.
| R | item type of the result, or void (the default) to take the type that op returns. |
| Operation | Transformation callable. |
| [in] | op | transformation operation. |
| May | throw 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.
| [in] | op | transformation operation. |
| anything | that op throws, or bad_alloc. |
| R | item type of the result, or void (the default) to take the type that op returns. |
| Operation | Transformation callable. |
| [in] | op | transformation operation. |
| anything | that op throws, or bad_alloc. |
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 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().
| [in] | op | operation to be performed in order to do the transformation on an item. |
| [in] | prop | a lambda returning a bool which perform the logical test. |
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. | anything | that 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.
| R | item type of the result, or void (the default) to take the type that op returns. |
| Prop | Predicate callable. |
| Operation | Transformation callable. |
| [in] | prop | predicate. |
| [in] | op | transformation operation. |
| May | throw 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().
| [in] | prop | predicate. |
| [in] | op | transformation operation. |
| anything | that prop or op throws, or bad_alloc. |
| R | item type of the result, or void (the default) to take the type that op returns. |
| Prop | Predicate callable. |
| Operation | Transformation callable. |
| [in] | prop | predicate. |
| [in] | op | transformation operation. |
| anything | that prop or op throws, or bad_alloc. |