35#ifndef _BLAZE_MATH_EXPRESSIONS_SVECREDUCEEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_SVECREDUCEEXPR_H_
99 if( (*sv).size() == 0UL )
return RT{};
105 const auto end( tmp.end() );
106 auto element( tmp.begin() );
108 if( element ==
end )
return RT{};
110 RT redux( element->value() );
113 for( ; element!=
end; ++element ) {
114 redux = op( redux, element->value() );
264 if( (*sv).size() < 2UL )
269 if( a.nonZeros() == 0UL )
272 const auto end( a.end() );
273 auto element( a.begin() );
274 size_t index( element->index() );
275 auto min( element->value() );
279 for( ; element!=
end; ++element ) {
280 auto cur( element->value() );
282 index = element->index();
283 min = std::move( cur );
313 if( (*sv).size() < 2UL )
318 if( a.nonZeros() == 0UL )
321 const auto end( a.end() );
322 auto element( a.begin() );
323 size_t index( element->index() );
324 auto max( element->value() );
328 for( ; element!=
end; ++element ) {
329 auto cur( element->value() );
331 index = element->index();
332 max = std::move( cur );
Header file for auxiliary alias declarations.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition Aliases.h:110
Header file for run time assertion macros.
Header file for the function trace functionality.
Base class for sparse vectors.
Definition SparseVector.h:72
Header file for the SparseVector base class.
Header file for the Add functor.
Header file for the Mult functor.
decltype(auto) prod(const DenseMatrix< MT, SO > &dm)
Reduces the given dense matrix by means of multiplication.
Definition DMatReduceExpr.h:2229
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition DMatDMatMapExpr.h:1339
decltype(auto) max(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise maximum of the dense matrices lhs and rhs.
Definition DMatDMatMapExpr.h:1375
decltype(auto) reduce(const DenseMatrix< MT, SO > &dm, OP op)
Performs a custom reduction operation on the given dense matrix.
Definition DMatReduceExpr.h:2025
decltype(auto) sum(const DenseMatrix< MT, SO > &dm)
Reduces the given dense matrix by means of addition.
Definition DMatReduceExpr.h:2156
size_t argmax(const DenseVector< VT, TF > &dv)
Returns the index of the first largest element of the dense vector.
Definition DVecReduceExpr.h:584
size_t argmin(const DenseVector< VT, TF > &dv)
Returns the index of the first smallest element of the dense vector.
Definition DVecReduceExpr.h:542
MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition Matrix.h:584
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.
Definition Assert.h:101
typename RemoveCV< T >::Type RemoveCV_t
Auxiliary alias declaration for the RemoveCV type trait.
Definition RemoveCV.h:97
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition FunctionTrace.h:94
Header file for the Max functor.
Header file for the Min functor.
Generic wrapper for the addition operator.
Definition Add.h:85
Generic wrapper for the max() function.
Definition Max.h:82
Generic wrapper for the min() function.
Definition Min.h:82
Generic wrapper for the multiplication operator.
Definition Mult.h:82
Header file for basic type definitions.