NumCpp  2.12.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
nc::DtypeInfo< dtype > Class Template Reference

Holds info about the dtype. More...

#include <DtypeInfo.hpp>

Static Public Member Functions

static constexpr int bits () noexcept
 
static constexpr dtype epsilon () noexcept
 
static constexpr bool isInteger () noexcept
 
static constexpr bool isSigned () noexcept
 
static constexpr dtype max () noexcept
 
static constexpr dtype min () noexcept
 

Detailed Description

template<typename dtype>
class nc::DtypeInfo< dtype >

Holds info about the dtype.

Member Function Documentation

◆ bits()

template<typename dtype >
static constexpr int nc::DtypeInfo< dtype >::bits ( )
inlinestaticconstexprnoexcept

For integer types: number of non-sign bits in the representation. For floating types : number of digits(in radix base) in the mantissa

Returns
number of bits

◆ epsilon()

template<typename dtype >
static constexpr dtype nc::DtypeInfo< dtype >::epsilon ( )
inlinestaticconstexprnoexcept

Machine epsilon (the difference between 1 and the least value greater than 1 that is representable).

Returns
dtype

◆ isInteger()

template<typename dtype >
static constexpr bool nc::DtypeInfo< dtype >::isInteger ( )
inlinestaticconstexprnoexcept

True if type is integer.

Returns
bool

◆ isSigned()

template<typename dtype >
static constexpr bool nc::DtypeInfo< dtype >::isSigned ( )
inlinestaticconstexprnoexcept

True if type is signed.

Returns
bool

◆ max()

template<typename dtype >
static constexpr dtype nc::DtypeInfo< dtype >::max ( )
inlinestaticconstexprnoexcept

Returns the maximum value of the dtype

Returns
max value

◆ min()

template<typename dtype >
static constexpr dtype nc::DtypeInfo< dtype >::min ( )
inlinestaticconstexprnoexcept

Returns the minimum value of the dtype

Returns
min value

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