Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2003-04-19 13:28:35

"Robert Ramey" <ramey_at_[hidden]> wrote in message
> Does there exist or is someone interest in creating a small
> survey on the existing quantity/units libraries available. Ideally
> I would like to see something like:
> a) Short definition of the purpose of a quantity/units library
> b) perhaps a clarification of terminology.
> b) List of features that such a library might have
> c) list of known libraries
> d) for each known library, which combination of the above
> features the library implements.
a) Purpose: automated (compile-time) checking of the dimensions of values
(taken from SIunits library abstract).

Informative article is on

b) List of possible features:

  b1- compile time detection of inconsistent dimensions,
  b2- zero overhead compared to native supported types,
  b3- some predefined dimensions and quantities (like weight/kilograms),
  b4- predefined alternative names (like light_year in: distance = 5.2 *
light_year; )
  b5- support for physical, chemical, mathematical and generally useful
dimensions (like angle)
  b6- operations over set of different dimensions (e.g. result of length /
time should be speed type),
  b7- ability to distinguish different types of the same dimension (e.g.
width of image and width of screen)
  b8- conversion between application specific dimensions (e.g. between pixel
position and point in vector drawing)
  b9- ability to deal with complex types (e.g. pixel position with back
reference to vector drawing element to avoid rounding errors in zooming)

c+d) Known list of libraries and their features:
(features can be overlooked: none of the libraries has detailed
documentation, some libraries have no one)

  c1- SIunits is advanced library concentrated on physics: doesn't provide
b6, b7 (easily), b8-9.
  c2- Dimnum library: similar to SIunits in functionality: doesn't provide
  c2- ebf_units (in Yahoo files section): similar to SIunits in
functionality, doesn't provide b8-9.
  c3- physical_units_library (in Yahoo files section): similar to SIunits
functionality: likely provides all features from (b).
  c4- qualified_unit library (from Yahoo files section, written by author of
c2): lightweight, doesn't provide b3-5, b8-9.
  c5- Quantity library I suggested: this is lightweight utility to convert
types more safely: doesn't provide b3-5, b6 (now). b7-9 is trivial.

I think there is place for both simple and general purpose conversion helper
(like c4 or c5) as for full-featured library with emphasise on physics.


Boost list run by bdawes at, gregod at, cpdaniel at, john at