Index: trunk/psLib/src/math/psMatrix.c
===================================================================
--- trunk/psLib/src/math/psMatrix.c	(revision 908)
+++ trunk/psLib/src/math/psMatrix.c	(revision 1385)
@@ -20,6 +20,6 @@
  *  @author Ross Harman, MHPCC
  *   
- *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-06-08 01:57:52 $
+ *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-08-04 23:37:39 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -475,12 +475,13 @@
         PS_CHECK_ALLOC_VECTOR(outVector, inImage->numCols, inImage->type.type);
         outVector->type.dimen = PS_DIMEN_TRANSV;
-    } else if(inImage->numCols == 1) {
-        // Create non-transposed column vector
-        PS_CHECK_ALLOC_VECTOR(outVector, inImage->numRows, inImage->type.type);
-    } else {
-        psError(__func__, "Image does not have dim with 1 col or 1 row: (%d x %d).", inImage->numRows,
-                inImage->numCols);
-        return outVector;
-    }
+    } else
+        if(inImage->numCols == 1) {
+            // Create non-transposed column vector
+            PS_CHECK_ALLOC_VECTOR(outVector, inImage->numRows, inImage->type.type);
+        } else {
+            psError(__func__, "Image does not have dim with 1 col or 1 row: (%d x %d).", inImage->numRows,
+                    inImage->numCols);
+            return outVector;
+        }
 
     PS_CHECK_NULL_VECTOR(outVector, outVector);
@@ -502,18 +503,19 @@
         size = PSELEMTYPE_SIZEOF(inImage->type.type)*inImage->numRows;
 
-    } else if(outVector->type.dimen == PS_DIMEN_TRANSV) {
-        PS_CHECK_DIMEN_AND_TYPE(outVector, PS_DIMEN_TRANSV, outVector);
-
-        if(outVector->n == 0) {
-            outVector->n = inImage->numCols;
+    } else
+        if(outVector->type.dimen == PS_DIMEN_TRANSV) {
+            PS_CHECK_DIMEN_AND_TYPE(outVector, PS_DIMEN_TRANSV, outVector);
+
+            if(outVector->n == 0) {
+                outVector->n = inImage->numCols;
+            }
+
+            if(outVector->n != inImage->numCols) {
+                psError(__func__, "Image and vector sizes differ: (%d vs %d).", inImage->numCols, outVector->n);
+                return outVector;
+            }
+
+            size = PSELEMTYPE_SIZEOF(inImage->type.type)*inImage->numCols;
         }
-
-        if(outVector->n != inImage->numCols) {
-            psError(__func__, "Image and vector sizes differ: (%d vs %d).", inImage->numCols, outVector->n);
-            return outVector;
-        }
-
-        size = PSELEMTYPE_SIZEOF(inImage->type.type)*inImage->numCols;
-    }
 
     memcpy(outVector->data.V, inImage->data.V[0], size);
@@ -538,27 +540,30 @@
             psError(__func__, "Image has more than 1 column: numCols = %d.", outImage->numCols);
             return outImage;
-        } else if(outImage->numRows != inVector->n) {
-            psError(__func__, "Image and vector sizes differ: (%d vs %d).", outImage->numRows, inVector->n);
-            return outImage;
+        } else
+            if(outImage->numRows != inVector->n) {
+                psError(__func__, "Image and vector sizes differ: (%d vs %d).", outImage->numRows, inVector->n);
+                return outImage;
+            }
+
+        size = PSELEMTYPE_SIZEOF(outImage->type.type)*outImage->numRows;
+
+    } else
+        if(inVector->type.dimen == PS_DIMEN_TRANSV) {
+            PS_CHECK_DIMEN_AND_TYPE(inVector, PS_DIMEN_TRANSV, outImage);
+            PS_CHECK_SIZE_VECTOR(inVector, outImage);
+            PS_CHECK_ALLOC_IMAGE(outImage, inVector->n, 1, PS_TYPE_F64)
+
+            // More checks for PS_DIMEN_TRANSV
+            if(outImage->numRows > 1) {
+                psError(__func__, "Image has more than 1 row: numRows = %d.", outImage->numRows);
+                return outImage;
+            } else
+                if(outImage->numCols != inVector->n) {
+                    psError(__func__, "Image and vector sizes differ: (%d vs %d).", outImage->numCols, inVector->n);
+                    return outImage;
+                }
+
+            size = PSELEMTYPE_SIZEOF(outImage->type.type)*outImage->numCols;
         }
-
-        size = PSELEMTYPE_SIZEOF(outImage->type.type)*outImage->numRows;
-
-    } else if(inVector->type.dimen == PS_DIMEN_TRANSV) {
-        PS_CHECK_DIMEN_AND_TYPE(inVector, PS_DIMEN_TRANSV, outImage);
-        PS_CHECK_SIZE_VECTOR(inVector, outImage);
-        PS_CHECK_ALLOC_IMAGE(outImage, inVector->n, 1, PS_TYPE_F64)
-
-        // More checks for PS_DIMEN_TRANSV
-        if(outImage->numRows > 1) {
-            psError(__func__, "Image has more than 1 row: numRows = %d.", outImage->numRows);
-            return outImage;
-        } else if(outImage->numCols != inVector->n) {
-            psError(__func__, "Image and vector sizes differ: (%d vs %d).", outImage->numCols, inVector->n);
-            return outImage;
-        }
-
-        size = PSELEMTYPE_SIZEOF(outImage->type.type)*outImage->numCols;
-    }
 
     PS_CHECK_NULL_IMAGE(outImage, outImage);
