Files
mp-units/docs/framework/basic_concepts.rst

40 lines
1.1 KiB
ReStructuredText
Raw Normal View History

2020-03-09 18:55:41 +01:00
.. namespace:: units
Basic Concepts
==============
The most important concepts in the library are `Unit`, `Dimension`, and
`Quantity`:
.. image:: /_static/img/concepts.png
2020-03-09 18:55:41 +01:00
:align: center
2020-03-11 12:33:05 +01:00
..
http://www.nomnoml.com
[<abstract>Dimension|
[base_dimension<Symbol, Unit>]<-[exp<Dimension, Num, Den>]
[derived_dimension<Child, Unit, Exponent...>]<-[exp<Dimension, Num, Den>]
[exp<Dimension, Num, Den>]<-[derived_dimension<Child, Unit, Exponent...>]
]
[<abstract>Quantity|
[quantity<Dimension, Unit, Rep>]
]
[<abstract>Unit]<-[Dimension]
[Dimension]<-[Quantity]
[Unit]<-[Quantity]
2020-03-09 18:55:41 +01:00
`Unit` is a basic building block of the library. Every dimension works with
a concrete hierarchy of units. Such hierarchy defines a reference unit and
often a few scaled versions of it.
`Dimension` concept matches a dimension of either a base or derived quantity.
`base_dimension` is instantiated with a unique symbol identifier and a base
unit. `derived_dimension` is a list of exponents of either base or other
derived dimensions.
`Quantity` is a concrete amount of a unit for a specified dimension with a
specific representation.