Index: trunk/SophyaProg/Tests/carrt.cc
===================================================================
--- trunk/SophyaProg/Tests/carrt.cc	(revision 2582)
+++ trunk/SophyaProg/Tests/carrt.cc	(revision 2586)
@@ -290,4 +290,56 @@
   else cout << "(13) OK  Test (3*A).DivElt(B+2,C)  OK " << endl; 
   
+  a = 3;
+  b = 2;
+  int_4 sc = a.ScalarProduct(b);
+  if (prtlev > 0)  cout << "(14) A=3, B=3, a.ScalarProduct(b)= " << sc << endl;
+  if (sc != nr*nc*6)   {
+    cout << "(14) !!! ERROR Test  a.ScalarProduct(b) sc " << sc << " !=" << nr*nc*6 << endl;
+    rc += 2048;
+  }
+  else cout << "(14) OK  Test a.ScalarProduct(b)  OK " << endl; 
+
+  TMatrix<int_4> mx(nr, nc), mxc(nr,nc);
+  for(int ir=0; ir<nr; ir++)
+    for(int ic=0; ic<nc; ic++) mxc(ir, ic) = ir*1000+ic*6;
+  if (prtlev > 0)  cout << "(15) mx.Row()/Column() operations MXC=" << mxc << endl;
+  
+  TVector<int_4> cv(nr), rv(nc, BaseArray::RowVector);
+  cv = RegularSequence(0, 1);
+  rv = RegularSequence(0, 1);
+  for(int ir=0; ir<nr; ir++)  { 
+    mx.Row(ir) = rv*3;
+    mx.Row(ir) *= 2;
+  }
+  for(int ic=0; ic<nc; ic++)  { 
+    mx.Column(ic) += cv*1000;
+  }
+  TMatrix<int_4> mxd = mx-mxc;
+  if (prtlev > 0)  { 
+    cout << "(15)  MX=" << mx << endl;
+    cout << "(15)  MXD=" << mxd << endl;
+  }
+  getMinMax(mxd, min, max);
+  if ((min != 0) || (max != 0)) {
+    cout << "(15) !!! ERROR Test mx.Row()/Column() operations Min=" << min << " Max=" << max << endl;
+    rc += 8192;
+  }
+  else cout << "(15) OK  Test mx.Row()/Column() operations  OK " << endl; 
+
+  a = RegularSequence(1, 1);
+  b = -a; 
+  c = a+b;
+  if (prtlev > 0) {
+    cout << "(16) A =  " << a << endl;
+    cout << "(16) B =  ((? == -A)" << b << endl;
+    cout << "(16) C = A+B  " << c << endl;
+  }
+  getMinMax(c, min, max);
+  if ((min != 0) || (max != 0)) {
+    cout << "(16) !!! ERROR Test B=-A  Min=" << min << " Max=" << max << endl;
+    rc += 256;
+  }
+  else cout << "(16) OK   Test B=-A  OK " << endl; 
+  
   return(rc);
 }
@@ -297,5 +349,5 @@
   cout << "\n -----> Testing TMatrix operation TMatrix<r_4>(nr=" << nr << ",nc=" 
        << nc << " ) " << endl;
-  cout << " ----> ODO (Diff. Mem. Mapping) A,CC: CMemoryMapping AR,B,C: FortranMemoryMapping" << endl;
+  cout << " --> ODO (Diff. Mem. Mapping) A,CC: CMemoryMapping AR,B,C: FortranMemoryMapping" << endl;
 
   int rc = 0;
@@ -413,6 +465,6 @@
 // Operation de type array +-*/ array 
 
-  a = 10;
-  b = 4;
+  a = 10.;
+  b = 4.;
 
   (3.f*a).SubElt(2.f*b,c);
@@ -490,5 +542,64 @@
   }
   else cout << "(17) OK  Test (3*A).DivElt(B+2,CC)  OK " << endl; 
+
+  a = 3.1;
+  b = -2.2;
+  r_4 sc = a.ScalarProduct(b);
+  r_4 sce = 0.;
+  for(int kkk=0; kkk<nr*nc; kkk++) sce += -2.2*3.1;
+  if (prtlev > 0)  cout << "(18) A=3, B=3, a.ScalarProduct(b)= " << sc << endl;
+  sc -= sce;
+  if ((fabs(sc) > 0.00001) || (fabs(sc) > 0.00001)) {
+    cout << "(18) !!! ERROR Test  a.ScalarProduct(b) sc-" <<  sce
+	 << " = " << sc << endl;
+    rc += 32768;
+  }
+  else cout << "(18) OK  Test a.ScalarProduct(b)  OK " << endl; 
+
+  TMatrix<r_4> mx(nr, nc), mxc(nr,nc,BaseArray::FortranMemoryMapping);
+  for(int ir=0; ir<nr; ir++)
+    for(int ic=0; ic<nc; ic++) mxc(ir, ic) = ir*1000+ic*6;
+  if (prtlev > 0)  cout << "(19) mx.Row()/Column() operations MXC=" << mxc << endl;
+  
+  TVector<r_4> cv(nr), rv(nc, BaseArray::RowVector, BaseArray::FortranMemoryMapping);
+  cv = RegularSequence(0, 1);
+  rv = RegularSequence(0, 1);
+  for(int ir=0; ir<nr; ir++)  { 
+    mx.Row(ir) = rv*3.f;
+    mx.Row(ir) *= 2.f;
+  }
+  for(int ic=0; ic<nc; ic++)  { 
+    mx.Column(ic) += cv*1000.f;
+  }
+  TMatrix<r_4> mxd = mx-mxc;
+  if (prtlev > 0)  { 
+    cout << "(19)  MX=" << mx << endl;
+    cout << "(19)  MXD=" << mxd << endl;
+  }
+  getMinMax(mxd, min, max);
+  if ((fabs(min) > 0.0001) || (fabs(max) > 0.0001)) {
+    cout << "(19) !!! ERROR Test mx.Row()/Column() operations Min=" << min << " Max=" << max << endl;
+    rc += 65536;
+  }
+  else cout << "(19) OK  Test mx.Row()/Column() operations  OK " << endl; 
+
+  a = RegularSequence(3.14, 1.3);
+  b = -a; 
+  c = a+b;
+  if (prtlev > 0) {
+    cout << "(20) A =  " << a << endl;
+    cout << "(20) B =  ((? == -A)" << b << endl;
+    cout << "(16) C = A+B  " << c << endl;
+  }
+  getMinMax(c, min, max);
+  if ((fabs(min) > 0.0001) || (fabs(max) > 0.0001)) {
+    cout << "(20) !!! ERROR Test B=-A  Min=" << min << " Max=" << max << endl;
+    rc += 131072;
+  }
+  else cout << "(20) OK   Test B=-A  OK " << endl; 
+  
   return(rc);
 
+  return(rc);
+
 }
