Boost logo

Boost :

From: Eric Lemings (lemings_at_[hidden])
Date: 2006-08-23 12:23:56


 

> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Phil Richards
> Sent: Wednesday, August 23, 2006 8:58 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] Boost Units library preview
>
> On 2006-08-23, Matthias Troyer <troyer_at_[hidden]> wrote:
> > - Nm would be a "dimension"
>
> Not really. It is the unit.

Correct. A newton is a derived unit composed of base units,
specifically kilogram, meter, and second. Meter is of course a
base unit.

> The dimension is: MASS * LENGTH^2 * TIME^2

Also correct. Every unit, whether a base unit or derived, has a
corresponding dimension.

> > - 1 Nm would be a "quantity"

No. This is a measure. It has a specific unit and a specific
value.

Here's an example of a quantity. The distance from
here->| |<-to here is a quantity with a
dimension of length. You don't know what its value is exactly
but you do know that it has a value and can be measured. Until
you actually measure this length with a particular unit does the
"quantity" become a "measure". Converting a measure into a
quantity is essentially the same as stripping away the unit but
keeping the dimension.

Does that make sense?

> > - a torque measured in Nm or an energy measured in Nm
> would be two distinct units

Dimensions and units are C++ types. They have no "value" in
the conventional sense.

> > - 1 Nm as torque, 1 Nm as energy or 1 J as energy would be
> > three distinct measures
>
> I think as far as a dimensionality checking goes, they are
> all the same. As far as a units checking goes, Nm and J
> *could* be distinguished. It's an interesting question as to
> what, exactly, "energy" and "torque" are once you try to
> separate away the dimensionality and units bits... :-)

Yep, if the units are the same and the value is the same then
they are (or should be) considered the same measure. I think
it should be left up to users to interpret these measures and
how they are used.

Eric.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk