Index: trunk/SophyaProg/Tests/Makefile
===================================================================
--- trunk/SophyaProg/Tests/Makefile	(revision 3810)
+++ trunk/SophyaProg/Tests/Makefile	(revision 3811)
@@ -1,5 +1,5 @@
 include ../BuildMgr/sophyamake.inc
  
-PROGS = $(SOPHYAEXEP)arrt $(SOPHYAEXEP)carrt $(SOPHYAEXEP)lpk $(SOPHYAEXEP)obj_fits $(SOPHYAEXEP)ovharr $(SOPHYAEXEP)pizthr $(SOPHYAEXEP)ppftswap $(SOPHYAEXEP)spar $(SOPHYAEXEP)sphg0 $(SOPHYAEXEP)sph2lm $(SOPHYAEXEP)tcmd $(SOPHYAEXEP)tcxxcmpldynl $(SOPHYAEXEP)tdcr $(SOPHYAEXEP)tdynl $(SOPHYAEXEP)tfft $(SOPHYAEXEP)thash $(SOPHYAEXEP)timg $(SOPHYAEXEP)tmxv $(SOPHYAEXEP)tnt $(SOPHYAEXEP)tobjio2 $(SOPHYAEXEP)tobjio $(SOPHYAEXEP)tpipe $(SOPHYAEXEP)tsimplex $(SOPHYAEXEP)tsphereecp $(SOPHYAEXEP)tspm2 $(SOPHYAEXEP)tspm $(SOPHYAEXEP)tstboloread $(SOPHYAEXEP)tstcolread $(SOPHYAEXEP)tstdtable $(SOPHYAEXEP)tstndblk $(SOPHYAEXEP)tstppfwrapstl $(SOPHYAEXEP)tstsegdb $(SOPHYAEXEP)tswfits $(SOPHYAEXEP)tnfits $(SOPHYAEXEP)tfitsdt $(SOPHYAEXEP)tsttmat $(SOPHYAEXEP)tsttminv $(SOPHYAEXEP)tsttvec $(SOPHYAEXEP)ttimestamp $(SOPHYAEXEP)zthr $(SOPHYAEXEP)tmtrnd $(SOPHYAEXEP)tmtrnd3 $(SOPHYAEXEP)tmtdt $(SOPHYAEXEP)tparlex
+PROGS = $(SOPHYAEXEP)arrt $(SOPHYAEXEP)carrt $(SOPHYAEXEP)lpk $(SOPHYAEXEP)obj_fits $(SOPHYAEXEP)ovharr $(SOPHYAEXEP)pizthr $(SOPHYAEXEP)ppftswap $(SOPHYAEXEP)spar $(SOPHYAEXEP)sphg0 $(SOPHYAEXEP)sph2lm $(SOPHYAEXEP)tcmd $(SOPHYAEXEP)tcxxcmpldynl $(SOPHYAEXEP)tdcr $(SOPHYAEXEP)tdynl $(SOPHYAEXEP)tfft $(SOPHYAEXEP)thash $(SOPHYAEXEP)timg $(SOPHYAEXEP)tmxv $(SOPHYAEXEP)tnt $(SOPHYAEXEP)tobjio2 $(SOPHYAEXEP)tobjio $(SOPHYAEXEP)tpipe $(SOPHYAEXEP)tsimplex $(SOPHYAEXEP)tsphereecp $(SOPHYAEXEP)tspm2 $(SOPHYAEXEP)tspm $(SOPHYAEXEP)tstboloread $(SOPHYAEXEP)tstcolread $(SOPHYAEXEP)tstdtable $(SOPHYAEXEP)tstndblk $(SOPHYAEXEP)tstppfwrapstl $(SOPHYAEXEP)tstsegdb $(SOPHYAEXEP)tswfits $(SOPHYAEXEP)tnfits $(SOPHYAEXEP)tfitsdt $(SOPHYAEXEP)tsttmat $(SOPHYAEXEP)tsttminv $(SOPHYAEXEP)tsttvec $(SOPHYAEXEP)ttimestamp $(SOPHYAEXEP)zthr $(SOPHYAEXEP)tmtrnd $(SOPHYAEXEP)tmtrnd3 $(SOPHYAEXEP)tmtdt $(SOPHYAEXEP)tparlex $(SOPHYAEXEP)tssqmx
  
 all: $(PROGS)
@@ -7,5 +7,5 @@
 clean:
 	rm -f $(PROGS)
-	rm -f $(SOPHYAOBJP)tparlex.o $(SOPHYAOBJP)tmtdt.o $(SOPHYAOBJP)tmtrnd3.o $(SOPHYAOBJP)tmtrnd.o $(SOPHYAOBJP)zthr.o $(SOPHYAOBJP)ttimestamp.o $(SOPHYAOBJP)tsttvec.o $(SOPHYAOBJP)tsttminv.o $(SOPHYAOBJP)tsttmat.o $(SOPHYAOBJP)tfitsdt.o $(SOPHYAOBJP)tnfits.o $(SOPHYAOBJP)tswfits.o $(SOPHYAOBJP)tstsegdb.o $(SOPHYAOBJP)tstppfwrapstl.o $(SOPHYAOBJP)tstndblk.o $(SOPHYAOBJP)tstdtable.o $(SOPHYAOBJP)tstcolread.o $(SOPHYAOBJP)tstboloread.o $(SOPHYAOBJP)tspm.o $(SOPHYAOBJP)tspm2.o $(SOPHYAOBJP)tsphereecp.o $(SOPHYAOBJP)tsimplex.o $(SOPHYAOBJP)tpipe.o $(SOPHYAOBJP)tobjio.o $(SOPHYAOBJP)tobjio2.o $(SOPHYAOBJP)tnt.o $(SOPHYAOBJP)tmxv.o $(SOPHYAOBJP)timg.o $(SOPHYAOBJP)thash.o $(SOPHYAOBJP)tfft.o $(SOPHYAOBJP)tdynl.o $(SOPHYAOBJP)tdcr.o $(SOPHYAOBJP)tcxxcmpldynl.o $(SOPHYAOBJP)tcmd.o $(SOPHYAOBJP)sph2lm.o $(SOPHYAOBJP)sphg0.o $(SOPHYAOBJP)spar.o $(SOPHYAOBJP)ppftswap.o $(SOPHYAOBJP)pizthr.o $(SOPHYAOBJP)ovharr.o $(SOPHYAOBJP)obj_fits.o $(SOPHYAOBJP)lpk.o $(SOPHYAOBJP)carrt.o $(SOPHYAOBJP)arrt.o
+	rm -f $(SOPHYAOBJP)tssqmx.o $(SOPHYAOBJP)tparlex.o $(SOPHYAOBJP)tmtdt.o $(SOPHYAOBJP)tmtrnd3.o $(SOPHYAOBJP)tmtrnd.o $(SOPHYAOBJP)zthr.o $(SOPHYAOBJP)ttimestamp.o $(SOPHYAOBJP)tsttvec.o $(SOPHYAOBJP)tsttminv.o $(SOPHYAOBJP)tsttmat.o $(SOPHYAOBJP)tfitsdt.o $(SOPHYAOBJP)tnfits.o $(SOPHYAOBJP)tswfits.o $(SOPHYAOBJP)tstsegdb.o $(SOPHYAOBJP)tstppfwrapstl.o $(SOPHYAOBJP)tstndblk.o $(SOPHYAOBJP)tstdtable.o $(SOPHYAOBJP)tstcolread.o $(SOPHYAOBJP)tstboloread.o $(SOPHYAOBJP)tspm.o $(SOPHYAOBJP)tspm2.o $(SOPHYAOBJP)tsphereecp.o $(SOPHYAOBJP)tsimplex.o $(SOPHYAOBJP)tpipe.o $(SOPHYAOBJP)tobjio.o $(SOPHYAOBJP)tobjio2.o $(SOPHYAOBJP)tnt.o $(SOPHYAOBJP)tmxv.o $(SOPHYAOBJP)timg.o $(SOPHYAOBJP)thash.o $(SOPHYAOBJP)tfft.o $(SOPHYAOBJP)tdynl.o $(SOPHYAOBJP)tdcr.o $(SOPHYAOBJP)tcxxcmpldynl.o $(SOPHYAOBJP)tcmd.o $(SOPHYAOBJP)sph2lm.o $(SOPHYAOBJP)sphg0.o $(SOPHYAOBJP)spar.o $(SOPHYAOBJP)ppftswap.o $(SOPHYAOBJP)pizthr.o $(SOPHYAOBJP)ovharr.o $(SOPHYAOBJP)obj_fits.o $(SOPHYAOBJP)lpk.o $(SOPHYAOBJP)carrt.o $(SOPHYAOBJP)arrt.o
  
 arrt: $(SOPHYAEXEP)arrt
@@ -228,4 +228,9 @@
 $(SOPHYAEXEP)tparlex: $(SOPHYAOBJP)tparlex.o
 	$(CXXLINK) $(CXXTEMPFLG) -o $@ $(SOPHYAOBJP)tparlex.o $(SOPHYAALLSLBLIST)
+ 
+tssqmx: $(SOPHYAEXEP)tssqmx
+	echo $@ " done"
+$(SOPHYAEXEP)tssqmx: $(SOPHYAOBJP)tssqmx.o
+	$(CXXLINK) $(CXXTEMPFLG) -o $@ $(SOPHYAOBJP)tssqmx.o $(SOPHYAALLSLBLIST)
  
 $(SOPHYAOBJP)arrt.o: arrt.cc $(SOPHYAINCP)sopnamsp.h \
@@ -278,5 +283,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)timing.h
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)timing.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  arrt.cc
  
@@ -330,5 +347,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)timing.h
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)timing.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  carrt.cc
  
@@ -385,5 +414,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)timing.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)timing.h \
   $(SOPHYAINCP)intflapack.h \
   $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)tarray.h \
@@ -465,5 +506,16 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  obj_fits.cc
  
@@ -517,7 +569,18 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)ctimer.h \
-  $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)timing.h \
-  $(SOPHYAINCP)srandgen.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)ctimer.h $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)timing.h $(SOPHYAINCP)srandgen.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)randinterf.h
@@ -655,5 +718,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)timing.h
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)timing.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  pizthr.cc
  
@@ -706,5 +781,16 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
   $(SOPHYAINCP)fiondblock.h \
   $(SOPHYAINCP)machdefs.h \
@@ -764,6 +850,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)timing.h \
-  $(SOPHYAINCP)resusage.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)timing.h $(SOPHYAINCP)resusage.h \
   $(SOPHYAINCP)machdefs.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  spar.cc
@@ -1047,5 +1144,16 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
   $(SOPHYAINCP)cxxcmplnk.h \
   $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)pdlmgr.h \
@@ -1161,6 +1269,18 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)pdlmgr.h \
-  $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)timing.h
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)pdlmgr.h $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)timing.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  tdynl.cc
  
@@ -1366,7 +1486,18 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)cimage.h \
-  $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)fioarr.h \
-  $(SOPHYAINCP)srandgen.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)cimage.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)fioarr.h $(SOPHYAINCP)srandgen.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)randinterf.h \
@@ -1696,5 +1827,16 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
   $(SOPHYAINCP)fitsinoutfile.h \
   $(SOPHYAINCP)machdefs.h \
@@ -1844,8 +1986,11 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)randinterf.h \
-  $(SOPHYAINCP)fioarr.h $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)tmatrix.h \
-  $(SOPHYAINCP)tvector.h \
-  $(SOPHYAINCP)ppersist.h
+  $(SOPHYAINCP)arrctcast.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)fioarr.h \
+  $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)ppersist.h $(SOPHYAINCP)timing.h \
+  $(SOPHYAINCP)datatype.h \
+  $(SOPHYAINCP)machdefs.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  tobjio.cc
  
@@ -2116,13 +2261,23 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)samba.h \
-  $(SOPHYAINCP)alm.h $(SOPHYAINCP)randinterf.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)samba.h $(SOPHYAINCP)alm.h \
+  $(SOPHYAINCP)randinterf.h \
   $(SOPHYAINCP)nbmath.h $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)smathconst.h \
-  $(SOPHYAINCP)triangmtx.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)tvector.h $(SOPHYAINCP)bruit.h \
-  $(SOPHYAINCP)circle.h $(SOPHYAINCP)vector3d.h \
+  $(SOPHYAINCP)trngmtx.h $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)bruit.h $(SOPHYAINCP)circle.h \
+  $(SOPHYAINCP)vector3d.h \
   $(SOPHYAINCP)unitvector.h \
   $(SOPHYAINCP)utilgeom.h \
@@ -2397,4 +2552,59 @@
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  tspm2.cc
  
+$(SOPHYAOBJP)tssqmx.o: tssqmx.cc $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)osx_values.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)randinterf.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tmatrix_tsnl.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)fiospsqmtx.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)trngmtx.h $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)tarrinit.h \
+  $(SOPHYAINCP)sophyainit.h \
+  $(SOPHYAINCP)machdefs.h
+	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  tssqmx.cc
+ 
 $(SOPHYAOBJP)tstboloread.o: tstboloread.cc $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)machdefs.h \
@@ -2711,5 +2921,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)srandgen.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)srandgen.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)randinterf.h
@@ -2769,5 +2991,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)srandgen.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)srandgen.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)randinterf.h \
@@ -2829,5 +3063,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)srandgen.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)srandgen.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)randinterf.h
Index: trunk/SophyaProg/Tests/programs
===================================================================
--- trunk/SophyaProg/Tests/programs	(revision 3810)
+++ trunk/SophyaProg/Tests/programs	(revision 3811)
@@ -43,3 +43,4 @@
 tmtdt tmtdt.o
 tparlex tparlex.o
+tssqmx tssqmx.o
 
Index: trunk/SophyaProg/Tests/smakefile
===================================================================
--- trunk/SophyaProg/Tests/smakefile	(revision 3810)
+++ trunk/SophyaProg/Tests/smakefile	(revision 3811)
@@ -1,5 +1,5 @@
 include $(SOPHYABASE)/include/sophyamake.inc
  
-PROGS = $(SOPHYAEXEP)arrt $(SOPHYAEXEP)carrt $(SOPHYAEXEP)lpk $(SOPHYAEXEP)obj_fits $(SOPHYAEXEP)ovharr $(SOPHYAEXEP)pizthr $(SOPHYAEXEP)ppftswap $(SOPHYAEXEP)spar $(SOPHYAEXEP)sphg0 $(SOPHYAEXEP)sph2lm $(SOPHYAEXEP)tcmd $(SOPHYAEXEP)tcxxcmpldynl $(SOPHYAEXEP)tdcr $(SOPHYAEXEP)tdynl $(SOPHYAEXEP)tfft $(SOPHYAEXEP)thash $(SOPHYAEXEP)timg $(SOPHYAEXEP)tmxv $(SOPHYAEXEP)tnt $(SOPHYAEXEP)tobjio2 $(SOPHYAEXEP)tobjio $(SOPHYAEXEP)tpipe $(SOPHYAEXEP)tsimplex $(SOPHYAEXEP)tsphereecp $(SOPHYAEXEP)tspm2 $(SOPHYAEXEP)tspm $(SOPHYAEXEP)tstboloread $(SOPHYAEXEP)tstcolread $(SOPHYAEXEP)tstdtable $(SOPHYAEXEP)tstndblk $(SOPHYAEXEP)tstppfwrapstl $(SOPHYAEXEP)tstsegdb $(SOPHYAEXEP)tswfits $(SOPHYAEXEP)tnfits $(SOPHYAEXEP)tfitsdt $(SOPHYAEXEP)tsttmat $(SOPHYAEXEP)tsttminv $(SOPHYAEXEP)tsttvec $(SOPHYAEXEP)ttimestamp $(SOPHYAEXEP)zthr $(SOPHYAEXEP)tmtrnd $(SOPHYAEXEP)tmtrnd3 $(SOPHYAEXEP)tmtdt $(SOPHYAEXEP)tparlex
+PROGS = $(SOPHYAEXEP)arrt $(SOPHYAEXEP)carrt $(SOPHYAEXEP)lpk $(SOPHYAEXEP)obj_fits $(SOPHYAEXEP)ovharr $(SOPHYAEXEP)pizthr $(SOPHYAEXEP)ppftswap $(SOPHYAEXEP)spar $(SOPHYAEXEP)sphg0 $(SOPHYAEXEP)sph2lm $(SOPHYAEXEP)tcmd $(SOPHYAEXEP)tcxxcmpldynl $(SOPHYAEXEP)tdcr $(SOPHYAEXEP)tdynl $(SOPHYAEXEP)tfft $(SOPHYAEXEP)thash $(SOPHYAEXEP)timg $(SOPHYAEXEP)tmxv $(SOPHYAEXEP)tnt $(SOPHYAEXEP)tobjio2 $(SOPHYAEXEP)tobjio $(SOPHYAEXEP)tpipe $(SOPHYAEXEP)tsimplex $(SOPHYAEXEP)tsphereecp $(SOPHYAEXEP)tspm2 $(SOPHYAEXEP)tspm $(SOPHYAEXEP)tstboloread $(SOPHYAEXEP)tstcolread $(SOPHYAEXEP)tstdtable $(SOPHYAEXEP)tstndblk $(SOPHYAEXEP)tstppfwrapstl $(SOPHYAEXEP)tstsegdb $(SOPHYAEXEP)tswfits $(SOPHYAEXEP)tnfits $(SOPHYAEXEP)tfitsdt $(SOPHYAEXEP)tsttmat $(SOPHYAEXEP)tsttminv $(SOPHYAEXEP)tsttvec $(SOPHYAEXEP)ttimestamp $(SOPHYAEXEP)zthr $(SOPHYAEXEP)tmtrnd $(SOPHYAEXEP)tmtrnd3 $(SOPHYAEXEP)tmtdt $(SOPHYAEXEP)tparlex $(SOPHYAEXEP)tssqmx
  
 all: $(PROGS)
@@ -7,5 +7,5 @@
 clean:
 	rm -f $(PROGS)
-	rm -f $(SOPHYAOBJP)tparlex.o $(SOPHYAOBJP)tmtdt.o $(SOPHYAOBJP)tmtrnd3.o $(SOPHYAOBJP)tmtrnd.o $(SOPHYAOBJP)zthr.o $(SOPHYAOBJP)ttimestamp.o $(SOPHYAOBJP)tsttvec.o $(SOPHYAOBJP)tsttminv.o $(SOPHYAOBJP)tsttmat.o $(SOPHYAOBJP)tfitsdt.o $(SOPHYAOBJP)tnfits.o $(SOPHYAOBJP)tswfits.o $(SOPHYAOBJP)tstsegdb.o $(SOPHYAOBJP)tstppfwrapstl.o $(SOPHYAOBJP)tstndblk.o $(SOPHYAOBJP)tstdtable.o $(SOPHYAOBJP)tstcolread.o $(SOPHYAOBJP)tstboloread.o $(SOPHYAOBJP)tspm.o $(SOPHYAOBJP)tspm2.o $(SOPHYAOBJP)tsphereecp.o $(SOPHYAOBJP)tsimplex.o $(SOPHYAOBJP)tpipe.o $(SOPHYAOBJP)tobjio.o $(SOPHYAOBJP)tobjio2.o $(SOPHYAOBJP)tnt.o $(SOPHYAOBJP)tmxv.o $(SOPHYAOBJP)timg.o $(SOPHYAOBJP)thash.o $(SOPHYAOBJP)tfft.o $(SOPHYAOBJP)tdynl.o $(SOPHYAOBJP)tdcr.o $(SOPHYAOBJP)tcxxcmpldynl.o $(SOPHYAOBJP)tcmd.o $(SOPHYAOBJP)sph2lm.o $(SOPHYAOBJP)sphg0.o $(SOPHYAOBJP)spar.o $(SOPHYAOBJP)ppftswap.o $(SOPHYAOBJP)pizthr.o $(SOPHYAOBJP)ovharr.o $(SOPHYAOBJP)obj_fits.o $(SOPHYAOBJP)lpk.o $(SOPHYAOBJP)carrt.o $(SOPHYAOBJP)arrt.o
+	rm -f $(SOPHYAOBJP)tssqmx.o $(SOPHYAOBJP)tparlex.o $(SOPHYAOBJP)tmtdt.o $(SOPHYAOBJP)tmtrnd3.o $(SOPHYAOBJP)tmtrnd.o $(SOPHYAOBJP)zthr.o $(SOPHYAOBJP)ttimestamp.o $(SOPHYAOBJP)tsttvec.o $(SOPHYAOBJP)tsttminv.o $(SOPHYAOBJP)tsttmat.o $(SOPHYAOBJP)tfitsdt.o $(SOPHYAOBJP)tnfits.o $(SOPHYAOBJP)tswfits.o $(SOPHYAOBJP)tstsegdb.o $(SOPHYAOBJP)tstppfwrapstl.o $(SOPHYAOBJP)tstndblk.o $(SOPHYAOBJP)tstdtable.o $(SOPHYAOBJP)tstcolread.o $(SOPHYAOBJP)tstboloread.o $(SOPHYAOBJP)tspm.o $(SOPHYAOBJP)tspm2.o $(SOPHYAOBJP)tsphereecp.o $(SOPHYAOBJP)tsimplex.o $(SOPHYAOBJP)tpipe.o $(SOPHYAOBJP)tobjio.o $(SOPHYAOBJP)tobjio2.o $(SOPHYAOBJP)tnt.o $(SOPHYAOBJP)tmxv.o $(SOPHYAOBJP)timg.o $(SOPHYAOBJP)thash.o $(SOPHYAOBJP)tfft.o $(SOPHYAOBJP)tdynl.o $(SOPHYAOBJP)tdcr.o $(SOPHYAOBJP)tcxxcmpldynl.o $(SOPHYAOBJP)tcmd.o $(SOPHYAOBJP)sph2lm.o $(SOPHYAOBJP)sphg0.o $(SOPHYAOBJP)spar.o $(SOPHYAOBJP)ppftswap.o $(SOPHYAOBJP)pizthr.o $(SOPHYAOBJP)ovharr.o $(SOPHYAOBJP)obj_fits.o $(SOPHYAOBJP)lpk.o $(SOPHYAOBJP)carrt.o $(SOPHYAOBJP)arrt.o
  
 arrt: $(SOPHYAEXEP)arrt
@@ -228,4 +228,9 @@
 $(SOPHYAEXEP)tparlex: $(SOPHYAOBJP)tparlex.o
 	$(CXXLINK) $(CXXTEMPFLG) -o $@ $(SOPHYAOBJP)tparlex.o $(SOPHYAALLSLBLIST)
+ 
+tssqmx: $(SOPHYAEXEP)tssqmx
+	echo $@ " done"
+$(SOPHYAEXEP)tssqmx: $(SOPHYAOBJP)tssqmx.o
+	$(CXXLINK) $(CXXTEMPFLG) -o $@ $(SOPHYAOBJP)tssqmx.o $(SOPHYAALLSLBLIST)
  
 $(SOPHYAOBJP)arrt.o: arrt.cc $(SOPHYAINCP)sopnamsp.h \
@@ -278,5 +283,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)timing.h
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)timing.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  arrt.cc
  
@@ -330,5 +347,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)timing.h
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)timing.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  carrt.cc
  
@@ -385,5 +414,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)timing.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)timing.h \
   $(SOPHYAINCP)intflapack.h \
   $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)tarray.h \
@@ -465,5 +506,16 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  obj_fits.cc
  
@@ -517,7 +569,18 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)ctimer.h \
-  $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)timing.h \
-  $(SOPHYAINCP)srandgen.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)ctimer.h $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)timing.h $(SOPHYAINCP)srandgen.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)randinterf.h
@@ -655,5 +718,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)timing.h
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)timing.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  pizthr.cc
  
@@ -706,5 +781,16 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
   $(SOPHYAINCP)fiondblock.h \
   $(SOPHYAINCP)machdefs.h \
@@ -764,6 +850,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)timing.h \
-  $(SOPHYAINCP)resusage.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)timing.h $(SOPHYAINCP)resusage.h \
   $(SOPHYAINCP)machdefs.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  spar.cc
@@ -1047,5 +1144,16 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
   $(SOPHYAINCP)cxxcmplnk.h \
   $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)pdlmgr.h \
@@ -1161,6 +1269,18 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)pdlmgr.h \
-  $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)timing.h
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)pdlmgr.h $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)timing.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  tdynl.cc
  
@@ -1366,7 +1486,18 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)cimage.h \
-  $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)fioarr.h \
-  $(SOPHYAINCP)srandgen.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)cimage.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)fioarr.h $(SOPHYAINCP)srandgen.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)randinterf.h \
@@ -1696,5 +1827,16 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
   $(SOPHYAINCP)fitsinoutfile.h \
   $(SOPHYAINCP)machdefs.h \
@@ -1844,8 +1986,11 @@
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)randinterf.h \
-  $(SOPHYAINCP)fioarr.h $(SOPHYAINCP)machdefs.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)tmatrix.h \
-  $(SOPHYAINCP)tvector.h \
-  $(SOPHYAINCP)ppersist.h
+  $(SOPHYAINCP)arrctcast.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)fioarr.h \
+  $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)ppersist.h $(SOPHYAINCP)timing.h \
+  $(SOPHYAINCP)datatype.h \
+  $(SOPHYAINCP)machdefs.h
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  tobjio.cc
  
@@ -2116,13 +2261,23 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)samba.h \
-  $(SOPHYAINCP)alm.h $(SOPHYAINCP)randinterf.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)samba.h $(SOPHYAINCP)alm.h \
+  $(SOPHYAINCP)randinterf.h \
   $(SOPHYAINCP)nbmath.h $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)smathconst.h \
-  $(SOPHYAINCP)triangmtx.h \
-  $(SOPHYAINCP)ndatablock.h \
-  $(SOPHYAINCP)pexceptions.h \
-  $(SOPHYAINCP)tvector.h $(SOPHYAINCP)bruit.h \
-  $(SOPHYAINCP)circle.h $(SOPHYAINCP)vector3d.h \
+  $(SOPHYAINCP)trngmtx.h $(SOPHYAINCP)tvector.h \
+  $(SOPHYAINCP)bruit.h $(SOPHYAINCP)circle.h \
+  $(SOPHYAINCP)vector3d.h \
   $(SOPHYAINCP)unitvector.h \
   $(SOPHYAINCP)utilgeom.h \
@@ -2397,4 +2552,59 @@
 	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  tspm2.cc
  
+$(SOPHYAOBJP)tssqmx.o: tssqmx.cc $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)osx_values.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)timestamp.h \
+  $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)objfio.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)gnumd5.h \
+  $(SOPHYAINCP)ppfbinstream.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)rawstream.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)ppfnametag.h \
+  $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)randinterf.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)tarray.h \
+  $(SOPHYAINCP)machdefs.h $(SOPHYAINCP)basarr.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)anydataobj.h \
+  $(SOPHYAINCP)mutyv.h $(SOPHYAINCP)dvlist.h \
+  $(SOPHYAINCP)objfio.h $(SOPHYAINCP)mutyv.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)utilarr.h \
+  $(SOPHYAINCP)tmatrix_tsnl.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)fiospsqmtx.h \
+  $(SOPHYAINCP)machdefs.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)trngmtx.h $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)ppersist.h \
+  $(SOPHYAINCP)tarrinit.h \
+  $(SOPHYAINCP)sophyainit.h \
+  $(SOPHYAINCP)machdefs.h
+	$(CXXCOMPILE) $(CXXTEMPFLG) -o $@  tssqmx.cc
+ 
 $(SOPHYAOBJP)tstboloread.o: tstboloread.cc $(SOPHYAINCP)sopnamsp.h \
   $(SOPHYAINCP)machdefs.h \
@@ -2711,5 +2921,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)srandgen.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)srandgen.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)randinterf.h
@@ -2769,5 +2991,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)srandgen.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)srandgen.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)randinterf.h \
@@ -2829,5 +3063,17 @@
   $(SOPHYAINCP)tmatrix.h $(SOPHYAINCP)tvector.h \
   $(SOPHYAINCP)arrctcast.h \
-  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)srandgen.h \
+  $(SOPHYAINCP)tarray.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)ndatablock.h \
+  $(SOPHYAINCP)pexceptions.h \
+  $(SOPHYAINCP)utilarr.h $(SOPHYAINCP)tmatrix.h \
+  $(SOPHYAINCP)diagmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)trngmtx.h \
+  $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)symmtx.h $(SOPHYAINCP)spesqmtx.h \
+  $(SOPHYAINCP)spesqmtx_tsnl.h \
+  $(SOPHYAINCP)srandgen.h \
   $(SOPHYAINCP)machdefs.h \
   $(SOPHYAINCP)randinterf.h
Index: trunk/SophyaProg/Tests/tssqmx.cc
===================================================================
--- trunk/SophyaProg/Tests/tssqmx.cc	(revision 3811)
+++ trunk/SophyaProg/Tests/tssqmx.cc	(revision 3811)
@@ -0,0 +1,750 @@
+/* --- Programme de test des matrices carres speciales
+   --- This code is part of the SOPHYA library ---
+  (C) Univ. Paris-Sud   (C) LAL-IN2P3/CNRS   (C) IRFU-CEA
+  (C) R. Ansari, C.Magneville    2009  
+
+   Appel: 
+   # Pour verification visuelle (/impression)
+   csh> tssqmx 0     
+   # Test matrices diagonales (Rc=0 -> OK) 
+   csh> tssqmx d 
+   # Test matrices triangulaires (Rc=0 -> OK) 
+   csh> tssqmx t 
+   # Test matrices symmetriques (Rc=0 -> OK) 
+   csh> tssqmx s 
+---------------------------------------------------------- */
+
+
+
+#include <iostream>
+#include <string>
+
+#include "trngmtx.h"
+#include "diagmtx.h"
+#include "symmtx.h"
+#include "fiospsqmtx.h"
+#include "tarrinit.h"
+
+using namespace std;
+using namespace SOPHYA;
+
+// --- Declaration des fonctions de ce fichier 
+static int SSQM_Check0();
+static int TriangMtxCheck(sa_size_t NR=7);
+static int DiagMtxCheck(sa_size_t NR=7);
+static int SymmMtxCheck(sa_size_t NR=7);
+
+
+static int PrtLev = 0;  
+//-----------------------------------------------------------
+//-----------------------------------------------------------
+int main(int narg, char* arg[])
+{
+int rc = 0;
+if(narg<2) {
+  cout << "Usage: tssqmx Action \n Action= 0/t/d/s [NR=7] [PrtLev=0] " << endl;
+  return 1;
+}
+sa_size_t NR = 7;
+if (narg>2)  NR = atoi(arg[2]);
+if (narg>3)  PrtLev = atoi(arg[3]);
+try {
+// appel enregistrement des handlers PPF (devra etre fait par l'initialiseur de TArray
+  SophyaInit();
+  cout << " ---- tssqmx : Test of Special Square Matrix classes ----- " << endl;
+  if (*arg[1] == 'd')  rc = DiagMtxCheck(NR);
+  else if (*arg[1] == 't')  rc = TriangMtxCheck(NR);
+  else if (*arg[1] == 's')  rc = SymmMtxCheck(NR);
+  else  rc = SSQM_Check0();
+}
+catch (PThrowable exc) {
+  cerr << " tssqmx.cc: catched Exception " << exc.Msg() << endl;
+  rc = 97;
+}  
+catch (...) {
+  cerr << " tssqmx.cc: catched unknown (...) exception " << endl; 
+  rc  = 99;
+}  
+
+cout << " ---- End of tssqmx : Rc= " << rc << " ---- " << endl;
+return rc;
+}
+
+
+
+//-------------------------
+//  Fonction de test avec impression 
+static int SSQM_Check0()
+{
+  cout << " ========== SSQM_Check0() =========== " << endl;
+  cout << "1- LowerTriangularMatrix<int_4> trmx(5) ..." << endl;
+  LowerTriangularMatrix<int_4> trmx(5);
+  cout << "2-  trmx = 5 ..." << endl;
+  //  int_4 c = 5;
+  trmx = 5;
+  //  trmx.SetCst(6);
+  cout << "3-  trmx += 3 ..." << endl;
+  trmx += 3;
+  cout << "4- cout << trmx , t2=trmx t2.print " << endl; 
+  cout << trmx; 
+  LowerTriangularMatrix<int_4> t2;
+  t2 = trmx;
+  t2.Print(cout, 10);
+
+  cout << "5.a- tt = trmx + t2 " << endl; 
+  LowerTriangularMatrix<int_4> tt;
+  tt = trmx + t2;
+  cout << tt ; 
+  tt.Print(cout, 60);
+  cout << "5.b- tt2 = tt - 4*t2 " << endl; 
+  LowerTriangularMatrix<int_4> tt2 = tt - 4*t2;
+  tt2.Print(cout, 60);
+
+  cout << "6- LowerTriangularMatrix<r_4> rtt; rtt= RegularSequence(5.6, 0.2)" << endl;
+  LowerTriangularMatrix<r_4> rtt(7);
+  rtt= RegularSequence(5.6, 0.2);
+  rtt.Print(cout,60);
+  
+  cout << "11- diag = 16 " << endl;
+  DiagonalMatrix<int_4> diag(5), dmx(7);
+  diag = 16;
+  cout << diag; 
+  diag.Print(cout);
+
+  cout << "11.b- dmx =  RegularSequence(1., 2.) " << endl;
+  dmx = RegularSequence(1., 2.);
+  dmx.Print(cout);
+  cout << "12- dd = diag*2+3 , dd2 = dd/5-diag/4+4 " << endl;
+  DiagonalMatrix<int_4> dd = diag*2+3;
+  dd.Print(cout);
+  DiagonalMatrix<int_4> dd2;
+  dd2 = dd/5-diag/4+4;
+  dd2.Print(cout);
+
+  {
+  cout << "12- Writing dd , dd2 to POutPersist po(diagmtx.ppf) " << endl;
+  POutPersist po("diagmtx.ppf");
+  po << dd << dd2;
+  }
+  {
+  cout << "12.b- Reading rdd , rdd2 from PInPersist po(diagmtx.ppf) " << endl;
+  PInPersist pi("diagmtx.ppf");
+  DiagonalMatrix<int_4> rdd,rdd2; 
+  pi >> rdd >> rdd2;
+  rdd.Print(cout);
+  rdd2.Print(cout);
+  }
+
+
+  cout << "21- Symmetric = RegularSequence " << endl;
+  SymmetricMatrix<int_4> sym(5);
+  sym = RegularSequence(1,2);
+  sym.Print(cout,-1);
+
+  {
+  cout << "22- Writing sym to POutPersist po(symmtx.ppf) " << endl;
+  POutPersist po("symmtx.ppf");
+  po << sym ;
+  }
+  {
+  cout << "22.b- Reading rsym from PInPersist po(symmtx.ppf) " << endl;
+  PInPersist pi("symmtx.ppf");
+  SymmetricMatrix<int_4> rsym; 
+  pi >> rsym;
+  rsym.Print(cout,-1);
+  }
+
+  cout << "23: Matrix multiplication on SymmetricMatrix<r_8>" << endl;
+  SymmetricMatrix<r_8>  tmxa(3), tmxb(3);
+  tmxa = RandomSequence(RandomSequence::Gaussian);
+  tmxb = RandomSequence(RandomSequence::Gaussian,3.);
+  TMatrix<r_8> mxd = tmxa * tmxb;
+  tmxa.Print(cout,-1);
+  tmxb.Print(cout,-1);
+  mxd.Print(cout,-1);
+
+  return 0;  
+}
+
+
+//-------------------------
+//  Fonction de test pour matrices triangulaires
+static int TriangMtxCheck(sa_size_t NR)
+{
+  cout << " ========== TriangMtxCheck() LowerTriangularMatrix<T> check - NR= " << NR 
+       << " =========== " << endl;
+  int rc = 0;
+//----- Test 1
+  cout << "1/ Test 1 : Element Access Check LowerTriangularMatrix<int_8>" << endl;
+  LowerTriangularMatrix<int_8>  tmx(NR), tmx2(NR);
+  tmx2 = RegularSequence(5., 3.);
+  int_8 vv=5;
+  for (sa_size_t c=0; c<tmx.NCols(); c++) {
+    for (sa_size_t r=c; r<tmx.NRows(); r++) {
+      tmx(r,c) = vv; vv+=3;
+    } 	  
+  }
+  int nzz = 0;
+  for (sa_size_t r=0; r<tmx.NRows()-1; r++) {
+    for (sa_size_t c=r+1; c<tmx.NCols(); c++) {
+      tmx(r,c) = 4.5; if (tmx(r,c)!=0) nzz++;
+    } 	  
+  }
+  if (nzz>0) {
+    cout << " !!! Test_1.a ERROR : nzz= " << nzz << endl; 
+    rc += 1;
+  }
+  else cout << " ---> Test_1.a OK " << endl;
+
+  LowerTriangularMatrix<int_8> td8 = tmx-tmx2;
+  int_8 min8, max8;
+  td8.MinMax(min8, max8);
+  if (PrtLev>2) {
+    cout << " LowerTriangularMatrix<int_8> tmx : " << endl;
+    tmx.Print(cout, -1); 
+    cout << " LowerTriangularMatrix<int_8> td8=tmx-tmx2 : " << endl;
+    td8.Print(cout, -1); 
+  }
+  if ((min8!=0)||(max8!=0)) {
+    cout << " !!! Test_1.b ERROR : diff::min=" << min8 << " diff::max=" << max8 << endl;
+    rc += 2;
+  }
+  else cout << " ---> Test_1.b OK " << endl;
+
+//----- Test 2
+  cout << "2/ Test 2 : Operator =, PPF write check LowerTriangularMatrix<int_8>" << endl;
+  {
+  LowerTriangularMatrix<int_8> ctmx;
+  ctmx = tmx;
+  POutPersist po("ttrngmtx.ppf");
+  po << ctmx;
+  }
+  {
+  PInPersist pi("ttrngmtx.ppf");
+  LowerTriangularMatrix<int_8> rtmx; 
+  pi >> rtmx;
+  td8 = rtmx-tmx;
+  if (PrtLev>2) {
+    cout << " LowerTriangularMatrix<int_8> rtmx : " << endl;
+    rtmx.Print(cout, -1); 
+  }
+  }
+  td8.MinMax(min8, max8);
+  if (PrtLev>2) {
+    cout << " LowerTriangularMatrix<int_8> td8=tmx-tmx2 : " << endl;
+    td8.Print(cout, -1); 
+  }
+  if ((min8!=0)||(max8!=0)) {
+    cout << " !!! Test_2 ERROR : diff::min=" << min8 << " diff::max=" << max8 << endl;
+    rc += 4;
+  }
+  else cout << " ---> Test_2 OK " << endl;
+
+
+//----- Test 3
+  cout << "3/ Test 3 : ConvertToStdmatrix() + operations on LowerTriangularMatrix<r_8>" << endl;
+  LowerTriangularMatrix<r_8>  tdmx(NR);
+  tdmx = RandomSequence(RandomSequence::Gaussian);
+  TMatrix<r_8> dmx = tdmx.ConvertToStdMatrix();
+  int nerr = 0;
+  for (sa_size_t c=0; c<tmx.NCols(); c++) {
+    for (sa_size_t r=0; r<tmx.NRows(); r++) {
+      if (tdmx(r,c) != dmx(r,c))  nerr++;
+    }
+  }
+  if (nerr>0) {
+    cout << " !!! Test_3.a ERROR : nerr = " << nerr << endl;
+    rc += 8;
+  }
+  else cout << " ---> Test_3.a OK " << endl;
+
+
+  tdmx *= M_PI;    tdmx -= 0.67;
+  dmx *= M_PI;    dmx -= 0.67;
+  LowerTriangularMatrix<r_8>  tdmx2(dmx);
+  LowerTriangularMatrix<r_8> tdd8 = tdmx-tdmx2;
+  r_8 mind, maxd;
+  tdd8.MinMax(mind, maxd);
+  if (PrtLev>2) {
+    cout << " LowerTriangularMatrix<r_8> tdmx : " << endl;
+    tdmx.Print(cout, -1); 
+    cout << " LowerTriangularMatrix<int_8> tdd8=tdmx-tdmx2 : " << endl;
+    tdd8.Print(cout, -1); 
+  }
+  if ((fabs(mind)>1.e-19)||(fabs(maxd)>1e-19)) {
+    cout << " !!! Test_3.b ERROR : diff::min=" << mind << " diff::max=" << maxd << endl;
+    rc += 16;
+  }
+  else cout << " ---> Test_3.b OK " << endl;
+
+  LowerTriangularMatrix<r_8>  tdmxa(NR);
+  tdmxa = RegularSequence(2.,3.);
+  TMatrix<r_8> dmxa = tdmxa.ConvertToStdMatrix();
+  LowerTriangularMatrix<r_8>  tdmxb = (74.32*((5.89*tdmx-tdmxa)&&tdmxa)+14.5)/tdmx;
+  TMatrix<r_8>  dmxb = (74.32*((5.89*dmx-dmxa)&&dmxa)+14.5)/dmx;
+  LowerTriangularMatrix<r_8>  tdmxc(dmxb);
+  tdd8 = tdmxb-tdmxc;
+  tdd8.MinMax(mind, maxd);
+  if (PrtLev>2) {
+    cout << " LowerTriangularMatrix<r_8> tdmxb : " << endl;
+    tdmx.Print(cout, -1); 
+    cout << " LowerTriangularMatrix<int_8> tdd8=tdmxb-tdmxc : " << endl;
+    tdd8.Print(cout, -1); 
+  }
+  if ((fabs(mind)>1.e-19)||(fabs(maxd)>1e-19)) {
+    cout << " !!! Test_3.c ERROR : diff::min=" << mind << " diff::max=" << maxd << endl;
+    rc += 32;
+  }
+  else cout << " ---> Test_3.c OK " << endl;
+
+//----- Test 4
+  cout << "4/ Test 4 : Matrix multiplication on LowerTriangularMatrix<r_8>" << endl;
+  LowerTriangularMatrix<r_8>  tmxa(NR), tmxb(NR);
+  tmxa = RandomSequence(RandomSequence::Gaussian);
+  tmxb = RandomSequence(RandomSequence::Gaussian,3.);
+  LowerTriangularMatrix<r_8>  tmxc = tmxa * tmxb;
+  TMatrix<r_8> mxa = tmxa.ConvertToStdMatrix();
+  TMatrix<r_8> mxb = tmxb.ConvertToStdMatrix();
+  TMatrix<r_8> mxc = mxa * mxb;
+
+  nerr = 0;
+  for (sa_size_t c=0; c<tmx.NCols(); c++) {
+    for (sa_size_t r=0; r<tmx.NRows(); r++) {
+      if (fabs(tmxc(r,c)-mxc(r,c))>1e-15)  nerr++;
+    }
+  }
+  if (nerr>0) {
+    cout << " !!! Test_4.a ERROR : nerr = " << nerr << endl;
+    rc += 64;
+  }
+  else cout << " ---> Test_4.a OK " << endl;
+
+  mxb = RandomSequence(RandomSequence::Gaussian, 9.);
+  TMatrix<r_8> mxd = tmxa*mxb;
+  mxc = mxa*mxb;
+  if (PrtLev>2) {
+    cout << " DiagonalMatrix<r_8> tmxa : " << endl;
+    tmxa.Print(cout, -1); 
+    cout << " TMatrix<r_8> mxb : " << endl;
+    mxb.Print(cout, -1); 
+    cout << " TMatrix<r_8> mxd=tmxa*mxb : " << endl;
+    mxd.Print(cout, -1); 
+  }
+
+  nerr = 0;
+  for (sa_size_t c=0; c<tmx.NCols(); c++) {
+    for (sa_size_t r=0; r<tmx.NRows(); r++) {
+      if (fabs(mxd(r,c)-mxc(r,c))>1e-15)  nerr++;
+    }
+  }
+  if (nerr>0) {
+    cout << " !!! Test_4.b ERROR : nerr = " << nerr << endl;
+    rc += 128;
+  }
+  else cout << " ---> Test_4.b OK " << endl;
+
+  mxd = mxb*tmxa;
+  mxc = mxb*mxa;
+  nerr = 0;
+  for (sa_size_t c=0; c<tmx.NCols(); c++) {
+    for (sa_size_t r=0; r<tmx.NRows(); r++) {
+      if (fabs(mxd(r,c)-mxc(r,c))>1e-15)  nerr++;
+    }
+  }
+  if (nerr>0) {
+    cout << " !!! Test_4.c ERROR : nerr = " << nerr << endl;
+    rc += 256;
+  }
+  else cout << " ---> Test_4.c OK " << endl;
+
+
+  return rc;
+}
+
+//-------------------------
+//  Fonction de test pour matrices diagonales
+static int DiagMtxCheck(sa_size_t NR)
+{
+  cout << " ========== DiagMtxCheck() DiagonalMatrix<T> check - NR= " << NR 
+       << " =========== " << endl;
+  int rc = 0;
+//----- Test 1
+  cout << "1/ Test 1 : Element Access Check DiagonalMatrix<int_8>" << endl;
+  DiagonalMatrix<int_8>  tmx(NR), tmx2(NR);
+  tmx2 = RegularSequence(5., 3.);
+  int_8 vv=5;
+  for (sa_size_t r=0; r<tmx.NRows(); r++) {
+    tmx(r,r) = vv; vv+=3;
+  }
+  int nzz = 0;
+  for (sa_size_t r=0; r<tmx.NRows(); r++) {
+    for (sa_size_t c=0; c<tmx.NCols(); c++) {
+      if (r==c) continue;
+      tmx(r,c) = 4.5; if (tmx(r,c)!=0) nzz++;
+    } 	  
+  }
+  if (nzz>0) {
+    cout << " !!! Test_1.a ERROR : nzz= " << nzz << endl; 
+    rc += 1;
+  }
+  else cout << " ---> Test_1.a OK " << endl;
+
+  DiagonalMatrix<int_8> td8 = tmx-tmx2;
+  int_8 min8, max8;
+  td8.MinMax(min8, max8);
+  if (PrtLev>2) {
+    cout << " DiagonalMatrix<int_8> tmx : " << endl;
+    tmx.Print(cout, -1); 
+    cout << " DiagonalMatrix<int_8> td8=tmx-tmx2 : " << endl;
+    td8.Print(cout, -1); 
+  }
+  if ((min8!=0)||(max8!=0)) {
+    cout << " !!! Test_1.b ERROR : diff::min=" << min8 << " diff::max=" << max8 << endl;
+    rc += 2;
+  }
+  else cout << " ---> Test_1.b OK " << endl;
+
+//----- Test 2
+  cout << "2/ Test 2 : Operator =, PPF write check DiagonalMatrix<int_8>" << endl;
+  {
+  DiagonalMatrix<int_8> ctmx;
+  ctmx = tmx;
+  POutPersist po("ttrngmtx.ppf");
+  po << ctmx;
+  }
+  {
+  PInPersist pi("ttrngmtx.ppf");
+  DiagonalMatrix<int_8> rtmx; 
+  pi >> rtmx;
+  td8 = rtmx-tmx;
+  if (PrtLev>2) {
+    cout << " DiagonalMatrix<int_8> rtmx : " << endl;
+    rtmx.Print(cout, -1); 
+  }
+  }
+  td8.MinMax(min8, max8);
+  if (PrtLev>2) {
+    cout << " DiagonalMatrix<int_8> td8=tmx-tmx2 : " << endl;
+    td8.Print(cout, -1); 
+  }
+  if ((min8!=0)||(max8!=0)) {
+    cout << " !!! Test_2 ERROR : diff::min=" << min8 << " diff::max=" << max8 << endl;
+    rc += 4;
+  }
+  else cout << " ---> Test_2 OK " << endl;
+
+
+//----- Test 3
+  cout << "3/ Test 3 : ConvertToStdmatrix() + operations on DiagonalMatrix<r_8>" << endl;
+  DiagonalMatrix<r_8>  tdmx(NR);
+  tdmx = RandomSequence(RandomSequence::Gaussian);
+  TMatrix<r_8> dmx = tdmx.ConvertToStdMatrix();
+  int nerr = 0;
+  for (sa_size_t c=0; c<tmx.NCols(); c++) {
+    for (sa_size_t r=0; r<tmx.NRows(); r++) {
+      if (tdmx(r,c) != dmx(r,c))  nerr++;
+    }
+  }
+  if (nerr>0) {
+    cout << " !!! Test_3.a ERROR : nerr = " << nerr << endl;
+    rc += 8;
+  }
+  else cout << " ---> Test_3.a OK " << endl;
+
+
+  tdmx *= M_PI;    tdmx -= 0.67;
+  dmx *= M_PI;    dmx -= 0.67;
+  DiagonalMatrix<r_8>  tdmx2(dmx);
+  DiagonalMatrix<r_8> tdd8 = tdmx-tdmx2;
+  r_8 mind, maxd;
+  tdd8.MinMax(mind, maxd);
+  if (PrtLev>2) {
+    cout << " DiagonalMatrix<r_8> tdmx : " << endl;
+    tdmx.Print(cout, -1); 
+    cout << " DiagonalMatrix<int_8> tdd8=tdmx-tdmx2 : " << endl;
+    tdd8.Print(cout, -1); 
+  }
+  if ((fabs(mind)>1.e-19)||(fabs(maxd)>1e-19)) {
+    cout << " !!! Test_3.b ERROR : diff::min=" << mind << " diff::max=" << maxd << endl;
+    rc += 16;
+  }
+  else cout << " ---> Test_3.b OK " << endl;
+
+  DiagonalMatrix<r_8>  tdmxa(NR);
+  tdmxa = RegularSequence(2.,3.);
+  TMatrix<r_8> dmxa = tdmxa.ConvertToStdMatrix();
+  DiagonalMatrix<r_8>  tdmxb = (74.32*((5.89*tdmx-tdmxa)&&tdmxa)+14.5)/tdmx;
+  TMatrix<r_8>  dmxb = (74.32*((5.89*dmx-dmxa)&&dmxa)+14.5)/dmx;
+  DiagonalMatrix<r_8>  tdmxc(dmxb);
+  tdd8 = tdmxb-tdmxc;
+  tdd8.MinMax(mind, maxd);
+  if (PrtLev>2) {
+    cout << " DiagonalMatrix<r_8> tdmxb : " << endl;
+    tdmx.Print(cout, -1); 
+    cout << " DiagonalMatrix<int_8> tdd8=tdmxb-tdmxc : " << endl;
+    tdd8.Print(cout, -1); 
+  }
+  if ((fabs(mind)>1.e-19)||(fabs(maxd)>1e-19)) {
+    cout << " !!! Test_3.c ERROR : diff::min=" << mind << " diff::max=" << maxd << endl;
+    rc += 32;
+  }
+  else cout << " ---> Test_3.c OK " << endl;
+
+//----- Test 4
+  cout << "4/ Test 4 : Matrix multiplication on DiagonalMatrix<r_8>" << endl;
+  DiagonalMatrix<r_8>  tmxa(NR), tmxb(NR);
+  tmxa = RandomSequence(RandomSequence::Gaussian);
+  tmxb = RandomSequence(RandomSequence::Gaussian,3.);
+  DiagonalMatrix<r_8>  tmxc = tmxa * tmxb;
+  TMatrix<r_8> mxa = tmxa.ConvertToStdMatrix();
+  TMatrix<r_8> mxb = tmxb.ConvertToStdMatrix();
+  TMatrix<r_8> mxc = mxa * mxb;
+
+  nerr = 0;
+  for (sa_size_t c=0; c<tmx.NCols(); c++) {
+    for (sa_size_t r=0; r<tmx.NRows(); r++) {
+      if (fabs(tmxc(r,c)-mxc(r,c))>1e-15)  nerr++;
+    }
+  }
+  if (nerr>0) {
+    cout << " !!! Test_4.a ERROR : nerr = " << nerr << endl;
+    rc += 64;
+  }
+  else cout << " ---> Test_4.a OK " << endl;
+
+  mxb = RandomSequence(RandomSequence::Gaussian, 9.);
+  TMatrix<r_8> mxd = tmxa*mxb;
+  mxc = mxa*mxb;
+  if (PrtLev>2) {
+    cout << " DiagonalMatrix<r_8> tmxa : " << endl;
+    tmxa.Print(cout, -1); 
+    cout << " TMatrix<r_8> mxb : " << endl;
+    mxb.Print(cout, -1); 
+    cout << " TMatrix<r_8> mxd=tmxa*mxb : " << endl;
+    mxd.Print(cout, -1); 
+  }
+
+  nerr = 0;
+  for (sa_size_t c=0; c<tmx.NCols(); c++) {
+    for (sa_size_t r=0; r<tmx.NRows(); r++) {
+      if (fabs(mxd(r,c)-mxc(r,c))>1e-15)  nerr++;
+    }
+  }
+  if (nerr>0) {
+    cout << " !!! Test_4.b ERROR : nerr = " << nerr << endl;
+    rc += 128;
+  }
+  else cout << " ---> Test_4.b OK " << endl;
+
+  mxd = mxb*tmxa;
+  mxc = mxb*mxa;
+  nerr = 0;
+  for (sa_size_t c=0; c<tmx.NCols(); c++) {
+    for (sa_size_t r=0; r<tmx.NRows(); r++) {
+      if (fabs(mxd(r,c)-mxc(r,c))>1e-15)  nerr++;
+    }
+  }
+  if (nerr>0) {
+    cout << " !!! Test_4.c ERROR : nerr = " << nerr << endl;
+    rc += 256;
+  }
+  else cout << " ---> Test_4.c OK " << endl;
+
+
+  return rc;
+}
+
+//-------------------------
+//  Fonction de test pour matrices diagonales
+static int SymmMtxCheck(sa_size_t NR)
+{
+  cout << " ========== SymmMtxCheck() SymmetricMatrix<T> check - NR= " << NR 
+       << " =========== " << endl;
+  int rc = 0;
+//----- Test 1
+  cout << "1/ Test 1 : Element Access Check SymmetricMatrix<int_8>" << endl;
+  SymmetricMatrix<int_8>  tmx(NR), tmx2(NR);
+  tmx2 = RegularSequence(5., 3.);
+  int_8 vv=5;
+  for (sa_size_t c=0; c<tmx.NCols(); c++) {
+    for (sa_size_t r=c; r<tmx.NRows(); r++) {
+      tmx(r,c) = vv; vv+=3;
+    } 	  
+  }
+  int nzz = 0;
+  for (sa_size_t r=0; r<tmx.NRows()-1; r++) {
+    for (sa_size_t c=r+1; c<tmx.NCols(); c++) {
+      if (tmx(r,c)!=tmx(c,r)) nzz++;
+    } 	  
+  }
+  if (nzz>0) {
+    cout << " !!! Test_1.a ERROR : nzz= " << nzz << endl; 
+    rc += 1;
+  }
+  else cout << " ---> Test_1.a OK " << endl;
+
+  SymmetricMatrix<int_8> td8 = tmx-tmx2;
+  int_8 min8, max8;
+  td8.MinMax(min8, max8);
+  if (PrtLev>2) {
+    cout << " SymmetricMatrix<int_8> tmx : " << endl;
+    tmx.Print(cout, -1); 
+    cout << " SymmetricMatrix<int_8> td8=tmx-tmx2 : " << endl;
+    td8.Print(cout, -1); 
+  }
+  if ((min8!=0)||(max8!=0)) {
+    cout << " !!! Test_1.b ERROR : diff::min=" << min8 << " diff::max=" << max8 << endl;
+    rc += 2;
+  }
+  else cout << " ---> Test_1.b OK " << endl;
+
+//----- Test 2
+  cout << "2/ Test 2 : Operator =, PPF write check SymmetricMatrix<int_8>" << endl;
+  {
+  SymmetricMatrix<int_8> ctmx;
+  ctmx = tmx;
+  POutPersist po("ttrngmtx.ppf");
+  po << ctmx;
+  }
+  {
+  PInPersist pi("ttrngmtx.ppf");
+  SymmetricMatrix<int_8> rtmx; 
+  pi >> rtmx;
+  td8 = rtmx-tmx;
+  if (PrtLev>2) {
+    cout << " SymmetricMatrix<int_8> rtmx : " << endl;
+    rtmx.Print(cout, -1); 
+  }
+  }
+  td8.MinMax(min8, max8);
+  if (PrtLev>2) {
+    cout << " SymmetricMatrix<int_8> td8=tmx-tmx2 : " << endl;
+    td8.Print(cout, -1); 
+  }
+  if ((min8!=0)||(max8!=0)) {
+    cout << " !!! Test_2 ERROR : diff::min=" << min8 << " diff::max=" << max8 << endl;
+    rc += 4;
+  }
+  else cout << " ---> Test_2 OK " << endl;
+
+
+//----- Test 3
+  cout << "3/ Test 3 : ConvertToStdmatrix() + operations on SymmetricMatrix<r_8>" << endl;
+  SymmetricMatrix<r_8>  tdmx(NR);
+  tdmx = RandomSequence(RandomSequence::Gaussian);
+  TMatrix<r_8> dmx = tdmx.ConvertToStdMatrix();
+  int nerr = 0;
+  for (sa_size_t c=0; c<tmx.NCols(); c++) {
+    for (sa_size_t r=0; r<tmx.NRows(); r++) {
+      if (tdmx(r,c) != dmx(r,c))  nerr++;
+    }
+  }
+  if (nerr>0) {
+    cout << " !!! Test_3.a ERROR : nerr = " << nerr << endl;
+    rc += 8;
+  }
+  else cout << " ---> Test_3.a OK " << endl;
+
+
+  tdmx *= M_PI;    tdmx -= 0.67;
+  dmx *= M_PI;    dmx -= 0.67;
+  SymmetricMatrix<r_8>  tdmx2(dmx);
+  SymmetricMatrix<r_8> tdd8 = tdmx-tdmx2;
+  r_8 mind, maxd;
+  tdd8.MinMax(mind, maxd);
+  if (PrtLev>2) {
+    cout << " SymmetricMatrix<r_8> tdmx : " << endl;
+    tdmx.Print(cout, -1); 
+    cout << " SymmetricMatrix<int_8> tdd8=tdmx-tdmx2 : " << endl;
+    tdd8.Print(cout, -1); 
+  }
+  if ((fabs(mind)>1.e-19)||(fabs(maxd)>1e-19)) {
+    cout << " !!! Test_3.b ERROR : diff::min=" << mind << " diff::max=" << maxd << endl;
+    rc += 16;
+  }
+  else cout << " ---> Test_3.b OK " << endl;
+
+  SymmetricMatrix<r_8>  tdmxa(NR);
+  tdmxa = RegularSequence(2.,3.);
+  TMatrix<r_8> dmxa = tdmxa.ConvertToStdMatrix();
+  SymmetricMatrix<r_8>  tdmxb = (74.32*((5.89*tdmx-tdmxa)&&tdmxa)+14.5)/tdmx;
+  TMatrix<r_8>  dmxb = (74.32*((5.89*dmx-dmxa)&&dmxa)+14.5)/dmx;
+  SymmetricMatrix<r_8>  tdmxc(dmxb);
+  tdd8 = tdmxb-tdmxc;
+  tdd8.MinMax(mind, maxd);
+  if (PrtLev>2) {
+    cout << " SymmetricMatrix<r_8> tdmxb : " << endl;
+    tdmx.Print(cout, -1); 
+    cout << " SymmetricMatrix<int_8> tdd8=tdmxb-tdmxc : " << endl;
+    tdd8.Print(cout, -1); 
+  }
+  if ((fabs(mind)>1.e-19)||(fabs(maxd)>1e-19)) {
+    cout << " !!! Test_3.c ERROR : diff::min=" << mind << " diff::max=" << maxd << endl;
+    rc += 32;
+  }
+  else cout << " ---> Test_3.c OK " << endl;
+
+//----- Test 4
+  cout << "4/ Test 4 : Matrix multiplication on SymmetricMatrix<r_8>" << endl;
+  SymmetricMatrix<r_8>  tmxa(NR), tmxb(NR);
+  tmxa = RandomSequence(RandomSequence::Gaussian);
+  tmxb = RandomSequence(RandomSequence::Gaussian,3.);
+  TMatrix<r_8> mxd = tmxa * tmxb;
+  TMatrix<r_8> mxa = tmxa.ConvertToStdMatrix();
+  TMatrix<r_8> mxb = tmxb.ConvertToStdMatrix();
+  TMatrix<r_8> mxc = mxa * mxb;
+
+  nerr = 0;
+  for (sa_size_t c=0; c<mxd.NCols(); c++) {
+    for (sa_size_t r=0; r<mxd.NRows(); r++) {
+      if (fabs(mxd(r,c)-mxc(r,c))>1e-15)  nerr++;
+    }
+  }
+  if (nerr>0) {
+    cout << " !!! Test_4.a ERROR : nerr = " << nerr << endl;
+    rc += 64;
+  }
+  else cout << " ---> Test_4.a OK " << endl;
+
+  mxb = RandomSequence(RandomSequence::Gaussian, 9.);
+  mxd = tmxa*mxb;
+  mxc = mxa*mxb;
+  if (PrtLev>2) {
+    cout << " SymmetricMatrix<r_8> tmxa : " << endl;
+    tmxa.Print(cout, -1); 
+    cout << " TMatrix<r_8> mxb : " << endl;
+    mxb.Print(cout, -1); 
+    cout << " TMatrix<r_8> mxd=tmxa*mxb : " << endl;
+    mxd.Print(cout, -1); 
+  }
+
+  nerr = 0;
+  for (sa_size_t c=0; c<tmx.NCols(); c++) {
+    for (sa_size_t r=0; r<tmx.NRows(); r++) {
+      if (fabs(mxd(r,c)-mxc(r,c))>1e-15)  nerr++;
+    }
+  }
+  if (nerr>0) {
+    cout << " !!! Test_4.b ERROR : nerr = " << nerr << endl;
+    rc += 128;
+  }
+  else cout << " ---> Test_4.b OK " << endl;
+
+  mxd = mxb*tmxa;
+  mxc = mxb*mxa;
+  nerr = 0;
+  for (sa_size_t c=0; c<tmx.NCols(); c++) {
+    for (sa_size_t r=0; r<tmx.NRows(); r++) {
+      if (fabs(mxd(r,c)-mxc(r,c))>1e-15)  nerr++;
+    }
+  }
+  if (nerr>0) {
+    cout << " !!! Test_4.c ERROR : nerr = " << nerr << endl;
+    rc += 256;
+  }
+  else cout << " ---> Test_4.c OK " << endl;
+
+
+  return rc;
+}
+
