-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How does the LevelOfMeasurement influence Quantity operations? #138
Comments
I love Steven's "Level Of Measurement" definitions and would be very happy to see them in the API, but unfortunately I think it does not apply to the question we are trying to answer for #95. The essential question is:
We need two values for that. The closest values in Consequently I think that we need something different than |
https://www.ryerson.ca/~qms102eb/chap01/t1d_lec.pdf is an interesting source on that. The interesting point raised by https://www.ryerson.ca/~qms102eb/chap01/t1d_lec.pdf is that 1000m in some cases could be an |
Indeed, 15°C is never a Yes, 1000 meters can be either a Saying that we can't multiply or divide an
Said in other way:
Maybe the confusion come from the fact that I used the word "interval" for the difference between two absolute measurements. Let use the words "difference" instead for this discussion. The set of operations allowed depends not only on
So as you see there is two orthogonal information: the The information that we are missing right now is the absolute measurement versus difference information. My claim is that it is not the same thing than the |
Where is the exact source for that table? So how should this be maintained to keep it simple and easy to use? |
Source is mathematic… Wikipedia only provides the "Applied on absolute measurement" column (plus other columns relevant to statistics field). The "Applied on difference" column is not explicitly shown, but you can infer it from sentences like "However, ratios of differences can be expressed" in the "Interval scale" section. But really, it is a matter of mathematics. The problem with multiplications appears because of the "+273.15" part in expression like T (K) = T (°C) + 273.15. When computing differences:
The +273.15 offset vanishes in differences. We need some kind of "absolute versus difference" construct in
So |
If it is only an absolute vs. relative, how would an extra isAbsolute() or similar flag sound? |
An
|
Hi everyone, I did back off from this discussion around June (not without some frustration). You guys must be exhausted. That said, I had a look on how Mathematica is dealing with our temperature problem. So this could be some inspiration ... https://reference.wolfram.com/language/tutorial/TemperatureUnits.html Cheers Andi! |
@andi-huber Thanks, it does talk about "absolute" vs. "difference". And Wolfram seems to differentiate between those in the Dimension. Not sure, if it's the right place but worth a thought. I'm not sure, if I would pollute the Technically it would have a relatively small overhead. The impact of a simple |
Thanks Andi for the link. Indeed the Mathematica use of "absolute measurement" and "difference" is close to the proposal described in this issue. I note also that they do not use "Level of Measurement" terms, which seems consistent with my though that "Level of Measurement" and "absolute measurement versus difference" are two complementary things. However at this time I still not have a clear opinion about whether this approach would be better than tweaking Stevens's Level Of Measurements. Advices are welcome. @keilw: if the size of the JAR file is such an issue, an easy way to save 6 kb would be to exclude the |
@desruisseaux Every JSR and project that's built with Maven includes this folder, so better not rip that away. At some later stage, a few deprecated elements could be removed, but not before another true iteration, we must obey backward-compatibility. Issues like #39 if they also lead to method duplication would further increase the size for now. If the "absolute/relative" property and the https://www.quora.com/What-are-absolute-units also answers the |
An interesting point both the Wolfram approach and Quora bring up is, that unlike LevelOfMeasurement (which those solutions using it associate with Measurement, Value Quantity) it talks both about the Unit.
Followed by
It is not conclusive about |
Closing this, because we currently disregarded |
How should the
LevelOfMeasurement
be used forQuantity
operations likeadd()
,subtract()
,multiply()
orto()
converting it into anotherUnit
?There are essentially two questions:
Needs #131
Needs #140
The text was updated successfully, but these errors were encountered: