35 #ifndef _BLAZE_MATH_EXPRESSIONS_SMATSMATEQUALEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_SMATSMATEQUALEXPR_H_ 75 inline bool equal(
const SparseMatrix<MT1,false>& lhs,
const SparseMatrix<MT2,false>& rhs )
77 using CT1 = CompositeType_t<MT1>;
78 using CT2 = CompositeType_t<MT2>;
90 for(
size_t i=0UL; i<A.rows(); ++i )
92 const auto lend( A.end(i) );
93 const auto rend( B.end(i) );
95 auto lelem( A.begin(i) );
96 auto relem( B.begin(i) );
98 while( lelem != lend && relem != rend )
100 if( lelem->index() < relem->index() ) {
101 if( !isDefault<RF>( lelem->value() ) )
105 else if( lelem->index() > relem->index() ) {
106 if( !isDefault<RF>( relem->value() ) )
110 else if( !equal<RF>( lelem->value(), relem->value() ) ) {
119 while( lelem != lend ) {
120 if( !isDefault<RF>( lelem->value() ) )
125 while( relem != rend ) {
126 if( !isDefault<RF>( relem->value() ) )
154 inline bool equal(
const SparseMatrix<MT1,true>& lhs,
const SparseMatrix<MT2,true>& rhs )
156 using CT1 = CompositeType_t<MT1>;
157 using CT2 = CompositeType_t<MT2>;
169 for(
size_t j=0UL; j<A.columns(); ++j )
171 const auto lend( A.end(j) );
172 const auto rend( B.end(j) );
174 auto lelem( A.begin(j) );
175 auto relem( B.begin(j) );
177 while( lelem != lend && relem != rend )
179 if( lelem->index() < relem->index() ) {
180 if( !isDefault<RF>( lelem->value() ) )
184 else if( lelem->index() > relem->index() ) {
185 if( !isDefault<RF>( relem->value() ) )
189 else if( !equal<RF>( lelem->value(), relem->value() ) ) {
198 while( lelem != lend ) {
199 if( !isDefault<RF>( lelem->value() ) )
204 while( relem != rend ) {
205 if( !isDefault<RF>( relem->value() ) )
234 inline bool equal(
const SparseMatrix<MT1,SO>& lhs,
const SparseMatrix<MT2,!SO>& rhs )
236 const OppositeType_t<MT2> tmp( ~rhs );
237 return equal<RF>( ~lhs, tmp );
251 template<
typename MT1
257 return equal<relaxed>( lhs, rhs );
270 template<
typename MT1
276 return !equal<relaxed>( lhs, rhs );
Header file for auxiliary alias declarations.
Header file for basic type definitions.
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:137
Header file for the SparseMatrix 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
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 rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
bool equal(const SharedValue< T1 > &lhs, const SharedValue< T2 > &rhs)
Equality check for a two shared values.
Definition: SharedValue.h:342