docs: initial V2 documenatation added

This commit is contained in:
Mateusz Pusz
2023-06-21 10:55:18 +02:00
parent dde5bcab7e
commit 4b3e31f40d
236 changed files with 1495 additions and 7967 deletions
-12
View File
@@ -1,12 +0,0 @@
Core Library
============
.. toctree::
:maxdepth: 1
core/concepts
core/types
core/functions
core/metafunctions
core/customization_points
core/downcasting
-169
View File
@@ -1,169 +0,0 @@
.. namespace:: units
Concepts
========
.. note::
All names defined in this chapter reside in the :any:`units` namespace unless
specified otherwise.
.. concept:: template<typename T> Prefix
A concept matching a symbol prefix. Satisfied by all instantiations of :struct:`prefix`.
.. concept:: template<ratio R> UnitRatio
Satisfied by all ratio values for which :expr:`R.num > 0` and :expr:`R.den > 0`.
.. concept:: template<typename T> BaseDimension
A concept matching all base dimensions in the library. Satisfied by all dimension types
derived from the instantiation of :class:`base_dimension`.
.. concept:: template<typename T> Exponent
A concept matching dimension's exponents. Satisfied by all instantiations of :class:`exponent`.
.. concept:: template<typename T> DerivedDimension
A concept matching all derived dimensions in the library. Satisfied by all dimension
types derived from the instantiation of ``detail::derived_dimension_base``.
.. concept:: template<typename T> Dimension
A concept matching all dimensions in the library. Satisfied by all dimension types for
which either :expr:`BaseDimension<T>` or :expr:`DerivedDimension<T>` is ``true``.
.. concept:: template<typename T> Unit
A concept matching all unit types in the library. Satisfied by all unit types derived
from the instantiation of :class:`scaled_unit`.
.. concept:: template<typename T> NamedUnit
A concept matching all unit types that have an atomic text symbol that can be used to aggregate it with
other named units to form a final symbol of a derived unit.
.. concept:: template<typename T> AliasUnit
A concept matching all alias unit types in the library. Satisfied by all unit types derived
from the instantiation of :class:`alias_unit`.
.. concept:: template<typename U, typename D> UnitOf
A concept matching only units of a specified dimension. Satisfied by all unit types that
satisfy :expr:`Unit<U>`, :expr:`Dimension<D>`, and for which :expr:`U::reference` and
``dimension_unit<D>::reference`` denote the same unit type.
:tparam U: Type to verify against concept constraints.
:tparam D: Dimension type to use for verification.
.. concept:: template<typename T> Quantity
A concept matching all quantities in the library. Satisfied by all instantiations of :class:`quantity`.
.. concept:: template<typename T> QuantityLike
A concept matching all quantity-like types other than specialization of :class:`quantity`. Satisfied by
all types for which a correct specialization of :class:`quantity_like_traits` type trait is provided.
.. concept:: template<typename T> QuantityPointLike
A concept matching all quantity-point-like types other than specialization of :class:`quantity_point`.
Satisfied by all types for which a correct specialization of :class:`quantity_point_like_traits` type trait is provided.
.. concept:: template<typename T> WrappedQuantity
A concept matching types that wrap quantity objects. Satisfied by all wrapper types that
satisfy :expr:`Quantity<typename T::value_type> || QuantityLike<typename T::value_type>` recursively
(i.e. ``std::optional<si::length<si::metre>>``).
.. concept:: template<typename T> Representation
A concept matching types that can be used as a `Quantity` representation type. Satisfied
by types that match ``(!Quantity<T>) && (!QuantityLike<T>) && (!WrappedQuantity<T>) && std::regular<T>``
and satisfy one of the following:
- if ``common_type_with<T, std::intmax_t>`` is ``true``, then ``std::common_type_t<T, std::intmax_t>``
must at least provide binary multiplication and division operators,
- otherwise, ``T::value_type`` must be valid, ``common_type_with<T::value_type, std::intmax_t>`` be
``true``, and ``std::common_type_t<T::value_type, std::intmax_t>`` must at least provide binary
multiplication and division operators with itself and ``T``.
.. concept:: template<typename T> QuantityPoint
A concept matching all quantity points in the library. Satisfied by all instantiations of
:class:`quantity_point`.
.. concept:: template<typename T> Kind
A concept matching all kind types. Satisfied by all kind types derived from an specialization of
:class:`kind`.
.. concept:: template<typename T> PointKind
A concept matching all point kind types. Satisfied by all point kind types derived from an specialization of
:class:`point_kind`.
.. concept:: template<typename T> QuantityKind
A concept matching all quantity kinds in the library. Satisfied by all specializations of
:class:`quantity_kind`.
.. concept:: template<typename T> QuantityPointKind
A concept matching all quantity point kinds in the library. Satisfied by all specializations of
:class:`quantity_point_kind`.
.. concept:: template<typename Dim, template<typename...> typename DimTemplate> DimensionOfT
A concept matching all dimensions being the instantiations derived from the provided dimension
class template.
.. concept:: template<typename Q, template<typename...> typename DimTemplate> QuantityOfT
A concept matching all quantities with a dimension being the instantiation derived from
the provided dimension class template.
.. concept:: template<typename Q, typename Dim> QuantityOf
A concept matching all quantities with a dimension being the instantiation derived from
the provided dimension type.
.. concept:: template<typename Q1, typename Q2> QuantityEquivalentTo
A concept matching two equivalent quantities. Satisfied by quantities having equivalent dimensions.
.. concept:: template<typename QP, typename Dim> QuantityPointOf
A concept matching all quantity points with a dimension being the instantiation derived from
the provided dimension type.
.. concept:: template<typename QP1, typename QP2> QuantityPointEquivalentTo
A concept matching two equivalent quantity points. Satisfied by quantity points having equivalent
dimensions.
.. concept:: template<typename QK, typename K> QuantityKindOf
A concept matching only quantity kinds of a specific kind.
:tparam QK: Quantity kind to verify.
:tparam K: Kind type to use for verification.
.. concept:: template<typename QK1, typename QK2> QuantityKindEquivalentTo
A concept matching two equivalent quantity kinds. Satisfied by quantity kinds having equivalent kinds.
.. concept:: template<typename QPK, typename PK> QuantityPointKindOf
A concept matching only quantity point kinds of a specific point kind.
:tparam QPK: Quantity point kind to verify.
:tparam PK: Point kind type to use for verification.
.. concept:: template<typename QPK1, typename QPK2> QuantityPointKindEquivalentTo
A concept matching two equivalent quantity point kinds. Satisfied by quantity point kinds having
equivalent kinds.
@@ -1,13 +0,0 @@
Customization Points
====================
.. doxygenvariable:: units::treat_as_floating_point
.. doxygenstruct:: units::quantity_values
:members:
.. doxygenstruct:: units::quantity_like_traits
:members:
.. doxygenstruct:: units::quantity_point_like_traits
:members:
-20
View File
@@ -1,20 +0,0 @@
The Downcasting Facility
========================
.. doxygenenum:: downcast_mode
.. concept:: template<typename T> Downcastable
.. doxygenstruct:: units::downcast_base
:members:
.. doxygenstruct:: units::downcast_child
:members:
.. doxygenstruct:: units::downcast_poison
:members:
.. doxygenstruct:: units::downcast_dispatch
:members:
.. doxygentypedef:: units::downcast
-4
View File
@@ -1,4 +0,0 @@
Metafunctions
=============
.. doxygentypedef:: dimension_unit
-16
View File
@@ -1,16 +0,0 @@
Types
=====
.. toctree::
:maxdepth: 1
types/quantity
types/quantity_point
types/kinds
types/quantity_kind
types/quantity_point_kind
types/dimensions
types/units
types/prefixes
types/reference
types/utilities
-11
View File
@@ -1,11 +0,0 @@
Dimensions
==========
.. doxygenstruct:: units::base_dimension
:members:
.. doxygenstruct:: units::exponent
:members:
.. doxygenstruct:: units::derived_dimension
:members:
-8
View File
@@ -1,8 +0,0 @@
Kinds
=====
.. doxygenstruct:: units::kind
:members:
.. doxygenstruct:: units::point_kind
:members:
-5
View File
@@ -1,5 +0,0 @@
Prefixes
========
.. doxygenstruct:: units::prefix
:members:
-6
View File
@@ -1,6 +0,0 @@
Quantity
========
.. doxygenclass:: units::quantity
:members:
:undoc-members:
@@ -1,6 +0,0 @@
Quantity Kind
=============
.. doxygenclass:: units::quantity_kind
:members:
:undoc-members:
@@ -1,6 +0,0 @@
Quantity Point
==============
.. doxygenclass:: units::quantity_point
:members:
:undoc-members:
@@ -1,6 +0,0 @@
Quantity Point Kind
===================
.. doxygenclass:: units::quantity_point_kind
:members:
:undoc-members:
-6
View File
@@ -1,6 +0,0 @@
Quantity Reference
==================
.. doxygenstruct:: units::reference
:members:
:undoc-members:
-26
View File
@@ -1,26 +0,0 @@
Units
=====
.. doxygenstruct:: units::scaled_unit
:members:
.. doxygenstruct:: units::named_unit
:members:
.. doxygenstruct:: units::named_scaled_unit
:members:
.. doxygenstruct:: units::prefixed_unit
:members:
.. doxygenstruct:: units::derived_unit
:members:
.. doxygenstruct:: units::derived_scaled_unit
:members:
.. doxygenstruct:: units::alias_unit
:members:
.. doxygenstruct:: units::prefixed_alias_unit
:members:
-9
View File
@@ -1,9 +0,0 @@
Utilities
=========
.. toctree::
:maxdepth: 1
utilities/ratio
utilities/basic_symbol_text
utilities/basic_fixed_string
@@ -1,6 +0,0 @@
basic_fixed_string
==================
.. doxygenstruct:: units::basic_fixed_string
:members:
:undoc-members:
@@ -1,6 +0,0 @@
basic_symbol_text
=================
.. doxygenstruct:: units::basic_symbol_text
:members:
:undoc-members:
@@ -1,6 +0,0 @@
ratio
=====
.. doxygenstruct:: units::ratio
:members:
:undoc-members:
-40
View File
@@ -1,40 +0,0 @@
Random
======
.. doxygenstruct:: units::uniform_int_distribution
.. doxygenstruct:: units::uniform_real_distribution
.. doxygenstruct:: units::binomial_distribution
.. doxygenstruct:: units::negative_binomial_distribution
.. doxygenstruct:: units::geometric_distribution
.. doxygenstruct:: units::poisson_distribution
.. doxygenstruct:: units::exponential_distribution
.. doxygenstruct:: units::gamma_distribution
.. doxygenstruct:: units::weibull_distribution
.. doxygenstruct:: units::extreme_value_distribution
.. doxygenstruct:: units::normal_distribution
.. doxygenstruct:: units::lognormal_distribution
.. doxygenstruct:: units::chi_squared_distribution
.. doxygenstruct:: units::cauchy_distribution
.. doxygenstruct:: units::fisher_f_distribution
.. doxygenstruct:: units::student_t_distribution
.. doxygenstruct:: units::discrete_distribution
.. doxygenstruct:: units::piecewise_constant_distribution
.. doxygenstruct:: units::piecewise_linear_distribution
-12
View File
@@ -1,12 +0,0 @@
Systems
=======
.. toctree::
:maxdepth: 2
systems/generic
.. toctree::
:maxdepth: 2
systems/isq
-10
View File
@@ -1,10 +0,0 @@
Generic
=======
.. toctree::
:maxdepth: 2
generic/unknown
generic/dimensionless
generic/angle
generic/solid_angle
-13
View File
@@ -1,13 +0,0 @@
Angle
=====
.. doxygenstruct:: units::radian
.. doxygenstruct:: units::revolution
.. doxygenstruct:: units::degree
.. doxygenstruct:: units::gradian
.. doxygenstruct:: units::dim_angle
.. doxygentypedef:: units::angle
.. doxygenvariable:: cotes_angle
@@ -1,10 +0,0 @@
Dimensionless
=============
.. doxygenstruct:: units::one
.. doxygenstruct:: units::percent
.. doxygenstruct:: units::dim_one
.. doxygentypedef:: units::dimensionless
@@ -1,8 +0,0 @@
Solid Angle
===========
.. doxygenstruct:: units::steradian
.. doxygenstruct:: units::dim_solid_angle
.. doxygentypedef:: units::solid_angle
@@ -1,6 +0,0 @@
Unknown
=======
.. doxygenstruct:: units::unknown_coherent_unit
.. doxygenstruct:: units::unknown_dimension
-26
View File
@@ -1,26 +0,0 @@
International System of Quantities (ISQ)
========================================
.. toctree::
:maxdepth: 2
isq/dimensions_and_concepts
isq/si
isq/iec80000
isq/natural
Systems of Units based on the SI
--------------------------------
.. toctree::
:maxdepth: 2
isq/si_cgs
isq/si_international
isq/si_uscs
isq/si_imperial
isq/si_fps
isq/si_iau
isq/si_hep
isq/si_typographic
@@ -1,47 +0,0 @@
Dimensions and Concepts
=======================
.. doxygenfile:: isq/dimensions/absorbed_dose.h
.. doxygenfile:: isq/dimensions/acceleration.h
.. doxygenfile:: isq/dimensions/amount_of_substance.h
.. doxygenfile:: isq/dimensions/angular_velocity.h
.. doxygenfile:: isq/dimensions/area.h
.. doxygenfile:: isq/dimensions/capacitance.h
.. doxygenfile:: isq/dimensions/catalytic_activity.h
.. doxygenfile:: isq/dimensions/charge_density.h
.. doxygenfile:: isq/dimensions/concentration.h
.. doxygenfile:: isq/dimensions/conductance.h
.. doxygenfile:: isq/dimensions/current_density.h
.. doxygenfile:: isq/dimensions/density.h
.. doxygenfile:: isq/dimensions/dynamic_viscosity.h
.. doxygenfile:: isq/dimensions/electric_charge.h
.. doxygenfile:: isq/dimensions/electric_current.h
.. doxygenfile:: isq/dimensions/electric_field_strength.h
.. doxygenfile:: isq/dimensions/energy.h
.. doxygenfile:: isq/dimensions/energy_density.h
.. doxygenfile:: isq/dimensions/force.h
.. doxygenfile:: isq/dimensions/frequency.h
.. doxygenfile:: isq/dimensions/heat_capacity.h
.. doxygenfile:: isq/dimensions/inductance.h
.. doxygenfile:: isq/dimensions/length.h
.. doxygenfile:: isq/dimensions/luminance.h
.. doxygenfile:: isq/dimensions/luminous_intensity.h
.. doxygenfile:: isq/dimensions/magnetic_flux.h
.. doxygenfile:: isq/dimensions/magnetic_induction.h
.. doxygenfile:: isq/dimensions/mass.h
.. doxygenfile:: isq/dimensions/molar_energy.h
.. doxygenfile:: isq/dimensions/momentum.h
.. doxygenfile:: isq/dimensions/permeability.h
.. doxygenfile:: isq/dimensions/permittivity.h
.. doxygenfile:: isq/dimensions/power.h
.. doxygenfile:: isq/dimensions/pressure.h
.. doxygenfile:: isq/dimensions/radioactivity.h
.. doxygenfile:: isq/dimensions/resistance.h
.. doxygenfile:: isq/dimensions/speed.h
.. doxygenfile:: isq/dimensions/surface_tension.h
.. doxygenfile:: isq/dimensions/thermal_conductivity.h
.. doxygenfile:: isq/dimensions/thermodynamic_temperature.h
.. doxygenfile:: isq/dimensions/time.h
.. doxygenfile:: isq/dimensions/torque.h
.. doxygenfile:: isq/dimensions/voltage.h
.. doxygenfile:: isq/dimensions/volume.h
-11
View File
@@ -1,11 +0,0 @@
IEC 80000
=========
.. toctree::
:maxdepth: 2
iec80000/binary_prefixes
iec80000/modulation_rate
iec80000/storage_capacity
iec80000/traffic_intensity
iec80000/transfer_rate
@@ -1,4 +0,0 @@
Binary Prefixes
===============
.. doxygenfile:: iec80000/binary_prefixes.h
@@ -1,4 +0,0 @@
Modulation Rate
===============
.. doxygenfile:: iec80000/modulation_rate.h
@@ -1,4 +0,0 @@
Storage Capacity
================
.. doxygenfile:: iec80000/storage_capacity.h
@@ -1,4 +0,0 @@
Traffic Intensity
=================
.. doxygenfile:: iec80000/traffic_intensity.h
@@ -1,4 +0,0 @@
Transfer Rate
=============
.. doxygenfile:: iec80000/transfer_rate.h
-16
View File
@@ -1,16 +0,0 @@
Natural
=======
.. toctree::
:maxdepth: 2
natural/units
natural/constants
natural/acceleration
natural/energy
natural/force
natural/length
natural/mass
natural/momentum
natural/speed
natural/time
@@ -1,4 +0,0 @@
Acceleration
============
.. doxygenfile:: natural/acceleration.h
@@ -1,4 +0,0 @@
Constants
=========
.. doxygenfile:: natural/constants.h
@@ -1,4 +0,0 @@
Energy
======
.. doxygenfile:: natural/energy.h
@@ -1,4 +0,0 @@
Force
=====
.. doxygenfile:: natural/force.h
@@ -1,4 +0,0 @@
Length
======
.. doxygenfile:: natural/length.h
@@ -1,4 +0,0 @@
Mass
====
.. doxygenfile:: natural/mass.h
@@ -1,4 +0,0 @@
Momentum
========
.. doxygenfile:: natural/momentum.h
@@ -1,4 +0,0 @@
Speed
=====
.. doxygenfile:: natural/speed.h
@@ -1,4 +0,0 @@
Time
====
.. doxygenfile:: natural/time.h
@@ -1,4 +0,0 @@
Units
=====
.. doxygenfile:: natural/units.h
-48
View File
@@ -1,48 +0,0 @@
International System of Units (SI)
==================================
.. toctree::
:maxdepth: 2
si/prefixes
si/constants
si/absorbed_dose
si/acceleration
si/amount_of_substance
si/area
si/capacitance
si/catalytic_activity
si/charge_density
si/concentration
si/conductance
si/current_density
si/density
si/dynamic_viscosity
si/electric_charge
si/electric_current
si/electric_field_strength
si/energy
si/force
si/frequency
si/heat_capacity
si/inductance
si/length
si/luminance
si/luminous_intensity
si/magnetic_flux
si/magnetic_induction
si/mass
si/molar_energy
si/momentum
si/permeability
si/permittivity
si/power
si/pressure
si/resistance
si/speed
si/surface_tension
si/thermal_conductivity
si/thermodynamic_temperature
si/time
si/voltage
si/volume
@@ -1,4 +0,0 @@
Absorbed Dose
=============
.. doxygenfile:: si/absorbed_dose.h
@@ -1,4 +0,0 @@
Acceleration
============
.. doxygenfile:: si/acceleration.h
@@ -1,4 +0,0 @@
Amount of Substance
===================
.. doxygenfile:: si/amount_of_substance.h
-4
View File
@@ -1,4 +0,0 @@
Area
====
.. doxygenfile:: si/area.h
@@ -1,4 +0,0 @@
Capacitance
===========
.. doxygenfile:: si/capacitance.h
@@ -1,4 +0,0 @@
Catalytic Activity
==================
.. doxygenfile:: si/catalytic_activity.h
@@ -1,4 +0,0 @@
Acceleration
============
.. doxygenfile:: si/cgs/acceleration.h
@@ -1,4 +0,0 @@
Area
====
.. doxygenfile:: si/cgs/area.h
@@ -1,4 +0,0 @@
Energy
======
.. doxygenfile:: si/cgs/energy.h
@@ -1,4 +0,0 @@
Force
=====
.. doxygenfile:: si/cgs/force.h
@@ -1,4 +0,0 @@
Length
======
.. doxygenfile:: si/cgs/length.h
@@ -1,4 +0,0 @@
Mass
====
.. doxygenfile:: si/cgs/mass.h
@@ -1,4 +0,0 @@
Power
=====
.. doxygenfile:: si/cgs/power.h
@@ -1,4 +0,0 @@
Pressure
========
.. doxygenfile:: si/cgs/pressure.h
@@ -1,4 +0,0 @@
Speed
=====
.. doxygenfile:: si/cgs/speed.h
@@ -1,4 +0,0 @@
Time
====
.. doxygenfile:: si/cgs/time.h
@@ -1,4 +0,0 @@
Charge Density
==============
.. doxygenfile:: si/charge_density.h
@@ -1,4 +0,0 @@
Concentration
=============
.. doxygenfile:: si/concentration.h
@@ -1,4 +0,0 @@
Conductance
===========
.. doxygenfile:: si/conductance.h
@@ -1,4 +0,0 @@
Constants
=========
.. doxygenfile:: si/constants.h
@@ -1,4 +0,0 @@
Current density
===============
.. doxygenfile:: si/current_density.h
@@ -1,4 +0,0 @@
Density
=======
.. doxygenfile:: si/density.h
@@ -1,4 +0,0 @@
Dynamic Viscosity
=================
.. doxygenfile:: si/dynamic_viscosity.h
@@ -1,4 +0,0 @@
Electric Charge
===============
.. doxygenfile:: si/electric_charge.h
@@ -1,4 +0,0 @@
Electric Current
================
.. doxygenfile:: si/electric_current.h
@@ -1,4 +0,0 @@
Electric Field Strength
=======================
.. doxygenfile:: si/electric_field_strength.h
-4
View File
@@ -1,4 +0,0 @@
Energy
======
.. doxygenfile:: si/energy.h
-4
View File
@@ -1,4 +0,0 @@
Force
=====
.. doxygenfile:: si/force.h
@@ -1,4 +0,0 @@
Acceleration
============
.. doxygenfile:: si/fps/acceleration.h
@@ -1,4 +0,0 @@
Area
====
.. doxygenfile:: si/fps/area.h
@@ -1,4 +0,0 @@
Density
=======
.. doxygenfile:: si/fps/density.h
@@ -1,4 +0,0 @@
Energy
======
.. doxygenfile:: si/fps/energy.h
@@ -1,4 +0,0 @@
Force
=====
.. doxygenfile:: si/fps/force.h
@@ -1,4 +0,0 @@
Length
======
.. doxygenfile:: si/fps/length.h
@@ -1,4 +0,0 @@
Mass
====
.. doxygenfile:: si/fps/mass.h
@@ -1,4 +0,0 @@
Power
=====
.. doxygenfile:: si/fps/power.h
@@ -1,4 +0,0 @@
Pressure
========
.. doxygenfile:: si/fps/pressure.h
@@ -1,4 +0,0 @@
Speed
=====
.. doxygenfile:: si/fps/speed.h
@@ -1,4 +0,0 @@
Time
====
.. doxygenfile:: si/fps/time.h
@@ -1,4 +0,0 @@
Volume
======
.. doxygenfile:: si/fps/volume.h
@@ -1,4 +0,0 @@
Frequency
=========
.. doxygenfile:: si/frequency.h
@@ -1,4 +0,0 @@
Heat Capacity
=============
.. doxygenfile:: si/heat_capacity.h
@@ -1,4 +0,0 @@
Area
====
.. doxygenfile:: si/hep/area.h
@@ -1,4 +0,0 @@
Energy
======
.. doxygenfile:: si/hep/energy.h
@@ -1,4 +0,0 @@
Mass
====
.. doxygenfile:: si/hep/mass.h
@@ -1,4 +0,0 @@
Momentum
========
.. doxygenfile:: si/hep/momentum.h
@@ -1,4 +0,0 @@
Length
======
.. doxygenfile:: si/iau/length.h
@@ -1,4 +0,0 @@
Length
======
.. doxygenfile:: si/imperial/length.h
@@ -1,4 +0,0 @@
Inductance
==========
.. doxygenfile:: si/inductance.h
@@ -1,4 +0,0 @@
Area
====
.. doxygenfile:: si/international/area.h
@@ -1,4 +0,0 @@
Length
======
.. doxygenfile:: si/international/length.h
@@ -1,4 +0,0 @@
Speed
=====
.. doxygenfile:: speed/speed.h
@@ -1,4 +0,0 @@
Volume
======
.. doxygenfile:: si/international/volume.h
-4
View File
@@ -1,4 +0,0 @@
Length
======
.. doxygenfile:: si/length.h

Some files were not shown because too many files have changed in this diff Show More