35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECSVECEQUALEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_DVECSVECEQUALEXPR_H_ 79 inline bool equal(
const DenseVector<VT1,TF1>& lhs,
const SparseVector<VT2,TF2>& rhs )
81 using CT1 = CompositeType_t<VT1>;
82 using CT2 = CompositeType_t<VT2>;
85 if( (~lhs).
size() != (~rhs).
size() )
return false;
95 for(
auto element=b.begin(); element!=b.end(); ++element, ++i ) {
96 for( ; i<element->index(); ++i ) {
97 if( !isDefault<RF>( a[i] ) )
return false;
99 if( !equal<RF>( element->value(), a[i] ) )
return false;
101 for( ; i<a.size(); ++i ) {
102 if( !isDefault<RF>( a[i] ) )
return false;
130 inline bool equal(
const SparseVector<VT1,TF1>& lhs,
const DenseVector<VT2,TF2>& rhs )
132 return equal<RF>( rhs, lhs );
146 template<
typename VT1
152 return equal<relaxed>( lhs, rhs );
165 template<
typename VT1
171 return equal<relaxed>( rhs, lhs );
184 template<
typename VT1
190 return !equal<relaxed>( lhs, rhs );
203 template<
typename VT1
209 return !equal<relaxed>( rhs, lhs );
Header file for auxiliary alias declarations.
Header file for basic type definitions.
Header file for the SparseVector base class.
Header file for the DenseVector base class.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:253
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
Header file for the equal shim.
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:293
Header file for the relaxation flag types.
Header file for the isDefault shim.
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:138
bool equal(const SharedValue< T1 > &lhs, const SharedValue< T2 > &rhs)
Equality check for a two shared values.
Definition: SharedValue.h:342