TBTK
|
Need a break? Support the development by playing Polarity Puzzles |
#include <Derived.h>
Public Types | |
using | IsBaseQuantity = std::false_type |
using | Unit = typename Quantity< Units, Exponents >::Unit |
using | Exponent = typename Quantity< Units, Exponents >::Exponent |
Public Types inherited from TBTK::Quantity::Quantity< Units, Exponents > | |
using | Unit = Units |
using | Exponent = Exponents |
Static Public Member Functions | |
static double | getConversionFactor (Angle::Unit angleUnit, Charge::Unit chargeUnit, Count::Unit countUnit, Energy::Unit energyUnit, Length::Unit lengthUnit, Temperature::Unit temperatureUnit, Time::Unit timeUnit) |
static int | getExponent (Angle) |
static int | getExponent (Charge) |
static int | getExponent (Count) |
static int | getExponent (Energy) |
static int | getExponent (Length) |
static int | getExponent (Temperature) |
static int | getExponent (Time) |
Static Public Member Functions inherited from TBTK::Quantity::Quantity< Units, Exponents > | |
static std::string | getUnitString (Unit unit) |
static Unit | getUnit (const std::string &unit) |
static double | getConversionFactor (Unit unit) |
Friends | |
void | initializeDerivedQuantities () |
Related Functions | |
(Note that these are not member functions.) | |
typedef Derived< MassUnit, MassExponent > | Mass |
typedef Derived< MagneticFieldUnit, MagneticFieldExponent > | MagneticField |
typedef Derived< VoltageUnit, VoltageExponent > | Voltage |
typedef Derived< VelocityUnit, VelocityExponent > | Velocity |
typedef Derived< PlanckUnit, PlanckExponent > | Planck |
typedef Derived< BoltzmannUnit, BoltzmannExponent > | Boltzmann |
typedef Derived< PermeabilityUnit, PermeabilityExponent > | Permeability |
typedef Derived< PermittivityUnit, PermittivityExponent > | Permittivity |
typedef Derived< MagnetonUnit, MagnetonExponent > | Magneton |
Additional Inherited Members | |
Public Member Functions inherited from TBTK::Quantity::Quantity< Units, Exponents > | |
Quantity () | |
Quantity (double value) | |
Public Member Functions inherited from TBTK::Real | |
Real () | |
constexpr | Real (double value) |
Real (const std::string &serialization, Serializable::Mode mode) | |
constexpr | operator double () const |
Real & | operator= (double rhs) |
Real & | operator+= (const Real &rhs) |
Real & | operator-= (const Real &rhs) |
Real & | operator*= (const Real &rhs) |
Real & | operator/= (const Real &rhs) |
std::string | serialize (Serializable::Mode mode) const |
Static Protected Attributes inherited from TBTK::Quantity::Quantity< Units, Exponents > | |
static class TBTK::Quantity::Quantity::ConversionTable | conversionTable |
The Derived Quantity is a Quantity with the compile time directive IsBaseQuantity set to std::true_false to differentiate it from Base Quantities. The Derived extends the Quantity with functions for getting the conversion factor and exponents. For more information, see Quantity and the individual typedefs below.
Since the Derived unit is defined in terms of Base units, the conversion factor from the reference unit is dependent on all of the Base units. The Derived Quantity therefore provides an additional function for retreiving the conversion factor. For example, the conversion factor between the default base unit for Mass and the units rad, C, pcs, eV, nm, K, and s can be obtained using.
The Derived units are product of exponents of the Base unit. For example, Velocity (m/s) corresponds to the exponents 1 and -1 for Length and Time. The exponents can be obtained as follows.
|
static |
Get the conversion factor for converting from the reference unit to the given units.
angleUnit | The unit of angle to convert to. |
chargeUnit | The unit of charge to convert to. |
countUnit | The unit of charge to convert to. |
energyUnit | The unit of energy to convert to. |
lengthUnit | The unit of length to convert to. |
temperatureUnit | The unit of temeprature to convert to. |
timeUnit | The unit of time to convert to. |
|
static |
Get the exponent for the given Quantity.
|
static |
Get the exponent for the given Quantity.
|
static |
Get the exponent for the given Quantity.
|
static |
Get the exponent for the given Quantity.
|
static |
Get the exponent for the given Quantity.
|
static |
Get the exponent for the given Quantity.
|
static |
Get the exponent for the given Quantity.
|
related |
The Quantity::Boltzmann is a Quantity::Quantity without any predefined units.
The default base unit signature is eV K^-1.
|
friend |
Initialize the Derived Quantitites.
|
related |
The Quantity::MagneticField is a Quantity::Quantity with the following predefined derived units.
The default base unit signature is C^-1 eV m^-2 s.
|
related |
The Quantity::Magneton is a Quantity::Quantity without any predefined units.
The default base unit signature is C m^2 s^-1.
The Quantity::Mass is a Quantity::Quantity with the following predefined derived units.
The default base unit signature is eV m^-2 s^2.
|
related |
The Quantity::Permeability is a Quantity::Quantity without any predefined units.
The default base unit signature is C^-2 eV m^-1 s^2.
|
related |
The Quantity::Permittivity is a Quantity::Quantity without any predefined units.
The default base unit signature is C^2 eV^-1 m^-1.
|
related |
The Quantity::Planck is a Quantity::Quantity without any predefined units.
The default base unit signature is eV s.
|
related |
The Quantity::Velocity is a Quantity::Quantity without any predefined units.
The default base unit signature is m s^-1.
|
related |
The Quantity::Voltage is a Quantity::Quantity with the following predefined derived units.
The default base unit signature is C^-1 eV.