Index: trunk/psLib/src/math/psMatrix.c
===================================================================
--- trunk/psLib/src/math/psMatrix.c	(revision 4540)
+++ trunk/psLib/src/math/psMatrix.c	(revision 4589)
@@ -21,6 +21,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-12 19:12:01 $
+ *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-21 01:40:10 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -95,5 +95,6 @@
 
 /** Static function to copy psF32 or psF64 vector data to a GSL vector */
-static void  psVectorToGslVector(gsl_vector *outGslVector, const psVector *inVector)
+static void  psVectorToGslVector(gsl_vector *outGslVector,
+                                 const psVector *inVector)
 {
     psU32 i = 0;
@@ -112,5 +113,6 @@
 
 /** Static function to copy GSL vector data to a psF32 or psF64 vector */
-static void gslVectorToPsVector(psVector *outVector, gsl_vector *inGslVector)
+static void gslVectorToPsVector(psVector *outVector,
+                                gsl_vector *inGslVector)
 {
     psU32 i = 0;
@@ -129,5 +131,6 @@
 
 /** Static function to copy psF32 or psF64 image data to a GSL matrix */
-static void  psImageToGslMatrix(gsl_matrix *outGslMatrix, const psImage *inImage)
+static void  psImageToGslMatrix(gsl_matrix *outGslMatrix,
+                                const psImage *inImage)
 {
     psU32 i = 0;
@@ -155,5 +158,6 @@
 
 /** Static function to copy GSL matrix data to a psF32 or psF64 image */
-static void gslMatrixToPsImage(psImage *outImage, gsl_matrix *inGslMatrix)
+static void gslMatrixToPsImage(psImage *outImage,
+                               gsl_matrix *inGslMatrix)
 {
     psU32 i = 0;
@@ -185,5 +189,7 @@
 /*****************************************************************************/
 
-psImage* psMatrixLUD(psImage* out, psVector** perm, psImage* in)
+psImage* psMatrixLUD(psImage* out,
+                     psVector** perm,
+                     const psImage* in)
 {
     psS32 signum = 0;
@@ -243,5 +249,7 @@
 }
 
-psVector* psMatrixLUSolve(psVector* out, const psImage* LU, const psVector* RHS,
+psVector* psMatrixLUSolve(psVector* out,
+                          const psImage* LU,
+                          const psVector* RHS,
                           const psVector* perm)
 {
@@ -298,5 +306,7 @@
 }
 
-psImage* psMatrixInvert(psImage* out, const psImage* in, float *determinant)
+psImage* psMatrixInvert(psImage* out,
+                        const psImage* in,
+                        float *determinant)
 {
     psS32 signum = 0;
@@ -346,14 +356,14 @@
 }
 
-float *psMatrixDeterminant(const psImage* in)
+float psMatrixDeterminant(const psImage* in)
 {
     psS32 signum = 0;
     psS32 numRows = 0;
     psS32 numCols = 0;
-    psF32 *det = NULL;
+    psF32 det = 0;
     gsl_matrix *lu = NULL;
     gsl_permutation *perm = NULL;
 
-    #define DETERMINANT_EXIT { return NULL; }
+    #define DETERMINANT_EXIT { return 0; }
     // Error checks
     PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, DETERMINANT_EXIT);
@@ -372,7 +382,7 @@
 
     // Calculate determinant
-    det = (psF32*)psAlloc(sizeof(psF32));
+    //    det = psAlloc(sizeof(psF32));
     gsl_linalg_LU_decomp(lu, perm, &signum);
-    *det = (psF32)gsl_linalg_LU_det(lu, signum);
+    det = (psF32)gsl_linalg_LU_det(lu, signum);
 
     // Free GSL structs
@@ -383,5 +393,7 @@
 }
 
-psImage* psMatrixMultiply(psImage* out, psImage* in1, psImage* in2)
+psImage* psMatrixMultiply(psImage* out,
+                          const psImage* in1,
+                          const psImage* in2)
 {
     gsl_matrix *m1 = NULL;
@@ -434,5 +446,6 @@
 }
 
-psImage* psMatrixTranspose(psImage* out, const psImage* in)
+psImage* psMatrixTranspose(psImage* out,
+                           const psImage* in)
 {
     psU32 i = 0;
@@ -480,5 +493,6 @@
 }
 
-psImage* psMatrixEigenvectors(psImage* out, psImage* in)
+psImage* psMatrixEigenvectors(psImage* out,
+                              const psImage* in)
 {
     psS32 numRows = 0;
@@ -529,5 +543,6 @@
 }
 
-psVector* psMatrixToVector(psVector* outVector, const psImage* inImage)
+psVector* psMatrixToVector(psVector* outVector,
+                           const psImage* inImage)
 {
     psS32 size = 0;
@@ -593,5 +608,6 @@
 }
 
-psImage* psVectorToMatrix(psImage* outImage, const psVector* inVector)
+psImage* psVectorToMatrix(psImage* outImage,
+                          const psVector* inVector)
 {
     psS32 size = 0;
