xtensor
|
Traits class for the result type of the norm_sq()
function.
More...
#include <xnorm.hpp>
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 |
Traits class for the result type of the norm_sq()
function.
Member 'type' defines the result of norm_sq(t)
, where t
is of type
T. | It implements the following rules designed to minimize the potential for overflow: |
T | is an arithmetic type: 'type' is the result type of t*t . |
T | is a container of 'long double' elements: 'type' is long double . |
T | is a container of another floating-point type: 'type' is double . |
T | is a container of integer elements: 'type' is uint64_t . |
T | is a container of some other type: 'type' is the element's squared 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.
using xt::squared_norm_type< T >::base_type = traits_detail::norm_type_base<T> |
using xt::squared_norm_type< T >::type |