Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2006-08-19 03:55:00


On Aug 18, 2006, at 7:43 PM, Andy Little wrote:

>
> "Eric Lemings" <lemings_at_[hidden]> wrote in message
>>
>> I think Thorsten's question is a sympotom of a larger issue.
>>
>> Why does Quan use such convoluted terminology? Fixed quantity?
>
> fixed_quantity is the name of the class template implemented so
> far ( one of 3
> or possibly 4 different classes). It has gone through various
> names. Once just
> quantity, then ct_quantity, then t1_quantity, now fixed_quantity.
> It is a
> quantity where the Unit is fixed at runtime. All suggestions for
> alternate names
> are welcome.
>
>> Abstract quantity?
>
> An abstract quantity is a quantity without a numeric value or a
> conversion
> factor. It still conforms to dimensional analysis and dimensional
> math.
> In fact the abstract quantity concept (small c) has now been
> gobbled up by the
> all encompassing Static Unit concept.

I am confused. What is a quantity without a numeric value? Just a unit?
I don't see the reason for a quantity without a value. Just the name
quantity implies a value.
>
>> Named quantity?
>
> A named quantity has a name. In practise in Quan-0_2_0 this means
> that, where U
> is a model of StaticUnit and is_named_quantity<U>::value is true, that
> get_named_quantity_traits<U>::type , returns a traits class, which
> provides
> useful information, such as the name of the quantity and other
> information
> mainly useful for I/O purposes.

I assume that this mean that the unit has a special name, and
additional information?

>> Concrete quantity?
>
> A concrete quantity is a quantity which has a unit and a numeric
> value.

Same confusion as with abstract quantity. Isn't abstract quantity
just the unit? I

>> Anonymous quantity?
>
> An anonymous quantity doesnt have a name, kind of the opposite of a
> named
> quantity. is_named_quantity<U>::value is false for anonymous
> quantities in the
> next version of Quan, and so their Named Quantity Traits class is
> effectively
> void.

Does this mean that the name will be derived, like in m/s^2 ? Or that
there is no unit symbol at all that can be printed? Again this seems
to be a property of the unit of the quantity. Wouldn't unnamed unit
be a better name?

>
>> Static unit?
>
> This is a proper C++ Concept. Effectively its a compile time database
> which can be queried about various aspects of a particular
> fixed_quantity. It is
> a template parameter to fixed_quantity:
>
> fixed_quantity<StaticUnit,NumericType>
>
>> United value?
>
> It is a detail of the implementation. Has it leaked into the docs
> somewhere? If
> so I will remove it as it may change without notice.
>
>> A
>> general-purpose library should use simple terms and a bare minimum
>> of names.

If I understand the above concepts correctly then we only need three
terms:

- named unit
- unnamed unit
- quantity (value + unit)

Matthias


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