35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATSMATEQUALEXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_DMATSMATEQUALEXPR_H_ 78 inline bool equal(
const DenseMatrix<MT1,SO>& lhs,
const SparseMatrix<MT2,false>& rhs )
80 using CT1 = CompositeType_t<MT1>;
81 using CT2 = CompositeType_t<MT2>;
95 for(
size_t i=0UL; i<B.rows(); ++i ) {
97 for(
auto element=B.begin(i); element!=B.end(i); ++element, ++j ) {
98 for( ; j<element->index(); ++j ) {
99 if( !isDefault<RF>( A(i,j) ) )
return false;
101 if( !equal<RF>( element->value(), A(i,j) ) )
return false;
103 for( ; j<A.columns(); ++j ) {
104 if( !isDefault<RF>( A(i,j) ) )
return false;
132 inline bool equal(
const DenseMatrix<MT1,SO>& lhs,
const SparseMatrix<MT2,true>& rhs )
134 using CT1 = CompositeType_t<MT1>;
135 using CT2 = CompositeType_t<MT2>;
149 for(
size_t j=0UL; j<B.columns(); ++j ) {
151 for(
auto element=B.begin(j); element!=B.end(j); ++element, ++i ) {
152 for( ; i<element->index(); ++i ) {
153 if( !isDefault<RF>( A(i,j) ) )
return false;
155 if( !equal<RF>( element->value(), A(i,j) ) )
return false;
157 for( ; i<A.rows(); ++i ) {
158 if( !isDefault<RF>( A(i,j) ) )
return false;
187 inline bool equal(
const SparseMatrix<MT1,SO1>& lhs,
const DenseMatrix<MT2,SO2>& rhs )
189 return equal<RF>( rhs, lhs );
203 template<
typename MT1
209 return equal<relaxed>( lhs, rhs );
222 template<
typename MT1
228 return equal<relaxed>( rhs, lhs );
241 template<
typename MT1
247 return !
equal( lhs, rhs );
260 template<
typename MT1
266 return !
equal( rhs, lhs );
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 dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:80
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
Header file for the DenseMatrix base class.
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