35#ifndef _BLAZE_MATH_EXPRESSIONS_SMATNORMEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_SMATNORMEXPR_H_
112 if( (*sm).rows() == 0UL || (*sm).columns() == 0UL )
return RT{};
120 for(
size_t i=0UL; i<N; ++i )
122 const auto end( tmp.end(i) );
123 for(
auto element=tmp.begin(i); element!=
end; ++element ) {
125 norm = power(
abs( element->value() ) );
127 norm += power(
abs( element->value() ) );
324 return norm_backend( *sm,
Abs(), UnaryPow(
Pow(), p ), UnaryPow(
Pow(),
inv( p ) ) );
358 return Norm()( *sm );
Header file for auxiliary alias declarations.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition Aliases.h:110
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition Aliases.h:190
Header file for run time assertion macros.
Header file for the Bind2nd functor.
Header file for the evaluate shim.
Header file for the function trace functionality.
Header file for the invert shim.
Header file for the isDefault shim.
Header file for the IsResizable type trait.
Header file for the IsRowMajorMatrix type trait.
Header file for the L1Norm functor.
Header file for the L2Norm functor.
Header file for the L3Norm functor.
Header file for the L4Norm functor.
Header file for the LpNorm functor.
Header file for the multiplication trait.
Header file for the Noop functor.
Header file for the RemoveCVRef type trait.
Header file for the SqrAbs functor.
Header file for the type list functionality.
Header file for the UnderlyingBuiltin type trait.
Base class for sparse matrices.
Definition SparseMatrix.h:77
Header file for the SparseMatrix base class.
Header file for the Abs functor.
Header file for the Cbrt functor.
Header file for the Pow2 functor.
Header file for the Pow3 functor.
Header file for the Pow functor.
Header file for the Qdrt functor.
Header file for the Sqrt functor.
decltype(auto) lpNorm(const DenseMatrix< MT, SO > &dm, ST p)
Computes the Lp norm for the given dense matrix.
Definition DMatNormExpr.h:735
decltype(auto) l4Norm(const DenseMatrix< MT, SO > &dm)
Computes the L4 norm for the given dense matrix.
Definition DMatNormExpr.h:703
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) l2Norm(const DenseMatrix< MT, SO > &dm)
Computes the L2 norm for the given dense matrix.
Definition DMatNormExpr.h:651
decltype(auto) sqrNorm(const DenseMatrix< MT, SO > &dm)
Computes the squared L2 norm for the given dense matrix.
Definition DMatNormExpr.h:599
decltype(auto) linfNorm(const DenseMatrix< MT, SO > &dm)
Computes the infinity norm for the given dense matrix.
Definition DMatNormExpr.h:799
decltype(auto) maxNorm(const DenseMatrix< MT, SO > &dm)
Computes the maximum norm for the given dense matrix.
Definition DMatNormExpr.h:825
decltype(auto) abs(const DenseMatrix< MT, SO > &dm)
Applies the abs() function to each single element of the dense matrix dm.
Definition DMatMapExpr.h:1296
decltype(auto) norm(const DenseMatrix< MT, SO > &dm)
Computes the L2 norm for the given dense matrix.
Definition DMatNormExpr.h:573
decltype(auto) minNorm(const DenseMatrix< MT, SO > &dm)
Computes the minimum norm for the given dense matrix.
Definition DMatNormExpr.h:851
decltype(auto) inv(const DenseMatrix< MT, SO > &dm)
Calculation of the inverse of the given dense matrix.
Definition DMatInvExpr.h:405
bool isZero(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a zero matrix.
Definition DenseMatrix.h:1819
decltype(auto) l1Norm(const DenseMatrix< MT, SO > &dm)
Computes the L1 norm for the given dense matrix.
Definition DMatNormExpr.h:625
decltype(auto) l3Norm(const DenseMatrix< MT, SO > &dm)
Computes the L3 norm for the given dense matrix.
Definition DMatNormExpr.h:677
bool isDefault(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the given diagonal matrix is in default state.
Definition DiagonalMatrix.h:169
typename MultTrait< T1, T2 >::Type MultTrait_t
Auxiliary alias declaration for the MultTrait class template.
Definition MultTrait.h:165
constexpr bool IsRowMajorMatrix_v
Auxiliary variable template for the IsRowMajorMatrix type trait.
Definition IsRowMajorMatrix.h:129
constexpr bool IsResizable_v
Auxiliary variable template for the IsResizable type trait.
Definition IsResizable.h:136
MT::ResultType evaluate(const Matrix< MT, SO > &matrix)
Evaluates the given matrix expression.
Definition Matrix.h:1282
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_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.
Definition Assert.h:117
#define BLAZE_STATIC_ASSERT_MSG(expr, msg)
Compile time assertion macro.
Definition StaticAssert.h:123
typename RemoveCVRef< T >::Type RemoveCVRef_t
Auxiliary alias declaration for the RemoveCVRef type trait.
Definition RemoveCVRef.h:99
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition FunctionTrace.h:94
Header file for the isZero shim.
Generic wrapper for the abs() function.
Definition Abs.h:85
Generic wrapper for an operation with fixed 2nd argument.
Definition Bind2nd.h:66
Generic wrapper for the cbrt() function.
Definition Cbrt.h:83
Generic wrapper for the null function.
Definition Noop.h:62
Generic wrapper for the pow2() function.
Definition Pow2.h:80
Generic wrapper for the pow3() function.
Definition Pow3.h:80
Generic wrapper for the pow() function.
Definition Pow.h:65
Generic wrapper for the qdrt() function.
Definition Qdrt.h:84
Generic wrapper for the squared abs() function.
Definition SqrAbs.h:86
Generic wrapper for the sqrt() function.
Definition Sqrt.h:85
Indexing a type list.
Definition TypeAt.h:75
Implementation of a type list.
Definition TypeList.h:120
Header file for basic type definitions.