Index: trunk/SophyaLib/NTools/poly.h
===================================================================
--- trunk/SophyaLib/NTools/poly.h	(revision 938)
+++ trunk/SophyaLib/NTools/poly.h	(revision 958)
@@ -1,5 +1,5 @@
 // This may look like C code, but it is really -*- C++ -*-
 //
-// $Id: poly.h,v 1.7 2000-04-14 16:14:31 ansari Exp $
+// $Id: poly.h,v 1.8 2000-04-18 13:38:36 ansari Exp $
 //
 
@@ -21,4 +21,5 @@
 
 //////////////////////////////////////////////////////////////////////////
+//! Class of 1 dimension polynomials P(x)
 class Poly : public TVector<r_8> {
   friend class ObjFileIO<Poly>;
@@ -27,14 +28,26 @@
   Poly(Poly const& a);
 
+  //! Return degre of polynomials
   inline int Degre() const {UpdateDegIfDirty(); return deg;}
 
+  //! Return space for a \b n degre polynomial
+  /*!
+    \param \b n : degre of new polynomial
+    \param \b force : force re-allocation if true,\
+                 if not allocation occurs only
+                 if space needed is greater than the old one
+  */
   inline void Realloc(int n, bool force=false)
                      {TVector<r_8>::Realloc(n+1,force);}
 
   //  Pour compatibilite PEIDA  - Reza 03/2000
+  //! Return coefficient of degre \b i
   inline double Element(int i) const { return Elem(i,0,0,0,0); } 
+  //! Return coefficient of degre \b i
   inline double & Element(int i)  { return Elem(i,0,0,0,0); } 
 
+  //! Return coefficient of degre \b i
   inline double operator[](int i) const {return Elem(i,0,0,0,0);}
+  //! Return coefficient of degre \b i
   inline double& operator[](int i) {dirty = 1; return Elem(i,0,0,0,0);}
   // Retourne le coefficient de degre i
@@ -87,24 +100,38 @@
 };
 
+/*! \ingroup NTools \fn operator*(Poly const&,Poly const&)
+  \brief perform and return P(X) = a(x) * b(x) */
 inline Poly operator* (Poly const& a, Poly const& b)
   { return a.Mult(b); }
 
+/*! \ingroup NTools \fn operator+(Poly const&,Poly const&)
+  \brief perform and return P(X) = a(x) + b(x) */
 inline Poly operator+ (Poly const& a, Poly const& b)
  { Poly c((a.Degre() > b.Degre())?(a.Degre()+1):(b.Degre()+1));
    c = a; c += b; return c; }
 
+/*! \ingroup NTools \fn operator-(Poly const&,Poly const&)
+  \brief perform and return P(X) = a(x) - b(x) */
 inline Poly operator- (Poly const& a, Poly const& b)
   { Poly c((a.Degre() > b.Degre())?(a.Degre()+1):(b.Degre()+1));
     c = a; c -= b; return c; }
 
+/*! \ingroup NTools \fn operator*(double,Poly const&)
+  \brief perform and return P(X) = a * b(x) */
 inline Poly operator* (double a, Poly const& b)
   { Poly c(b); c *= a; return c; }
 
+/*! \ingroup NTools \fn operator<<(ostream&,const Poly&)
+  \brief Print a(x) on stream \b s */
 inline ostream& operator << (ostream& s, const Poly& a)
   { a.Print(s); return s; }
 
 //////////////////////////////////////////////////////////////////////////
+/*! \ingroup NTools \fn operator<<(POutPersist&,Poly&)
+  \brief For persistance management */
 inline POutPersist& operator << (POutPersist& os, Poly & obj)
   { ObjFileIO<Poly> fio(&obj);  fio.Write(os);  return(os); }
+/*! \ingroup NTools \fn operator<<(PInPersist&,,Poly&)
+  \brief For persistance management */
 inline PInPersist& operator >> (PInPersist& is, Poly & obj)
   { ObjFileIO<Poly> fio(&obj);  fio.Read(is);  return(is); }
@@ -116,4 +143,5 @@
 
 //////////////////////////////////////////////////////////////////////////
+//! Class of 2 dimensions polynomials P(x,y)
 class Poly2 : public TVector<r_8> {
   friend class ObjFileIO<Poly2>;
@@ -124,13 +152,20 @@
   Poly2(Poly2 const& a);
 
+  //! Return polynomial partial degre for X
   inline int DegX() const {UpdateDegIfDirty(); return degX;}
+  //! Return polynomial partial degre for Y
   inline int DegY() const {UpdateDegIfDirty(); return degY;}
+  //! Return polynomial maximum partial degre for X
   inline int MaxDegX() const {return maxDegX;}
+  //! Return polynomial maximum partial degre for Y
   inline int MaxDegY() const {return maxDegY;}
+  //! Return polynomial total degre for X
   inline int Deg()  const {UpdateDegIfDirty(); return deg;}
   // les degres partiels en x et y, et totaux.
 
   //  Pour compatibilite PEIDA  - Reza 03/2000
+  //! Return coefficient of degre \b i
   inline double Element(int i) const { return Elem(i,0,0,0,0); } 
+  //! Return coefficient of degre \b i
   inline double & Element(int i)  { return Elem(i,0,0,0,0); } 
 
@@ -138,4 +173,5 @@
   // retourne la valeur en (x,y)
 
+  //! Return index of coefficient of X^dx * Y^dy in the vector
   inline int IndCoef(int dx, int dy) const {
     if (dx>maxDegX || dy>maxDegY) THROW(rangeCheckErr);
@@ -146,7 +182,9 @@
   // d'un fit...
 
+  //! Return coefficient of X^dx * Y^dy
   inline double Coef(int dx, int dy) const {
     return (dx>maxDegX || dy>maxDegY) ? 0 : Element(IndCoef(dx,dy));
   }
+  //! Return coefficient of X^dx * Y^dy
   inline double& Coef(int dx, int dy) {
     if (dx>maxDegX || dy>maxDegY) THROW(rangeCheckErr);
@@ -199,22 +237,36 @@
 };
 
+/*! \ingroup NTools \fn operator*(Poly2 const&,Poly2 const&)
+  \brief Perform P(x,y) = a(x,y) * b(x,y) */
 inline Poly2 operator* (Poly2 const& a, Poly2 const& b)
   { return a.Mult(b); }
 
+/*! \ingroup NTools \fn operator+(Poly2 const&,Poly2 const&)
+  \brief Perform P(x,y) = a(x,y) + b(x,y) */
 inline Poly2 operator+ (Poly2 const& a, Poly2 const& b)
   { Poly2 c(a); c += b; return c; }
 
+/*! \ingroup NTools \fn operator-(Poly2 const&,Poly2 const&)
+  \brief Perform P(x,y) = a(x,y) - b(x,y) */
 inline Poly2 operator- (Poly2 const& a, Poly2 const& b)
   { Poly2 c(a); c -= b; return c; }
 
+/*! \ingroup NTools \fn operator-(double,Poly2 const&)
+  \brief Perform P(x,y) = a * b(x,y) */
 inline Poly2 operator * (double a, Poly2 const& b)
   { Poly2 c(b); c *= a; return c; }
 
+/*! \ingroup NTools \fn operator<<(ostream&,const Poly2&)
+  \brief Print a(x,y) on stream \b s */
 inline ostream& operator << (ostream& s, const Poly2& a)
   { a.Print(s); return s; }
 
 //////////////////////////////////////////////////////////////////////////
+/*! \ingroup NTools \fn operator<<(POutPersist&,Poly2&)
+  \brief For persistance management */
 inline POutPersist& operator << (POutPersist& os, Poly2 & obj)
   { ObjFileIO<Poly2> fio(&obj);  fio.Write(os);  return(os); }
+/*! \ingroup NTools \fn operator<<(POutPersist&,Poly2&)
+  \brief For persistance management */
 inline PInPersist& operator >> (PInPersist& is, Poly2 & obj)
   { ObjFileIO<Poly2> fio(&obj);  fio.Read(is);  return(is); }
