35 #ifndef _BLAZE_MATH_INITIALIZERLIST_H_ 36 #define _BLAZE_MATH_INITIALIZERLIST_H_ 64 template<
typename Type >
67 size_t nonzeros( 0UL );
69 for(
const Type& element : list ) {
70 if( !isDefault<strict>( element ) )
86 template<
typename Type >
89 size_t nonzeros( 0UL );
91 for(
const auto& rowList : list ) {
107 template<
typename Type >
112 for(
const auto& rowList : list )
113 cols =
max( cols, rowList.size() );
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:584
Header file for the initializer_list template.
Headerfile for the generic max algorithm.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
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:1198
Header file for the relaxation flag types.
Header file for the isDefault shim.
constexpr size_t determineColumns(initializer_list< initializer_list< Type > > list) noexcept
Determines the maximum number of columns specified by the given initializer list.
Definition: InitializerList.h:108