LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
util::quantities::frequency_literals Namespace Reference

Literal constants for frequency quantities. More...

Functions

constexpr hertz operator""_Hz (long double v)
 Literal hertz value. More...
 
constexpr hertz operator""_Hz (unsigned long long int v)
 Literal hertz value. More...
 
constexpr kilohertz operator""_kHz (long double v)
 Literal kilohertz value. More...
 
constexpr kilohertz operator""_kHz (unsigned long long int v)
 Literal kilohertz value. More...
 
constexpr megahertz operator""_MHz (long double v)
 Literal megahertz value. More...
 
constexpr megahertz operator""_MHz (unsigned long long int v)
 Literal megahertz value. More...
 
constexpr gigahertz operator""_GHz (long double v)
 Literal gigahertz value. More...
 
constexpr gigahertz operator""_GHz (unsigned long long int v)
 Literal gigahertz value. More...
 

Detailed Description

Literal constants for frequency quantities.

These functions allow a simplified syntax for specifying a frequency quantity. In order to use these, their namespace must be used:

// definition of `util::quantities::hertz` constant:
constexpr auto f_Hz = 12_Hz;
// assignment (likely to a quantity) of `util::quantities::megahertz{50.0}`
f_Hz = 50_MHz;

Function Documentation

constexpr gigahertz util::quantities::frequency_literals::operator""_GHz ( long double  v)

Literal gigahertz value.

Definition at line 166 of file frequency.h.

167  {
168  return gigahertz{static_cast<double>(v)};
169  }
gigahertz_as<> gigahertz
Type of frequency stored in gigahertz, in double precision.
Definition: frequency.h:108
constexpr gigahertz util::quantities::frequency_literals::operator""_GHz ( unsigned long long int  v)

Literal gigahertz value.

Definition at line 170 of file frequency.h.

References f, and operator*().

171  {
172  return gigahertz{static_cast<double>(v)};
173  }
gigahertz_as<> gigahertz
Type of frequency stored in gigahertz, in double precision.
Definition: frequency.h:108
constexpr hertz util::quantities::frequency_literals::operator""_Hz ( long double  v)

Literal hertz value.

Definition at line 130 of file frequency.h.

131  {
132  return hertz{static_cast<double>(v)};
133  }
hertz_as<> hertz
Type of frequency stored in hertz, in double precision.
Definition: frequency.h:78
constexpr hertz util::quantities::frequency_literals::operator""_Hz ( unsigned long long int  v)

Literal hertz value.

Definition at line 134 of file frequency.h.

135  {
136  return hertz{static_cast<double>(v)};
137  }
hertz_as<> hertz
Type of frequency stored in hertz, in double precision.
Definition: frequency.h:78
constexpr kilohertz util::quantities::frequency_literals::operator""_kHz ( long double  v)

Literal kilohertz value.

Definition at line 142 of file frequency.h.

143  {
144  return kilohertz{static_cast<double>(v)};
145  }
kilohertz_as<> kilohertz
Type of frequency stored in kilohertz, in double precision.
Definition: frequency.h:88
constexpr kilohertz util::quantities::frequency_literals::operator""_kHz ( unsigned long long int  v)

Literal kilohertz value.

Definition at line 146 of file frequency.h.

147  {
148  return kilohertz{static_cast<double>(v)};
149  }
kilohertz_as<> kilohertz
Type of frequency stored in kilohertz, in double precision.
Definition: frequency.h:88
constexpr megahertz util::quantities::frequency_literals::operator""_MHz ( long double  v)

Literal megahertz value.

Definition at line 154 of file frequency.h.

155  {
156  return megahertz{static_cast<double>(v)};
157  }
megahertz_as<> megahertz
Type of frequency stored in megahertz, in double precision.
Definition: frequency.h:98
constexpr megahertz util::quantities::frequency_literals::operator""_MHz ( unsigned long long int  v)

Literal megahertz value.

Definition at line 158 of file frequency.h.

159  {
160  return megahertz{static_cast<double>(v)};
161  }
megahertz_as<> megahertz
Type of frequency stored in megahertz, in double precision.
Definition: frequency.h:98