Quan

Model physical quantities in C++ programs
Download

Quan Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Price:
  • FREE
  • Publisher Name:
  • Andrew Little
  • Publisher web site:
  • Operating Systems:
  • Mac OS X
  • File Size:
  • 917 KB

Quan Tags


Quan Description

Model physical quantities in C++ programs Quan is designed to model physical quantities in C++ programs. Advantages include automatic unit conversions, self documentation of code and automated dimensional analysis checking.NOTE: Quan is licensed and distributed under the terms of the Other/Proprietary License. What's New in This Release: · fixed_quantity · This is a major breaking change, but simplifies the interface. The StaticUnit is quite complex but is normally used as a typedef, when it is quite manageable. This does affect the way the Predefined Quantities are defined, and unfortunately is absolutely incompatible with previous versions, as far as adding predefined quantities is concerned. If you only make use of the predefined quantity typedefs( e.g quan::length::m), you user level code should be compatible however. · Please note that the docs don't currently reflect the changes, and are out of date. Consult the predefined quantity headers for howto on adding new predefined quantities. · Some more predefined quantities as defined in the SI have been added. Non SI units have not yet been added for these however. · What was once the quan::meta::unit has been renamed to quan::meta::conversion_factor. The quan::meta::unit is now a model of StaticUnit (as described in the docs), and also holds what used to be the AbstractQuantity data. · The quan::meta::abstract_quantity is now a member of quan::meta::unit. This reflects the change in use of the word unit. · What used to be the abstract_quantity_id has now been upgraded from being just a mpl::int_, so that now it is in fact the traits class for a named_quantity and not just an int_ id. In case of the predefined quantities this member of quan::meta::abstract_quantity is none other than the container struct ( with an "of_"prefix in which the abstract_quantity typedef is declared). The advantage is that each of these is unique and so there is no problem of trying to figure out the next useful id. Overall it works much better. · The slightly weird of_named_quantity_for device at the end of each of_ header has now ben removed,as its functionality is replaced by the above in abstract_quantity. · Some conversion factors have been or are in process of being modified to make better use of the accuracy that a rational can provide. (Previously everything was meant to have a denominator of 1000000, to give 6 digit decimal accuracy). In some cases this should give much greater accuracy in calculations. This process is not complete and there may be many other conversion factors that can be suitably changed too. · The conversion factor multipliers have been normalised. It is not necessary to have a denominator of 1000000. · A macro switch has been added which by turning it on means that you must make conversion between units explicit. This is a very useful feature for making sure that you have the minimal amount of unit conversions in your application. For casual use, leave it off, then switch it on and see where youre unit conversions are. Thanks to Deane Yang for this suggestion. · bugs in VC8.0 causee some examples using angles to fail coilation. Workarounds have been applied in quan-0_2_0 · The low level conversion code has been optimised so that it should be more accurate. You may notice a slight increase in compilation time when using non-si units particularly. This is the optimiser at work trying to remove unneccesary calculations. Compilation times for SI units should be slightly faster however. · The Concepts in the docs have been reworked. The docs are unfortunately lagging behind the code however, so unfortuantely some of the docs are out of date and still reflect previous versions. · Some work has been done on UDT's . In particular boost::numeric__interval should be useable as a value_type. This needs more comprehensive testing however. · The density header units were incorrectly specified in quan-0_1_0, so one needed to do mkg_per_m3 not g_per_m3 etc. This has been fixed in quan-0_2_0. · long double NumericType fixed quantity value_types are now supported.


Quan Related Software