xo-unit: + bpu-class docs
This commit is contained in:
parent
8844390090
commit
5d8ea2192a
4 changed files with 39 additions and 6 deletions
|
|
@ -5,7 +5,7 @@ xo_docdir_doxygen_config()
|
|||
xo_docdir_sphinx_config(
|
||||
index.rst examples.rst glossary.rst install.rst implementation.rst development.rst
|
||||
quantity-reference.rst quantity-class.rst quantity-factoryfunctions.rst quantity-unitvars.rst
|
||||
unit-reference.rst unit-concept.rst unit-quantities.rst bu-store-class.rst basis-unit-reference.rst
|
||||
unit-reference.rst unit-concept.rst unit-quantities.rst bpu-class.rst bu-store-class.rst basis-unit-reference.rst
|
||||
basis-unit-class.rst basis-unit-constants.rst
|
||||
dimension-enum.rst
|
||||
)
|
||||
|
|
|
|||
32
docs/bpu-class.rst
Normal file
32
docs/bpu-class.rst
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
.. _bpu-class:
|
||||
|
||||
BPU
|
||||
===
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
#include <xo/unit/bpu.hpp>
|
||||
|
||||
A :code:`xo::qty::bpu` represents a rational (usually integer) power of a :doc:`basis-unit-class`.
|
||||
|
||||
For example:
|
||||
|
||||
.. uml::
|
||||
:caption: representation for cubic millimeters
|
||||
:scale: 99%
|
||||
:align: center
|
||||
|
||||
object mm3<<bpu>>
|
||||
mm3 : native_dim = dim::distance
|
||||
mm3 : scalefactor = 1/1000
|
||||
mm3 : power = 3/1
|
||||
|
||||
.. uml::
|
||||
:caption: representation for annual (365-day) volatility
|
||||
:scale: 99%
|
||||
:align: center
|
||||
|
||||
object vol<<bpu>>
|
||||
vol : native_dim = dim::time
|
||||
vol : scalefactor = 365*24*3600
|
||||
vol : power = -1/2
|
||||
|
|
@ -48,21 +48,21 @@ Abstraction tower for *xo-unit* components.
|
|||
- natural_units are *not* closed under multiplication and division.
|
||||
(for example consider :code:`xo::qty::qty::foot * xo::qty::qty::meter`)
|
||||
|
||||
- bpu:
|
||||
- bpu: :doc:`bpu-class`.
|
||||
|
||||
A power of a basis unit. Has a single dimension.
|
||||
A rational (usually integer) power of a basis unit. Has a single dimension.
|
||||
|
||||
- bu_store: see :doc:`bu-store-class`.
|
||||
- bu_store: :doc:`bu-store-class`.
|
||||
|
||||
Associates basis units with abbreviations.
|
||||
|
||||
For example ``bu::kilogram`` => ``"kg"``
|
||||
|
||||
- basis_unit: see :doc:`basis-unit-reference`.
|
||||
- basis_unit: :doc:`basis-unit-reference`.
|
||||
|
||||
A unit with a single dimension and scale.
|
||||
|
||||
- dimension: see :doc:`dimension-enum`.
|
||||
- dimension: :doc:`dimension-enum`.
|
||||
|
||||
identifies a dimension, such as mass or time.
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ runtime (since we can't construct new c++ types at runtime).
|
|||
unit-quantities
|
||||
quantity-reference
|
||||
unit-reference
|
||||
bpu-class
|
||||
bu-store-class
|
||||
basis-unit-reference
|
||||
dimension-enum
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue