Index: trunk/SophyaLib/TArray/basarr.cc
===================================================================
--- trunk/SophyaLib/TArray/basarr.cc	(revision 890)
+++ trunk/SophyaLib/TArray/basarr.cc	(revision 894)
@@ -9,6 +9,7 @@
 
 // Variables statiques globales
-char * BaseArray::ck_op_msg_[6] = {"???", "Size(int )", "IsPacked(int )", 
-		       "Stride(int )", "ElemCheckBound()", "operator()" };
+char * BaseArray::ck_op_msg_[6] =
+     {"???", "Size(int )", "IsPacked(int )"
+     ,"Stride(int )", "ElemCheckBound()", "operator()" };
 uint_4 BaseArray::max_nprt_ = 50;
 uint_4 BaseArray::prt_lev_ = 0;
@@ -19,5 +20,4 @@
 // ------ Methodes statiques globales --------
 
-//  1/ Gestion des impressions 
 //! Set maximum number of printed elements and print level
 /*!
@@ -41,4 +41,12 @@
 
 
+//! Compute totale size
+/*!
+  \param ndim : number of dimensions
+  \param siz : array of size along the \b ndim dimensions
+  \param step[ndim] : step value
+  \param offset : offset value
+  \return Total size of the array
+*/
 uint_8 BaseArray::ComputeTotalSize(uint_4 ndim, const uint_4 * siz, uint_4 step, uint_8 offset)
 {
@@ -48,4 +56,37 @@
 }
 
+//! Set Default Memory Mapping
+/*!
+  \param mm : Memory Mapping type
+  \verbatim
+     mm == CMemoryMapping : C like memory mapping
+     mm == FortranMemoryMapping : Fortran like memory mapping
+  \endverbatim
+  \verbatim
+  # ===== For Matrices
+  *** MATHEMATICS:   m(row,column) with indexes running [1,n])
+                          | 11 12 13 |
+     matrix Math = Mmath= | 21 22 23 |
+                          | 31 32 33 |
+  *** IDL, \b FORTRAN: indexes data in \b row-major format:
+     indexes arrays in (column,row) order.
+     index IDL running [0,n[ ; index FORTRAN running [1,n]
+     M in memory: [ 11 12 13 : 21 22 23 : 31 32 33 : ... ]
+                     line 1  : line 2   : line 3  : ...
+     ex: Midl(0,2) = Mfor(1,3) = Mmath(3,1) = 31
+         Midl(2,0) = Mfor(3,1) = Mmath(1,3) = 13
+  *** C: indexes data in \b column-major format:
+     indexes arrays in [row][column] order.
+     index C running [0,n[
+     M in memory: [ 11 21 31 : 12 22 32 : 13 23 33 : ... ]
+                    column 1 : column 2 : column 3 : ...
+     ex: Mc[2][0] = Mmath(3,1) = 31
+         Mc[0][2] = Mmath(1,3) = 13
+  *** RESUME diff Idl/Fortan/C/Math:
+    Midl(col-1,row-1) = Mfor(col,row) = Mc[row-1][col-1] = Mmath(row,col)
+    TRANSPOSE(column-major array) --> row-major array
+  \endverbatim
+  \return default memory mapping value
+ */
 short BaseArray::SetDefaultMemoryMapping(short mm)
 {
@@ -54,4 +95,9 @@
 }
 
+//! Set Default Vector Type
+/*!
+  \param vt : vector type (ColumnVector,RowVector)
+  \return default vector type value
+ */
 short BaseArray::SetDefaultVectorType(short vt)
 {
@@ -60,12 +106,24 @@
 }
 
-// Memory organisation 
+//! Select Memory Mapping
+/*!
+  Do essentially nothing.
+  \param mm : type of Memory Mapping (CMemoryMapping,FortranMemoryMapping)
+  \return return \b mm if it makes sense or default memory mapping value
+  \sa SetDefaultMemoryMapping
+ */
 short BaseArray::SelectMemoryMapping(short mm)
-// si mm == CMemoryMapping, elements d'une ligne suivant X (consecutif)
-// sinon (mm == FortranMemoryMapping)  elements d'une colonne suivant X 
 {
   if ( (mm == CMemoryMapping) || (mm == FortranMemoryMapping) )  return (mm) ; 
   else return (default_memory_mapping);
 }
+
+//! Select Vector type
+/*!
+  Do essentially nothing.
+  \param vt : vector type (ColumnVector,RowVector)
+  \return return \b vt if it makes sense or default vector type
+  \sa SetDefaultVectorType
+ */
 short BaseArray::SelectVectorType(short vt)
 {
@@ -74,4 +132,10 @@
 }
 
+//! Update Memory Mapping
+/*!
+  Update variables marowi_ macoli_ veceli_
+  \param mm : type of Memory Mapping (CMemoryMapping,FortranMemoryMapping)
+  \sa SetDefaultMemoryMapping
+ */
 void BaseArray::UpdateMemoryMapping(short mm)
 {
@@ -94,4 +158,11 @@
 }
 
+//! Update Memory Mapping
+/*!
+  \param a  : Array to be compared with
+  \param mm : type of Memory Mapping or memory mapping transfert
+       (SameMemoryMapping,AutoMemoryMapping,CMemoryMapping,FortranMemoryMapping)
+  \sa SetDefaultMemoryMapping
+ */
 void BaseArray::UpdateMemoryMapping(BaseArray const & a, short mm)
 {
@@ -119,4 +190,11 @@
 }
 
+//! Set Memory Mapping type
+/*!
+  Compute values for variables marowi_ macoli_ veceli_
+  \param mm : Memory Mapping type (SameMemoryMapping,AutoMemoryMapping
+                                  ,CMemoryMapping,FortranMemoryMapping)
+  \sa SetDefaultMemoryMapping
+ */
 void BaseArray::SetMemoryMapping(short mm)
 {
@@ -140,4 +218,10 @@
 }
 
+//! Set Vector Type
+/*!
+  Compute values for variable veceli_
+  \param vt : vector type ()
+  \sa SetDefaultVectorType
+ */
 void BaseArray::SetVectorType(short vt)
 {
@@ -184,8 +268,8 @@
 
 
-//! Returns true if \b ndim and \b sizes are equal
+//! Returns true if dimension and sizes are equal
 /*!
   \param a : array to be compared
-  \return true if ndim and sizes are equal, false if not
+  \return true if ndim and sizes[ndim] are equal, false if not
 */
 bool BaseArray::CompareSizes(const BaseArray& a)
@@ -201,4 +285,5 @@
 }
 
+//! Change dimension if some size == 1
 void BaseArray::CompactAllDim()
 {
@@ -223,4 +308,5 @@
 }
 
+//! Change dimension if some trailed size == 1
 void BaseArray::CompactTrailingDim()
 {
@@ -240,5 +326,5 @@
 }
 
-
+//! return minimum value for step[ndim]
 uint_4 BaseArray::MinStepKA() const
 {
@@ -248,4 +334,5 @@
 }
 
+//! return maximum value for step[ndim]
 uint_4 BaseArray::MaxSizeKA() const
 {
@@ -262,4 +349,5 @@
 // Position de l'element 0 du vecteur i selon l'axe ka
 // --------------------------------------------------
+//! return position of first element for vector \b i alond \b ka th axe.
 uint_8 BaseArray::Offset(uint_4 ka, uint_8 i) const
 {
@@ -285,4 +373,5 @@
 }
 
+//! return position of element \b ip.
 uint_8 BaseArray::Offset(uint_8 ip) const
 {
@@ -317,4 +406,5 @@
 // ----------------------------------------------------
 
+//! Show infos on stream \b os (\b si to display DvList)
 void BaseArray::Show(ostream& os, bool si) const
 {
@@ -345,4 +435,5 @@
 }
 
+//! Return BaseArray Type
 string BaseArray::InfoString() const
 {
@@ -352,4 +443,5 @@
 }
 
+//! Return attached DVList
 DVList& BaseArray::Info()
 {
@@ -358,5 +450,13 @@
 }
 
-
+//! Update sizes and information for array
+/*!
+  \param ndim : dimension
+  \param siz[ndim] : sizes
+  \param step : step (must be the same on all dimensions)
+  \param offset : offset of the first element
+  \return true if all OK, false if problems appear
+  \return string \b exmsg for explanation in case of problems
+ */
 bool BaseArray::UpdateSizes(uint_4 ndim, const uint_4 * siz, uint_4 step, uint_8 offset, string & exmsg)
 {
@@ -402,4 +502,13 @@
 }
 
+//! Update sizes and information for array
+/*!
+  \param ndim : dimension
+  \param siz[ndim] : sizes
+  \param step[ndim] : steps
+  \param offset : offset of the first element
+  \return true if all OK, false if problems appear
+  \return string \b exmsg for explanation in case of problems
+ */
 bool BaseArray::UpdateSizes(uint_4 ndim, const uint_4 * siz, const uint_4 * step, uint_8 offset, string & exmsg)
 {
@@ -450,4 +559,10 @@
 }
 
+//! Update sizes and information relative to array \b a
+/*!
+  \param a : array to be compare with
+  \return true if all OK, false if problems appear
+  \return string \b exmsg for explanation in case of problems
+ */
 bool BaseArray::UpdateSizes(const BaseArray& a, string & exmsg)
 {
@@ -492,4 +607,13 @@
 
 
+//! Update sizes and information relative to array \b a
+/*!
+  \param a : array to be compare with
+  \param ndim : could be change (but should be less than the ndim of the current class)
+  \param siz[ndim],pos[ndim],step[ndim] : could be changed but must be
+             compatible within the memory size with those of the current class.
+  \return true if all OK, false if problems appear
+  \return string \b exmsg for explanation in case of problems
+ */
 void BaseArray::UpdateSubArraySizes(BaseArray & ra, uint_4 ndim, uint_4 * siz, uint_4 * pos, uint_4 * step) const
 {
