Index: /trunk/SophyaLib/BaseTools/basetools.h
===================================================================
--- /trunk/SophyaLib/BaseTools/basetools.h	(revision 4061)
+++ /trunk/SophyaLib/BaseTools/basetools.h	(revision 4062)
@@ -27,4 +27,6 @@
 #include "randtmt32.h"
 #include "randtmt64.h"
-
+#include "pqnumber.h"
+#include "pqnumber.h"
+#include "sunitpcst.h"
 #endif
Index: /trunk/SophyaLib/BaseTools/pqnumber.cc
===================================================================
--- /trunk/SophyaLib/BaseTools/pqnumber.cc	(revision 4061)
+++ /trunk/SophyaLib/BaseTools/pqnumber.cc	(revision 4062)
@@ -15,15 +15,23 @@
    \code
    // Create a PrimeNumbers object 
+   // Create a PrimeNumbers object 
    PrimeNumbers primes;
-   // Print the first 15 primes ...
-   for(size_t k=0; k<15; k++) 
-     cout << primes(k) << endl; 
+   // Print the prime numbers from rank 20 to 25 ...
+   cout << " Primes[20...30]: " ; 
+   for(size_t k=19; k<30; k++) cout << primes(k) << "  "; 
    // Print all prime numbers less than some max values
-   uint_8 pmax = 223;
-   uint_8 p = primes.Next();
+   uint_8 p = primes.Next();  uint_8 pmax = 223;
+   cout << endl << " Primes < " << pmax << " : " << endl;
    while (p<pmax) {
-     cout << p << endl;
-     p = primes.Next();
+    cout << p << "  ";
+    p = primes.Next();
    }
+   cout << endl; 
+   // Compute and print prime factor decomposition:
+   uint_8 nombre=247890;
+   vector<uint_8> pfac=primes.PrimeFactors(nombre, true);
+   cout << " PrimeFactors[" << nombre << "]: "; 
+   for(size_t i=0; i<pfac.size(); i++) cout << pfac[i] << "   ";   
+   cout << endl;
    \endcode
 */
@@ -266,5 +274,5 @@
    
    \code
-   // Create rational numbers from integers
+   // Create rational numbers from pairs of integers
    QNumber q1(3,4), q2(5,6), q3(6,8);
    // Operations and comparsion
@@ -272,9 +280,9 @@
    cout << q1 << " + " << q2 << " = " << q4 << endl;
    QNumber qa(q1), qb(q2);
-   cout " Test qa==qb : -> " << qa << " ?== " << qb;
+   cout << " Test qa==qb : -> " << qa << " ?== " << qb;
    if (qa == qb)  cout << " -> true " << endl;
    else cout << " -> false " << endl;
    qb = q3;
-   cout " Test qa==qb : -> " << qa << " ?== " << qb;
+   cout << " Test qa==qb : -> " << qa << " ?== " << qb;
    if (qa == qb)  cout << " -> true " << endl;
    else cout << " -> false " << endl;
Index: /trunk/SophyaLib/BaseTools/sunitpcst.cc
===================================================================
--- /trunk/SophyaLib/BaseTools/sunitpcst.cc	(revision 4061)
+++ /trunk/SophyaLib/BaseTools/sunitpcst.cc	(revision 4062)
@@ -7,8 +7,16 @@
    \class Units
    \ingroup BaseTools
-   Class for representing physical units
+   This class represents physical dimension and units. Static methods return Units 
+   objects corresponding to the usual units, such as meter or watt
    
    \code
-   // Create ....
+   Units w=Units::watt(); 
+   cout << " Power unit (watt) : " << w.Name() << " (" << w << ")" << endl; 
+   // define the speed SI unit (m/s) : 
+   Units mos = Units::meter()/Units::second() ;
+   cout << " SI speed unit : " << mos << "  -> "; mos.Print() ;  
+   // mutiple of an existing unit :
+   Units mw=Units::watt().mega(); 
+   cout << " Megawatt: " << mw.Name() << " (" << mw << ")  -> "; mw.Print() ; 
    \endcode
 */
@@ -26,4 +34,9 @@
 
 /* --Methode-- */
+/*!
+  The Units object is created by specifying its name and short name, and the integer powers 
+  for the seven SI base physical quantities (length, mass, time \ldots), and the value of the 
+  unit in term of the SI unit.
+*/
 Units::Units(const char* nom, const char* snom, int m, int kg, int s, r_8 val, int A, int K, int mol, int cd)
   : mLength_(m), mMass_(kg), mTime_(s), mCurr_(A), 
@@ -38,4 +51,13 @@
 {
   Set(un);
+}
+
+/* --Methode-- */
+Units::Units(Units const& un, r_8 scale, const char* nom, const char* snom)
+{
+  Set(un);
+  mSI_Value_*=scale;
+  mName_=nom;
+  mShortName_=snom;
 }
 
@@ -179,8 +201,18 @@
    \class PhysQty
    \ingroup BaseTools
-   Class for representing physical quantities and constants 
+   Class for representing physical quantities and constants. A physical quantity 
+   has a unit and a value, and optionally a precision and/or a name. A number of
+   physical constants and standard quantities can be obtained as PhysQty objects 
+   through static methods.
    
+   \sa SOPHYA::Units 
+
    \code
-   // Create ....
+   cout <<  " k_Boltzmann: " << PhysQty::k() << endl;
+   cout <<  " m_e: " << PhysQty::electron_mass() << endl;
+   // Conversion of a quantity to a different unit 
+   PhysQty aj(Units::joule(), 25.); 
+   PhysQty aev=aj.ConvertTo(Units::electronvolt().giga());
+   cout <<  " A : " << aj << " -> " << aev << endl;
    \endcode
 */
@@ -191,4 +223,5 @@
 
 /* --Methode-- */
+//! Default constructor: zero valued dimensionless quantity 
 PhysQty::PhysQty()
   : unit_(), val_(0.), prec_(0.)
@@ -197,4 +230,9 @@
 
 /* --Methode-- */
+/*! 
+  \brief standard constructor
+  The object is constructed through the specification of the unit \b u, the value \b val, 
+  and optional relative precision \b prec (=delta val/val) and an optional name.
+*/
 PhysQty::PhysQty(Units const & u, r_8 val, r_8 prec, const char* nom)
   : unit_(u), val_(val), prec_(prec), name_((nom==NULL)?"":nom)
@@ -203,4 +241,5 @@
 
 /* --Methode-- */
+//! Copy constructor
 PhysQty::PhysQty(PhysQty const & qty)
   : unit_(qty.unit_), val_(qty.val_), prec_(qty.prec_), name_(qty.name_)
Index: /trunk/SophyaLib/BaseTools/sunitpcst.h
===================================================================
--- /trunk/SophyaLib/BaseTools/sunitpcst.h	(revision 4061)
+++ /trunk/SophyaLib/BaseTools/sunitpcst.h	(revision 4062)
@@ -32,7 +32,13 @@
 
 public:
+  //! Default constructor - creates a dimensionless object = 1 
   Units();
+  //! Copy constructor 
   Units(Units const& un);
+  //! Base constructor  
   Units(const char* nom, const char* snom, int m, int kg, int s, r_8 val=1., int A=0, int K=0, int mol=0, int cd=0);
+  //! Constructor from an existing unit, but with a scaling factor and new name    
+  Units(Units const& un, r_8 scale, const char* nom, const char* snom);
+
   virtual ~Units();
 
@@ -88,4 +94,5 @@
 
   // Les unites usuelles - Voir definition et convention sur 
+  //  http://www.bipm.org/fr/si/   et  http://physics.nist.gov/cuu/Units/
   inline static Units meter()
   { return Units("meter","m",1,0,0); }
@@ -153,4 +160,6 @@
   inline static Units radian()
   { return Units("radian","rad",0,0,0,1);  }
+  inline static Units degree()
+  { return Units("degree","deg",0,0,0,M_PI/180.);  }
   inline static Units steradian()
   { return Units("steradian","sr",0,0,0,1);  }
@@ -219,11 +228,17 @@
   //! Return the physical quantity value in SI units 
   inline r_8 SIValue()  const { return val_*unit_.SIValue(); }
+  //! Return the associated unit 
   inline Units getUnit()  {return unit_; }
+  //! Return the associated value
   inline r_8 Value()  const { return val_; }
+  //! Change the value of the physical quantity 
   inline void setValue(r_8 val)  { val_=val; }
+  //! Return the relative precision 
   inline r_8 RelativePrecision()  const { return prec_; }
+  //! Change the relative precision 
   inline void setRelativePrecision(r_8 prec) { prec_=prec; }
+  //! Return the absolute precision 
   inline r_8 AbsolutePrecision() const { return prec_*val_; }
-  //! return the unit name 
+  //! Return the associoated name
   inline string const& Name() const { return name_; }
 
Index: /trunk/SophyaLib/BaseTools/sversion.h
===================================================================
--- /trunk/SophyaLib/BaseTools/sversion.h	(revision 4061)
+++ /trunk/SophyaLib/BaseTools/sversion.h	(revision 4062)
@@ -3,5 +3,5 @@
 
 #define SOPHYA_VERSION   2.2
-#define SOPHYA_REVISION  22
+#define SOPHYA_REVISION  30
 #define SOPHYA_TAG       "V_Avr2012"
 
