35#ifndef _BLAZE_MATH_EXPRESSIONS_SVECSVECEQUALEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_SVECSVECEQUALEXPR_H_
77inline bool equal(
const SparseVector<VT1,TF1>& lhs,
const SparseVector<VT2,TF2>& rhs )
79 using CT1 = CompositeType_t<VT1>;
80 using CT2 = CompositeType_t<VT2>;
83 if( (*lhs).size() != (*rhs).size() )
return false;
91 const auto lend( a.end() );
92 const auto rend( b.end() );
94 auto lelem( a.begin() );
95 auto relem( b.begin() );
97 while( lelem != lend && relem != rend )
99 if( isDefault<RF>( lelem->value() ) ) { ++lelem;
continue; }
100 if( isDefault<RF>( relem->value() ) ) { ++relem;
continue; }
102 if( lelem->index() != relem->index() || !equal<RF>( lelem->value(), relem->value() ) ) {
111 while( lelem != lend ) {
112 if( !isDefault<RF>( lelem->value() ) )
117 while( relem != rend ) {
118 if( !isDefault<RF>( relem->value() ) )
137template<
typename VT1
143 return equal<relaxed>( lhs, rhs );
156template<
typename VT1
162 return !equal<relaxed>( lhs, rhs );
Header file for auxiliary alias declarations.
Header file for the isDefault shim.
Deactivation of problematic macros.
Header file for the relaxation flag enumeration.
Base class for sparse vectors.
Definition: SparseVector.h:72
Header file for the SparseVector base class.
RelaxationFlag
Relaxation flag for strict or relaxed semantics.
Definition: RelaxationFlag.h:66
bool operator!=(const SparseVector< VT1, TF1 > &lhs, const SparseVector< VT2, TF2 > &rhs)
Inequality operator for the comparison of two sparse vectors.
Definition: SVecSVecEqualExpr.h:160
bool operator==(const SparseVector< VT1, TF1 > &lhs, const SparseVector< VT2, TF2 > &rhs)
Equality operator for the comparison of two sparse vectors.
Definition: SVecSVecEqualExpr.h:141
bool equal(const SharedValue< T1 > &lhs, const SharedValue< T2 > &rhs)
Equality check for a two shared values.
Definition: SharedValue.h:343
Header file for the equal shim.