Contains definitions and their getters. These are:
base_dimensionsstandard_formulagrab-notation and grab-name from base-dimensionsgrab-sformula from standard-formulanotation?matched-notation-sformulaupdate-sformula(require '[diman.dimensions :refer [base_dimensions standard_formula
                                    grab-notation grab-name grab-sformula
                                    notation? matched-notation-sformula]])
(pprint bas e_dimensions)
=> (grab-notation "mass")
"[M]"
=> (grab-name "[M]")
"mass"
(pprint standard_formula)
=> (grab-sformula "acceleration")
"[L^(1)*T^(-2)]"
Notice that a formula in standard_formula is a dimensional formula and hence as a consequence a dimension.
Let us define symbol x, v, t and a representing a combination of variables and parameters as
(def varpars [{:symbol "x", :quantity "length"}
              {:symbol "v", :quantity "velocity"}
              {:symbol "t", :quantity "time"}
              {:symbol "a", :quantity "acceleration"}])
Then based on the dimensions defined for respective symbol use
=> (matched-notation-sformula varpars "x")
"[L]"
=> (matched-notation-sformula varpars "a")
"[L^(1)*T^(-2)]"
NOTE:
:symbol:dimension whose value must be a string corresponding to either
:name values, i.e, one of the seven fundamental dimensionsquantity values, i.e, one of the standard formulaeContains definitions and their getters.
These are:
- `base_dimensions`
- `standard_formula`
- `grab-notation` and `grab-name` from `base-dimensions`
- `grab-sformula` from `standard-formula`
- `notation?`
- `matched-notation-sformula`
- `update-sformula`
## How to use
### Loading
```
(require '[diman.dimensions :refer [base_dimensions standard_formula
                                    grab-notation grab-name grab-sformula
                                    notation? matched-notation-sformula]])
```
### Examples
#### View the seven fundamental dimensions
`(pprint bas e_dimensions)`
#### Get notation for the base dimension name "mass"
```
=> (grab-notation "mass")
"[M]"
```
#### Get base dimension name for notation "[M]"
```
=> (grab-name "[M]")
"mass"
```
#### View available standard formula
`(pprint standard_formula)`
#### Get formula of a quantity in the standard formula
```
=> (grab-sformula "acceleration")
"[L^(1)*T^(-2)]"
```
Notice that a formula in `standard_formula` is a dimensional formula and hence as a consequence a dimension.
#### Get matching notation/standard formula of a defined symbol
Let us define symbol *x*, *v*, *t* and *a* representing a combination of variables and parameters as
```
(def varpars [{:symbol "x", :quantity "length"}
              {:symbol "v", :quantity "velocity"}
              {:symbol "t", :quantity "time"}
              {:symbol "a", :quantity "acceleration"}])
```
Then based on the dimensions defined for respective symbol use
```
=> (matched-notation-sformula varpars "x")
"[L]"
=> (matched-notation-sformula varpars "a")
"[L^(1)*T^(-2)]"
```
NOTE:
* definition of any __single letter__ symbol must be a value to key `:symbol`
* and must also have the key `:dimension` whose value must be a string corresponding to either
  - one of the seven `:name` values, i.e, one of the seven fundamental dimensions
  - one of the `quantity` values, i.e, one of the standard formulae
The Seven Fundamental/Base Dimensions. NOTE: This is fixed. See International Metrology
The Seven Fundamental/Base Dimensions. NOTE: This is fixed. See [International Metrology](https://www.bipm.org/en/measurement-units/)
(grab-name notation)(grab-name notation bdim dim)Returns name for any one of the 7-Base notations, else "nil".
Returns name for any one of the 7-Base notations, else "nil".
(grab-notation name)(grab-notation name bdim dim)Returns notation for any one of the 7-Base dimensions, else "nil".
Returns notation for any one of the 7-Base dimensions, else "nil".
(grab-sformula quantity)(grab-sformula quantity sform form)Returns formula for any one of the standard quantities (hence standard formula), else "nil".
Returns formula for any one of the standard quantities (hence standard formula), else "nil".
Dimensional Formula for standard physical quantity. NOTE: This is subject to expansion. See International Metrology
Dimensional Formula for standard physical quantity. NOTE: This is subject to expansion. See [International Metrology](https://www.bipm.org/en/measurement-units/)
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |