Index: trunk/psLib/src/math/psMatrix.c
===================================================================
--- trunk/psLib/src/math/psMatrix.c	(revision 8627)
+++ trunk/psLib/src/math/psMatrix.c	(revision 9538)
@@ -21,6 +21,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-26 04:34:28 $
+ *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-10-13 21:13:48 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -308,11 +308,18 @@
 // This is a temporary gauss-jordan solver based on gene's
 // version based on the Numerical Recipes version
-bool psMatrixGJSolve(
-    psImage *a,
-    psVector *b)
-{
+bool psMatrixGJSolve(psImage *a,
+                     psVector *b
+                    )
+{
+    PS_ASSERT_IMAGE_NON_NULL(a, false);
+    PS_ASSERT_VECTOR_NON_NULL(b, false);
+    PS_ASSERT_IMAGE_TYPE(a, PS_TYPE_F64, false);
+    PS_ASSERT_VECTOR_TYPE(b, PS_TYPE_F64, false);
+    PS_ASSERT_INT_EQUAL(a->numCols, a->numRows, false);
+    int Nx = a->numCols;
+    PS_ASSERT_VECTOR_SIZE(b, (long int)Nx, false);
+
     psF64 *vector = b->data.F64;
     psF64 **matrix = a->data.F64;
-    int Nx = a->numCols;
     int *indxc = psAlloc(Nx*sizeof(int));
     int *indxr = psAlloc(Nx*sizeof(int));
