Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Static Public Member Functions | List of all members
CDPL::Math::VectorNormInfinityIndex< V > Struct Template Reference

Functor returning the index of the vector element with the largest L∞ norm. More...

#include <Functional.hpp>

+ Inheritance diagram for CDPL::Math::VectorNormInfinityIndex< V >:

Public Types

typedef VectorScalarIndexUnaryFunctor< V >::ValueType ValueType
 
typedef VectorScalarIndexUnaryFunctor< V >::RealType RealType
 
typedef VectorScalarIndexUnaryFunctor< V >::ResultType ResultType
 
- Public Types inherited from CDPL::Math::VectorScalarIndexUnaryFunctor< V >
typedef V::ValueType ValueType
 The vector's element value type. More...
 
typedef TypeTraits< ValueType >::RealType RealType
 The real-valued type derived from ValueType via Math::TypeTraits. More...
 
typedef V::SizeType ResultType
 The result type (the vector's size type, used for element indices). More...
 

Static Public Member Functions

static ResultType apply (const VectorExpression< V > &e)
 Returns the index of the element of e with the largest L∞ norm. More...
 

Detailed Description

template<typename V>
struct CDPL::Math::VectorNormInfinityIndex< V >

Functor returning the index of the vector element with the largest L∞ norm.

Template Parameters
VThe vector expression type.

Member Typedef Documentation

◆ ValueType

◆ RealType

◆ ResultType

Member Function Documentation

◆ apply()

template<typename V >
static ResultType CDPL::Math::VectorNormInfinityIndex< V >::apply ( const VectorExpression< V > &  e)
inlinestatic

Returns the index of the element of e with the largest L∞ norm.

Parameters
eThe vector expression.
Returns
The zero-based index of the element \( \arg\max_i \|e(i)\|_\infty \) (0 if e is empty).

The documentation for this struct was generated from the following file: