Open Tehforsch opened 11 months ago
struct Dimension { temperature: (i32, Kind), ... } enum Kind { Relative, Absolute, }
Thinking more about it, I am not sure this really covers the use case, since it wouldn't really transfer when dimensions change during operation. As an example, what if I multiply a relative temperature with the boltzmann constant? I would expect the result to be a relative energy, but where would this information be stored? In SI, it would have to be stored in any combination of length
, time
and mass
. How would that work? Also what if we simultaneously want to differentiate between distances and position, for example? We'd suddenly have an explosion of these kinds that doesn't really make sense.
I'll have to look more at uom
s implementation and how exactly ThermodynamicTemperature
and TemperatureInterval
are treated under the different operations. I still think that this is mostly an issue of getting the definition right (and looking at uom
should help with that) and not something that will stretch the current const generics to its limits (as opposed to #39, for example).
Distinguishing covariance and contravariance would be amazing when working in non-orthogonal coordinate systems. I don't know how what of that belongs at this level versus tensor algebra library based on diman.
I think it should at least be possible to track this in diman, but have no idea whether it is the best strategy.
Extracted from #36
@jedbrown
@Tehforsch
@jedbrown