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

Mixin providing equality comparison for sequence 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::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::FixedQueue< Aleph::DynList< int > >, Aleph::FixedQueue< int >, Aleph::FixedQueue< void * >, Aleph::FixedStack< Node * >, Aleph::FixedStack< Aleph::DynList< int > >, Aleph::FixedStack< int >, Aleph::DynDlist< T >, and Aleph::DynList< T >.

Public Member Functions

bool equal_to (const Container &r) const
 Equality test between this and r.
 

Private Member Functions

const Container * const_me () const noexcept
 

Friends

bool operator== (const Container &l, const Container &r)
 Equality operator.
 
bool operator!= (const Container &l, const Container &r)
 Inequality operator.
 

Detailed Description

template<class Container>
class EqualSequenceMethod< Container >

Mixin providing equality comparison for sequence containers.

This class implements the equal_to() method and operator == for containers whose elements are ordered and do not necessarily export a fast search() method.

The test is performed by comparing elements one by one in traversal order, so the order and the repetitions count: it is the equality of lists, stacks and queues.

Template Parameters
Containercontainer type to which the equality test will be applied (must provide size() and an iterator).

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

Member Function Documentation

◆ const_me()

template<class Container >
const Container * EqualSequenceMethod< Container >::const_me ( ) const
inlineprivatenoexcept

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

Referenced by EqualSequenceMethod< Container >::equal_to().

◆ equal_to()

template<class Container >
bool EqualSequenceMethod< Container >::equal_to ( const Container &  r) const
inline

Equality test between this and r.

The test is performed by comparing elements one by one in traversal order.

Parameters
[in]rContainer on which the comparison will be performed.
Returns
true if the containers have the same size and all the elements are equal in the same order.
Exceptions
Propagatesany exception from item comparison or iterator operations.

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

References Aleph::dry_detail::advance(), EqualSequenceMethod< Container >::const_me(), Aleph::dry_detail::current(), Aleph::Const_Iterator< It >::has_curr(), and r.

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

Friends And Related Symbol Documentation

◆ operator!=

template<class Container >
bool operator!= ( const Container &  l,
const Container &  r 
)
friend

Inequality operator.

Negation of equal_to(r).

Parameters
[in]lContainer to compare.
[in]rContainer to compare with.
Returns
Negation of l.equal_to(r).
Exceptions
Propagatessame exceptions as equal_to().

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

◆ operator==

template<class Container >
bool operator== ( const Container &  l,
const Container &  r 
)
friend

Equality operator.

Forwards to equal_to(r).

A hidden friend with two parameters of the same type: the C++20 reversed candidate converts its arguments in the same way, so it is never ambiguous. As a member of this base class it was, and Clang 14 rejected a == b in constraints.

Parameters
[in]lContainer to compare.
[in]rContainer to compare with.
Returns
Result of l.equal_to(r).
Exceptions
Propagatessame exceptions as equal_to().

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


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