Index: /trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic.c	(revision 1083)
+++ /trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic.c	(revision 1083)
@@ -0,0 +1,106 @@
+/** @file  tst_psMatrix_01.c
+ *
+ *  @brief Test driver for psMatrix transpose function
+ *
+ *  This test driver contains the following tests for psMatrix test point 1:
+ *     A)  Create input and output images
+ *     B)  Transpose input image into output image
+ *     C)  Transpose input image into auto allocated NULL output image
+ *     D)  Free images and check for leaks
+ *
+ *  @author  Ross Harman, MHPCC
+ *
+ *  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2004-06-24 18:59:57 $
+ *
+ *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+ *
+ */
+
+#include "pslib.h"
+#include "psTest.h"
+
+#define PRINT_MATRIX(IMAGE)                         \
+for(int i=IMAGE->numRows-1; i>-1; i--) {            \
+    for(int j=0; j<IMAGE->numCols; j++) {           \
+        printf("%f ", IMAGE->data.F64[i][j]);       \
+    }                                               \
+    printf("\n");                                   \
+}                                                   \
+printf("\n");
+
+int main(int argc,
+         char* argv[])
+{
+    psVector *psVec1 = psVectorAlloc(5, PS_TYPE_S32);
+    psVector *psVec2 = psVectorAlloc(5, PS_TYPE_S32);
+
+    for(int i = 0; i < 5; i++) {
+        psVec1->data.S32[i] = i*10;
+        psVec1->n++;
+        psVec2->data.S32[i] = i*10;
+        psVec2->n++;
+    }
+    psVec1 =(psVector*)psBinaryOp(psVec1, psVec1, "+", psVec2);
+    for(int i = 0; i < 5; i++) {
+        printf("%d\n", psVec1->data.S32[i]);
+    }
+
+    psImage *inImage = (psImage*)psImageAlloc(5, 5, PS_TYPE_F64);
+    psImage *outImage = (psImage*)psImageAlloc(5, 5, PS_TYPE_F64);
+    for(int i = 0; i < 5; i++) {
+        for(int j = 0; j < 5; j++) {
+            inImage->data.F64[i][j] = i*10;
+            outImage->data.F64[i][j] = i*10;
+        }
+    }
+    outImage =(psImage*)psBinaryOp(outImage, outImage, "+", inImage);
+    PRINT_MATRIX(outImage);
+
+
+    psImage *outImage2 = (psImage*)psImageAlloc(5, 5, PS_TYPE_F64);
+    for(int i = 0; i < 5; i++) {
+        for(int j = 0; j < 5; j++) {
+            outImage2->data.F64[i][j] = i*10;
+        }
+    }
+    outImage2 =(psImage*)psBinaryOp(outImage2, outImage, "+", psScalarAlloc(2, PS_TYPE_F64));
+    PRINT_MATRIX(outImage);
+
+
+    psVector *psVec3 = psVectorAlloc(4, PS_TYPE_F64);
+    for(int i = 0; i < 4; i++) {
+        psVec3->data.F64[i] = i;
+        psVec3->n++;
+    }
+    psImage *inImage3 = (psImage*)psImageAlloc(3, 4, PS_TYPE_F64);
+    psImage *outImage3 = (psImage*)psImageAlloc(3, 4, PS_TYPE_F64);
+    for(int i = 0; i < 4; i++) {
+        for(int j = 0; j < 3; j++) {
+            inImage3->data.F64[i][j] = 10.0;
+            outImage3->data.F64[i][j] = 0.0;
+        }
+    }
+    outImage3 =(psImage*)psBinaryOp(outImage3, psVec3, "+", inImage3);
+    PRINT_MATRIX(outImage3);
+
+
+    psVector *psVec4 = psVectorAlloc(4, PS_TYPE_F64);
+    psVec4->type.dimen = PS_DIMEN_TRANSV;
+    for(int i = 0; i < 4; i++) {
+        psVec4->data.F64[i] = i;
+        psVec4->n++;
+    }
+    psImage *inImage4 = (psImage*)psImageAlloc(4, 3, PS_TYPE_F64);
+    psImage *outImage4 = (psImage*)psImageAlloc(4, 3, PS_TYPE_F64);
+    for(int i = 0; i < 3; i++) {
+        for(int j = 0; j < 4; j++) {
+            inImage4->data.F64[i][j] = 10.0;
+            outImage4->data.F64[i][j] = 0.0;
+        }
+    }
+    outImage4 =(psImage*)psBinaryOp(outImage4, inImage4, "+", psVec4);
+    PRINT_MATRIX(outImage4);
+
+    return 0;
+}
