Group Module
Maps a unit to its group, compares and formats groups and lists the units and unit combinations of a group.
Nested modules
| Modules | Description |
|
Holds the names of the unit groups as text. |
Functions and values
| Function or value |
Description
|
|
|
|
Checks whether u1 contains the same unit groups as u2 Compares the flattened num/den groups: handles commutativity and associativity, but does not cancel common factors or drop Count. Reduction to the lowest terms is left to simplifyUnit upstream.
ExampleeqsGroup (Mass (KiloGram 1N)) (Mass (Gram 1N)) = true // also (ml/kg)/hour = (ml/hour)/kg = true! let un1 = CombiUnit (CombiUnit (Volume (MilliLiter 1N), OpPer, Weight (WeightKiloGram 1N)), OpPer, Time (Hour 1N)) let un2 = CombiUnit (CombiUnit (Volume (MilliLiter 1N), OpPer, Time (Hour 1N)), OpPer, Weight (WeightKiloGram 1N)) eqsGroup un1 un2 = true |
|
|
|
|
|
Get all the units that belong to group or a combination of groups.
Example
|
|
|
Returns group g as a string
|
|
|
|
|
Returns group g as a string with the specific General string specifier
|
|
|
|
GenPRES