Index: trunk/psLib/src/dataManip/psMatrix.c
===================================================================
--- trunk/psLib/src/dataManip/psMatrix.c	(revision 4160)
+++ trunk/psLib/src/dataManip/psMatrix.c	(revision 4321)
@@ -21,6 +21,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-08 22:28:07 $
+ *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-20 22:42:29 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -191,5 +191,5 @@
     psS32 numCols = 0;
     gsl_matrix *lu = NULL;
-    gsl_permutation perm;
+    gsl_permutation permGSL;
 
 
@@ -212,5 +212,5 @@
 
     // Initialize GSL data
-    perm.size = numCols;
+    permGSL.size = numCols;
     if (sizeof(size_t) == 4) {
         *outPerm = psVectorRecycle(*outPerm, numCols, PS_TYPE_S32);
@@ -225,5 +225,5 @@
 
     (*outPerm)->n = numCols;
-    perm.data = (psPtr)((*outPerm)->data.U8);
+    permGSL.data = (psPtr)((*outPerm)->data.U8);
     lu = gsl_matrix_alloc(numRows, numCols);
 
@@ -232,5 +232,5 @@
 
     // Calculate LU decomposition
-    gsl_linalg_LU_decomp(lu, &perm, &signum); // N.B., uses Gaussian Elimination with partial pivoting.
+    gsl_linalg_LU_decomp(lu, &permGSL, &signum); // N.B., uses Gaussian Elimination with partial pivoting.
 
     // Copy GSL matrix data to psImage data
@@ -298,5 +298,5 @@
 }
 
-psImage* psMatrixInvert(psImage* outImage, const psImage* inImage, psF32 *det)
+psImage* psMatrixInvert(psImage* outImage, const psImage* inImage, float *det)
 {
     psS32 signum = 0;
@@ -346,5 +346,5 @@
 }
 
-psF32 *psMatrixDeterminant(const psImage* inImage)
+float *psMatrixDeterminant(const psImage* in)
 {
     psS32 signum = 0;
@@ -357,17 +357,17 @@
     #define DETERMINANT_EXIT { return NULL; }
     // Error checks
-    PS_ASSERT_GENERAL_IMAGE_NON_NULL(inImage, DETERMINANT_EXIT);
-    PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, DETERMINANT_EXIT);
-    PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(inImage, DETERMINANT_EXIT);
-    PS_CHECK_SQUARE(inImage, DETERMINANT_EXIT);
+    PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, DETERMINANT_EXIT);
+    PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, DETERMINANT_EXIT);
+    PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, DETERMINANT_EXIT);
+    PS_CHECK_SQUARE(in, DETERMINANT_EXIT);
 
     // Initialize data
-    numRows = inImage->numRows;
-    numCols = inImage->numCols;
+    numRows = in->numRows;
+    numCols = in->numCols;
 
     // Allocate GSL structs
     perm = gsl_permutation_alloc(numRows);
     lu = gsl_matrix_alloc(numRows, numCols);
-    psImageToGslMatrix(lu, inImage);
+    psImageToGslMatrix(lu, in);
 
     // Calculate determinant
@@ -480,5 +480,5 @@
 }
 
-psImage* psMatrixEigenvectors(psImage* outImage, psImage* inImage)
+psImage* psMatrixEigenvectors(psImage* out, psImage* in)
 {
     psS32 numRows = 0;
@@ -486,23 +486,23 @@
     gsl_vector *eVals = NULL;
     gsl_eigen_symmv_workspace *w = NULL;
-    gsl_matrix *out = NULL;
-    gsl_matrix *in = NULL;
-
-    #define EIGENVECTORS_CLEANUP { psFree(outImage); return NULL; }
-    // Error checks
-    PS_ASSERT_GENERAL_IMAGE_NON_NULL(inImage, EIGENVECTORS_CLEANUP);
-    PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, EIGENVECTORS_CLEANUP);
-    PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(inImage, EIGENVECTORS_CLEANUP);
-    PS_CHECK_POINTERS(inImage, outImage, EIGENVECTORS_CLEANUP);
-
-    outImage = psImageRecycle(outImage, inImage->numCols, inImage->numRows, inImage->type.type);
+    gsl_matrix *outGSL = NULL;
+    gsl_matrix *inGSL = NULL;
+
+    #define EIGENVECTORS_CLEANUP { psFree(out); return NULL; }
+    // Error checks
+    PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, EIGENVECTORS_CLEANUP);
+    PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, EIGENVECTORS_CLEANUP);
+    PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, EIGENVECTORS_CLEANUP);
+    PS_CHECK_POINTERS(in, out, EIGENVECTORS_CLEANUP);
+
+    out = psImageRecycle(out, in->numCols, in->numRows, in->type.type);
 
     // Initialize data
-    numRows = inImage->numRows;
-    numCols = inImage->numCols;
-
-    in = gsl_matrix_alloc(numRows, numCols);
-    psImageToGslMatrix(in, inImage);
-    out = gsl_matrix_alloc(numRows, numCols);
+    numRows = in->numRows;
+    numCols = in->numCols;
+
+    inGSL = gsl_matrix_alloc(numRows, numCols);
+    psImageToGslMatrix(inGSL, in);
+    outGSL = gsl_matrix_alloc(numRows, numCols);
 
     // Allocate GSL structs
@@ -511,20 +511,20 @@
 
     // Non-square matrices not allowed
-    PS_CHECK_SQUARE(inImage, EIGENVECTORS_CLEANUP);
-    PS_CHECK_SQUARE(outImage, EIGENVECTORS_CLEANUP);
+    PS_CHECK_SQUARE(in, EIGENVECTORS_CLEANUP);
+    PS_CHECK_SQUARE(out, EIGENVECTORS_CLEANUP);
 
     // Calculate Eigenvalues and Eigenvectors...Eigenvalues not currently used
-    gsl_eigen_symmv(in, eVals, out, w);
+    gsl_eigen_symmv(inGSL, eVals, outGSL, w);
 
     // Copy GSL matrix data to psImage data
-    gslMatrixToPsImage(outImage, out);
+    gslMatrixToPsImage(out, outGSL);
 
     // Free GSL structs
-    gsl_matrix_free(in);
-    gsl_matrix_free(out);
+    gsl_matrix_free(inGSL);
+    gsl_matrix_free(outGSL);
     gsl_eigen_symmv_free(w);
     gsl_vector_free(eVals);
 
-    return outImage;
+    return out;
 }
 
