Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
NumTraits.hpp File Reference

Scalar-type concepts and per-scalar numeric traits (limits, precision, related types). More...

Classes

struct  mundy::GenericNumTraits< T >
 Numeric traits for an arithmetic scalar type; the reusable base NumTraits forwards to. More...
struct  mundy::NumTraits< T >
 Numeric traits for a scalar-like type T. More...
struct  mundy::NumTraits< float >
 float traits; nonzero fuzzy-comparison precision. More...
struct  mundy::NumTraits< double >
 double traits; nonzero fuzzy-comparison precision. More...
struct  mundy::NumTraits< long double >
 long double traits; nonzero fuzzy-comparison precision. More...

Namespaces

namespace  mundy

Concepts

concept  mundy::ValidScalarType
 Concept satisfied by any type that is a mathematical scalar. It is a single value closed under +, -, *, /, unary - and constructible from a numeric literal.

Detailed Description

A pure traits header: it describes a scalar type and performs no arithmetic. A custom scalar (e.g. an autodiff dual) becomes usable across MundyMath by satisfying ValidScalarType and specializing NumTraits<T> with the member set shown in GenericNumTraits.