thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > > Class Reference

Specialization of Qty for <0,0,0> with conversions to double. More...

#include <PhysicalQty.h>

Public Types

using Type = Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >
 Our type.
 
template<long int Num, long int Den>
using Power = Type
 General power type.
 
using Squared = Type
 The squared type.
 
using Inverse = Type
 The inverse type.
 
using Sqrt = Type
 The sqrt type.
 

Public Member Functions

constexpr Qty (ZeroUnit)
 Default constructor to 0.
 
constexpr Qty (double x=0.0, double factor=1.0)
 Default constructor from a double.
 
template<typename U >
constexpr Qty (const U &q, double factor=1.0, enable_if_same_qty< void, Type, U > *=nullptr)
 Constructor from a compatible quantity.
 
constexpr double rawValue () const
 Access to the raw value.
 
constexpr operator double () const
 Cast to double.
 
Typeoperator*= (double x)
 Assignment multiplication by dimensionless number.
 
Typeoperator/= (double x)
 Assignment division by dimensionless number.
 
Typeoperator+= (const Type &x)
 Assignment addition with compatible quantity.
 
Typeoperator-= (const Type &x)
 Assignment subtraction with compatible quantity.
 
Typeoperator+= (double x)
 Assignment addition with double.
 
Typeoperator-= (double x)
 Assignment subtraction with double.
 

Static Public Member Functions

static constexpr Type baseunit ()
 Basic unit of this quantity.
 

Private Attributes

double rawValue_
 The raw value.
 

Detailed Description

Specialization of Qty for <0,0,0> with conversions to double.

Definition at line 160 of file PhysicalQty.h.

Member Typedef Documentation

◆ Inverse

using ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::Inverse = Type

The inverse type.

Definition at line 171 of file PhysicalQty.h.

◆ Power

template<long int Num, long int Den>
using ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::Power = Type

General power type.

Definition at line 167 of file PhysicalQty.h.

◆ Sqrt

using ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::Sqrt = Type

The sqrt type.

Definition at line 173 of file PhysicalQty.h.

◆ Squared

using ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::Squared = Type

The squared type.

Definition at line 169 of file PhysicalQty.h.

◆ Type

using ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::Type = Qty<std::ratio<0>,std::ratio<0>,std::ratio<0> >

Our type.

Definition at line 164 of file PhysicalQty.h.

Constructor & Destructor Documentation

◆ Qty() [1/3]

constexpr ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::Qty ( ZeroUnit  )
inlineconstexpr

Default constructor to 0.

Definition at line 182 of file PhysicalQty.h.

◆ Qty() [2/3]

constexpr ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::Qty ( double  x = 0.0,
double  factor = 1.0 
)
inlineconstexpr

Default constructor from a double.

Definition at line 185 of file PhysicalQty.h.

◆ Qty() [3/3]

template<typename U >
constexpr ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::Qty ( const U &  q,
double  factor = 1.0,
enable_if_same_qty< void, Type, U > *  = nullptr 
)
inlineconstexpr

Constructor from a compatible quantity.

Definition at line 190 of file PhysicalQty.h.

Member Function Documentation

◆ baseunit()

static constexpr Type ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::baseunit ( )
inlinestaticconstexpr

Basic unit of this quantity.

Definition at line 177 of file PhysicalQty.h.

◆ operator double()

constexpr ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::operator double ( ) const
inlineconstexpr

Cast to double.

Definition at line 198 of file PhysicalQty.h.

◆ operator*=()

Type & ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::operator*= ( double  x)
inline

Assignment multiplication by dimensionless number.

Definition at line 201 of file PhysicalQty.h.

◆ operator+=() [1/2]

Type & ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::operator+= ( const Type x)
inline

Assignment addition with compatible quantity.

Definition at line 207 of file PhysicalQty.h.

References rawValue().

◆ operator+=() [2/2]

Type & ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::operator+= ( double  x)
inline

Assignment addition with double.

Definition at line 219 of file PhysicalQty.h.

◆ operator-=() [1/2]

Type & ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::operator-= ( const Type x)
inline

Assignment subtraction with compatible quantity.

Definition at line 213 of file PhysicalQty.h.

References rawValue().

◆ operator-=() [2/2]

Type & ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::operator-= ( double  x)
inline

Assignment subtraction with double.

Definition at line 225 of file PhysicalQty.h.

◆ operator/=()

Type & ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::operator/= ( double  x)
inline

Assignment division by dimensionless number.

Definition at line 204 of file PhysicalQty.h.

◆ rawValue()

constexpr double ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::rawValue ( ) const
inlineconstexpr

Access to the raw value.

Definition at line 195 of file PhysicalQty.h.

Referenced by operator+=(), and operator-=().

Member Data Documentation

◆ rawValue_

double ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::rawValue_
private

The raw value.

Definition at line 232 of file PhysicalQty.h.


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