|
quanta 0.1.0
Type-safe units for temperature, frequency, electrical and spatial quantities, modeled after std::chrono
|
Operators combining quantities of different kinds according to circuit theory. More...
Functions | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator* (const quantity< ampere_unit, R1, P1 > &i, const quantity< ohm_unit, R2, P2 > &r) |
| Ohm's law: current x resistance = voltage. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator* (const quantity< ohm_unit, R1, P1 > &r, const quantity< ampere_unit, R2, P2 > &i) |
| Ohm's law: resistance x current = voltage. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator/ (const quantity< volt_unit, R1, P1 > &v, const quantity< ohm_unit, R2, P2 > &r) |
| Ohm's law: voltage / resistance = current. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator/ (const quantity< volt_unit, R1, P1 > &v, const quantity< ampere_unit, R2, P2 > &i) |
| Ohm's law: voltage / current = resistance. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator* (const quantity< volt_unit, R1, P1 > &v, const quantity< ampere_unit, R2, P2 > &i) |
| Power law: voltage x current = power. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator* (const quantity< ampere_unit, R1, P1 > &i, const quantity< volt_unit, R2, P2 > &v) |
| Power law: current x voltage = power. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator/ (const quantity< watt_unit, R1, P1 > &p, const quantity< volt_unit, R2, P2 > &v) |
| Power law: power / voltage = current. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator/ (const quantity< watt_unit, R1, P1 > &p, const quantity< ampere_unit, R2, P2 > &i) |
| Power law: power / current = voltage. | |
| template<typename R1 , typename P1 , duration_like D> | |
| constexpr auto | quanta::electro::operator* (const quantity< ampere_unit, R1, P1 > &i, const D &t) |
| Charge: current x time = charge. | |
| template<duration_like D, typename R1 , typename P1 > | |
| constexpr auto | quanta::electro::operator* (const D &t, const quantity< ampere_unit, R1, P1 > &i) |
| Charge: time x current = charge. | |
| template<typename R1 , typename P1 , duration_like D> | |
| constexpr auto | quanta::electro::operator/ (const quantity< coulomb_unit, R1, P1 > &q, const D &t) |
| Charge: charge / time = current. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator/ (const quantity< coulomb_unit, R1, P1 > &q, const quantity< ampere_unit, R2, P2 > &i) |
| Charge: charge / current = time. | |
| template<typename R1 , typename P1 , duration_like D> | |
| constexpr auto | quanta::electro::operator* (const quantity< watt_unit, R1, P1 > &p, const D &t) |
| Energy: power x time = energy. | |
| template<duration_like D, typename R1 , typename P1 > | |
| constexpr auto | quanta::electro::operator* (const D &t, const quantity< watt_unit, R1, P1 > &p) |
| Energy: time x power = energy. | |
| template<typename R1 , typename P1 , duration_like D> | |
| constexpr auto | quanta::electro::operator/ (const quantity< joule_unit, R1, P1 > &e, const D &t) |
| Energy: energy / time = power. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator/ (const quantity< joule_unit, R1, P1 > &e, const quantity< watt_unit, R2, P2 > &p) |
| Energy: energy / power = time. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator/ (const quantity< joule_unit, R1, P1 > &e, const quantity< volt_unit, R2, P2 > &v) |
| Energy: energy / voltage = charge. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator/ (const quantity< joule_unit, R1, P1 > &e, const quantity< coulomb_unit, R2, P2 > &q) |
| Energy: energy / charge = voltage. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator* (const quantity< farad_unit, R1, P1 > &c, const quantity< volt_unit, R2, P2 > &v) |
| Capacitance: capacitance x voltage = charge. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator* (const quantity< volt_unit, R1, P1 > &v, const quantity< farad_unit, R2, P2 > &c) |
| Capacitance: voltage x capacitance = charge. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator/ (const quantity< coulomb_unit, R1, P1 > &q, const quantity< volt_unit, R2, P2 > &v) |
| Capacitance: charge / voltage = capacitance. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator/ (const quantity< coulomb_unit, R1, P1 > &q, const quantity< farad_unit, R2, P2 > &c) |
| Capacitance: charge / capacitance = voltage. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator* (const quantity< ohm_unit, R1, P1 > &r, const quantity< farad_unit, R2, P2 > &c) |
| RC time constant: resistance x capacitance = time. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator* (const quantity< farad_unit, R1, P1 > &c, const quantity< ohm_unit, R2, P2 > &r) |
| RC time constant: capacitance x resistance = time. | |
| template<typename R1 , typename P1 , typename R2 , typename P2 > | |
| constexpr auto | quanta::electro::operator/ (const quantity< henry_unit, R1, P1 > &l, const quantity< ohm_unit, R2, P2 > &r) |
| L/R time constant: inductance / resistance = time. | |
Operators combining quantities of different kinds according to circuit theory.
The result precision is derived from the operand precisions, so results are exact for products (e.g. milliamperes x kiloohms yields volts) while quotients truncate for integer representations (use finer precisions or floating-point representations for fractional results).
|
constexpr |
Charge: time x current = charge.
Definition at line 747 of file electro.hpp.
|
constexpr |
Energy: time x power = energy.
Definition at line 783 of file electro.hpp.
|
constexpr |
Charge: current x time = charge.
Definition at line 741 of file electro.hpp.
|
constexpr |
Ohm's law: current x resistance = voltage.
Definition at line 687 of file electro.hpp.
|
constexpr |
Power law: current x voltage = power.
Definition at line 717 of file electro.hpp.
|
constexpr |
RC time constant: capacitance x resistance = time.
Definition at line 855 of file electro.hpp.
|
constexpr |
Capacitance: capacitance x voltage = charge.
Definition at line 819 of file electro.hpp.
|
constexpr |
Ohm's law: resistance x current = voltage.
Definition at line 693 of file electro.hpp.
|
constexpr |
RC time constant: resistance x capacitance = time.
Definition at line 849 of file electro.hpp.
|
constexpr |
Power law: voltage x current = power.
Definition at line 711 of file electro.hpp.
|
constexpr |
Capacitance: voltage x capacitance = charge.
Definition at line 825 of file electro.hpp.
|
constexpr |
|
constexpr |
Charge: charge / time = current.
Definition at line 753 of file electro.hpp.
|
constexpr |
Charge: charge / current = time.
Definition at line 765 of file electro.hpp.
|
constexpr |
Capacitance: charge / capacitance = voltage.
Definition at line 837 of file electro.hpp.
|
constexpr |
Capacitance: charge / voltage = capacitance.
Definition at line 831 of file electro.hpp.
|
constexpr |
L/R time constant: inductance / resistance = time.
Definition at line 867 of file electro.hpp.
|
constexpr |
Energy: energy / time = power.
Definition at line 789 of file electro.hpp.
|
constexpr |
Energy: energy / charge = voltage.
Definition at line 813 of file electro.hpp.
|
constexpr |
Energy: energy / voltage = charge.
Definition at line 807 of file electro.hpp.
|
constexpr |
Energy: energy / power = time.
Definition at line 795 of file electro.hpp.
|
constexpr |
Ohm's law: voltage / current = resistance.
Definition at line 705 of file electro.hpp.
|
constexpr |
Ohm's law: voltage / resistance = current.
Definition at line 699 of file electro.hpp.
|
constexpr |
Power law: power / current = voltage.
Definition at line 729 of file electro.hpp.