ITK  5.0.0
Insight Segmentation and Registration Toolkit
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
itk::NumericTraits< VariableLengthVector< T > > Class Template Reference

#include <itkNumericTraitsVariableLengthVectorPixel.h>

Detailed Description

template<typename T>
class itk::NumericTraits< VariableLengthVector< T > >

Define numeric traits for VariableLengthVector.

Template Parameters
TComponent type of VariableLenghtVector

We provide here a generic implementation based on creating types of VariableLengthVector whose components are the types of the NumericTraits from the original VariableLengthVector components. This implementation require support for partial specializations, since it is based on the concept that: NumericTraits<VariableLengthVector< T > > is defined piecewise by VariableLengthVector< NumericTraits< T > >

Note
The Zero(), One(), min() and max() methods here take references to a pixel as input. This is due to the fact that the length of the VariableLengthVector is not known until run-time. Since the most common use of Zero and One is for comparison purposes or initialization of sums etc, this might just as easily be re-written with a pixel passed in as a reference and the length is inferred from this pixel.
See Also
NumericTraits

Definition at line 54 of file itkNumericTraitsVariableLengthVectorPixel.h.

Public Types

using AbsType = VariableLengthVector< ElementAbsType >
 
using AccumulateType = VariableLengthVector< ElementAccumulateType >
 
using ElementAbsType = typename NumericTraits< T >::AbsType
 
using ElementAccumulateType = typename NumericTraits< T >::AccumulateType
 
using ElementFloatType = typename NumericTraits< T >::FloatType
 
using ElementPrintType = typename NumericTraits< T >::PrintType
 
using ElementRealType = typename NumericTraits< T >::RealType
 
using FloatType = VariableLengthVector< ElementFloatType >
 
using MeasurementVectorType = Self
 
using PrintType = VariableLengthVector< ElementPrintType >
 
using RealType = VariableLengthVector< ElementRealType >
 
using ScalarRealType = ElementRealType
 
using Self = VariableLengthVector< T >
 
using ValueType = T
 

Static Public Member Functions

static void AssignToArray (const Self &v, MeasurementVectorType &mv)
 
template<typename TArray >
static void AssignToArray (const Self &v, TArray &mv)
 
static unsigned int GetLength (const VariableLengthVector< T > &m)
 
static bool IsNegative (const Self &a)
 
static bool IsNonnegative (const Self &a)
 
static bool IsNonpositive (const Self &a)
 
static bool IsPositive (const Self &a)
 
static const Self max (const Self &a)
 
static const Self min (const Self &a)
 
static const Self NonpositiveMin (const Self &a)
 
static const Self OneValue (const Self &a)
 
static const Self ZeroValue (const Self &a)
 
static void SetLength (VariableLengthVector< T > &m, const unsigned int s)
 

Static Public Attributes

static constexpr bool IsComplex = NumericTraits< ValueType >::IsComplex
 
static constexpr bool IsInteger = NumericTraits< ValueType >::IsInteger
 
static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned
 

Member Typedef Documentation

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::AbsType = VariableLengthVector< ElementAbsType >

Unsigned component type

Definition at line 70 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::AccumulateType = VariableLengthVector< ElementAccumulateType >

Accumulation of addition and multiplication.

Definition at line 73 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::ElementAbsType = typename NumericTraits< T >::AbsType

Definition at line 58 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::ElementAccumulateType = typename NumericTraits< T >::AccumulateType

Definition at line 59 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::ElementFloatType = typename NumericTraits< T >::FloatType

Definition at line 60 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::ElementPrintType = typename NumericTraits< T >::PrintType

Definition at line 61 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::ElementRealType = typename NumericTraits< T >::RealType

Definition at line 62 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::FloatType = VariableLengthVector< ElementFloatType >

Typedef for operations that use floating point instead of real precision

Definition at line 77 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::MeasurementVectorType = Self

Measurement vector type

Definition at line 89 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::PrintType = VariableLengthVector< ElementPrintType >

Return the type that can be printed.

Definition at line 80 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::RealType = VariableLengthVector< ElementRealType >

Type for real-valued scalar operations.

Definition at line 83 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::ScalarRealType = ElementRealType

Type for real-valued scalar operations.

Definition at line 86 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::Self = VariableLengthVector< T >

Definition at line 67 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
using itk::NumericTraits< VariableLengthVector< T > >::ValueType = T

Return the type of the native component type.

Definition at line 65 of file itkNumericTraitsVariableLengthVectorPixel.h.

Member Function Documentation

template<typename T >
static void itk::NumericTraits< VariableLengthVector< T > >::AssignToArray ( const Self v,
MeasurementVectorType mv 
)
inlinestatic

Definition at line 206 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
template<typename TArray >
static void itk::NumericTraits< VariableLengthVector< T > >::AssignToArray ( const Self v,
TArray &  mv 
)
inlinestatic

Definition at line 212 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
static unsigned int itk::NumericTraits< VariableLengthVector< T > >::GetLength ( const VariableLengthVector< T > &  m)
inlinestatic

Return the size of the vector.

Definition at line 201 of file itkNumericTraitsVariableLengthVectorPixel.h.

References itk::VariableLengthVector< TValue >::GetSize().

template<typename T >
static bool itk::NumericTraits< VariableLengthVector< T > >::IsNegative ( const Self a)
inlinestatic

Definition at line 161 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
static bool itk::NumericTraits< VariableLengthVector< T > >::IsNonnegative ( const Self a)
inlinestatic

Definition at line 174 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
static bool itk::NumericTraits< VariableLengthVector< T > >::IsNonpositive ( const Self a)
inlinestatic

Definition at line 148 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
static bool itk::NumericTraits< VariableLengthVector< T > >::IsPositive ( const Self a)
inlinestatic

Definition at line 135 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
static const Self itk::NumericTraits< VariableLengthVector< T > >::max ( const Self a)
inlinestatic

Component wise defined element

Note
minimum value for floating pointer types is defined as minimum positive normalize value.

Definition at line 96 of file itkNumericTraitsVariableLengthVectorPixel.h.

References itk::VariableLengthVector< TValue >::Fill(), and itk::VariableLengthVector< TValue >::Size().

template<typename T >
static const Self itk::NumericTraits< VariableLengthVector< T > >::min ( const Self a)
inlinestatic
template<typename T >
static const Self itk::NumericTraits< VariableLengthVector< T > >::NonpositiveMin ( const Self a)
inlinestatic
template<typename T >
static const Self itk::NumericTraits< VariableLengthVector< T > >::OneValue ( const Self a)
inlinestatic
template<typename T >
static void itk::NumericTraits< VariableLengthVector< T > >::SetLength ( VariableLengthVector< T > &  m,
const unsigned int  s 
)
inlinestatic

Resize the input vector to the specified size.

Definition at line 193 of file itkNumericTraitsVariableLengthVectorPixel.h.

References itk::VariableLengthVector< TValue >::Fill(), and itk::VariableLengthVector< TValue >::SetSize().

template<typename T >
static const Self itk::NumericTraits< VariableLengthVector< T > >::ZeroValue ( const Self a)
inlinestatic

Member Data Documentation

template<typename T >
constexpr bool itk::NumericTraits< VariableLengthVector< T > >::IsComplex = NumericTraits< ValueType >::IsComplex
static

Definition at line 189 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
constexpr bool itk::NumericTraits< VariableLengthVector< T > >::IsInteger = NumericTraits< ValueType >::IsInteger
static

Definition at line 188 of file itkNumericTraitsVariableLengthVectorPixel.h.

template<typename T >
constexpr bool itk::NumericTraits< VariableLengthVector< T > >::IsSigned = NumericTraits< ValueType >::IsSigned
static

Definition at line 187 of file itkNumericTraitsVariableLengthVectorPixel.h.


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