xtensor
 
Loading...
Searching...
No Matches
xt::norm_type< T > Struct Template Reference

Traits class for the result type of the norm_l2() function. More...

#include <xnorm.hpp>

Inheritance diagram for xt::norm_type< T >:
xt::traits_detail::norm_type_base< T >

Public Types

using base_type = traits_detail::norm_type_base<T>
 
using type
 
- Public Types inherited from xt::traits_detail::norm_type_base< T >
using T
 
using norm_of_scalar
 
using norm_of_vector
 

Additional Inherited Members

- Static Public Attributes inherited from xt::traits_detail::norm_type_base< T >
static const bool value
 
static const bool value
 

Detailed Description

template<class T>
struct xt::norm_type< T >

Traits class for the result type of the norm_l2() function.

Member 'type' defines the result of norm_l2(t), where t is of type

Template Parameters
T.It implements the following rules designed to minimize the potential for overflow:
Tis an arithmetic type: 'type' is the result type of abs(t).
Tis a container of 'long double' elements: 'type' is long double.
Tis a container of another arithmetic type: 'type' is double.
Tis a container of some other type: 'type' is the element's norm type,

Containers are recognized by having an embedded typedef 'value_type'. To change the behavior for a case not covered here, specialize the traits_detail::norm_type_base template.

Definition at line 153 of file xnorm.hpp.

Member Typedef Documentation

◆ base_type

template<class T>
using xt::norm_type< T >::base_type = traits_detail::norm_type_base<T>

Definition at line 155 of file xnorm.hpp.

◆ type

template<class T>
using xt::norm_type< T >::type
Initial value:
typename std::conditional<
base_type::norm_of_vector::value,
typename base_type::norm_of_vector::norm_type,
typename base_type::norm_of_scalar::norm_type>::type

Definition at line 157 of file xnorm.hpp.


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