Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Eigen::NumTraits< T > Class Template Reference

Holds information about the various numeric (i.e. scalar) types allowed by Eigen. More...

#include <src/eigen/Eigen/src/Core/NumTraits.h>

+ Inheritance diagram for Eigen::NumTraits< T >:
+ Collaboration diagram for Eigen::NumTraits< T >:

Public Types

enum  {
  IsInteger = std::numeric_limits<T>::is_integer , IsSigned = std::numeric_limits<T>::is_signed , IsComplex = 0 , RequireInitialization = internal::is_arithmetic<T>::value ? 0 : 1 ,
  ReadCost = 1 , AddCost = 1 , MulCost = 1
}
 
typedef T Real
 

Detailed Description

template<typename T>
class Eigen::NumTraits< T >

Holds information about the various numeric (i.e. scalar) types allowed by Eigen.

Template Parameters
Tthe numeric type at hand

This class stores enums, typedefs and static methods giving information about a numeric type.

The provided data consists of:

  • A typedef Real, giving the "real part" type of T. If T is already real, then Real is just a typedef to T. If T is std::complex<U> then Real is a typedef to U.
  • A typedef NonInteger, giving the type that should be used for operations producing non-integral values, such as quotients, square roots, etc. If T is a floating-point type, then this typedef just gives T again. Note however that many Eigen functions such as internal::sqrt simply refuse to take integers. Outside of a few cases, Eigen doesn't do automatic type promotion. Thus, this typedef is only intended as a helper for code that needs to explicitly promote types.
  • A typedef Literal giving the type to use for numeric literals such as "2" or "0.5". For instance, for std::complex<U>, Literal is defined as U. Of course, this type must be fully compatible with T. In doubt, just use T here.
  • A typedef Nested giving the type to use to nest a value inside of the expression tree. If you don't know what this means, just use T here.
  • An enum value IsComplex. It is equal to 1 if T is a std::complex type, and to 0 otherwise.
  • An enum value IsInteger. It is equal to 1 if T is an integer type such as int, and to 0 otherwise.
  • Enum values ReadCost, AddCost and MulCost representing a rough estimate of the number of CPU cycles needed to by move / add / mul instructions respectively, assuming the data is already stored in CPU registers. Stay vague here. No need to do architecture-specific stuff.
  • An enum value IsSigned. It is equal to 1 if T is a signed type and to 0 if T is unsigned.
  • An enum value RequireInitialization. It is equal to 1 if the constructor of the numeric type T must be called, and to 0 if it is safe not to call it. Default is 0 if T is an arithmetic type, and 1 otherwise.
  • An epsilon() function which, unlike std::numeric_limits::epsilon(), it returns a Real instead of a T.
  • A dummy_precision() function returning a weak epsilon value. It is mainly used as a default value by the fuzzy comparison operators.
  • highest() and lowest() functions returning the highest and lowest possible values respectively.
  • digits10() function returning the number of decimal digits that can be represented without change. This is the analogue of std::numeric_limits<T>::digits10 which is used as the default implementation if specialized.

Member Typedef Documentation

◆ Real

template<typename T >
typedef T Eigen::GenericNumTraits< T >::Real
inherited

Member Enumeration Documentation

◆ anonymous enum

template<typename T >
anonymous enum
inherited
Enumerator
IsInteger 
IsSigned 
IsComplex 
RequireInitialization 
ReadCost 
AddCost 
MulCost 
90 {
91 IsInteger = std::numeric_limits<T>::is_integer,
92 IsSigned = std::numeric_limits<T>::is_signed,
93 IsComplex = 0,
95 ReadCost = 1,
96 AddCost = 1,
97 MulCost = 1
98 };
@ RequireInitialization
Definition NumTraits.h:94
@ IsSigned
Definition NumTraits.h:92
@ ReadCost
Definition NumTraits.h:95
@ AddCost
Definition NumTraits.h:96
@ IsInteger
Definition NumTraits.h:91
@ IsComplex
Definition NumTraits.h:93
@ MulCost
Definition NumTraits.h:97
@ value
Definition Meta.h:85

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