Index: /trunk/psLib/src/dataManip/Makefile
===================================================================
--- /trunk/psLib/src/dataManip/Makefile	(revision 673)
+++ /trunk/psLib/src/dataManip/Makefile	(revision 674)
@@ -12,5 +12,5 @@
 %.o:	%.c
 	@echo "    Compiling $<. "
-	$(CC) $(CFLAGS) -I../sysUtils -I../collections -c $< -o $@
+	$(CC) $(CFLAGS) -I../sysUtils -I../collections -I.. -c $< -o $@
 
 libpslib.a:	$(SRC_OBJS)
Index: /trunk/psLib/src/dataManip/psStats.c
===================================================================
--- /trunk/psLib/src/dataManip/psStats.c	(revision 673)
+++ /trunk/psLib/src/dataManip/psStats.c	(revision 674)
@@ -5,5 +5,6 @@
 /******************************************************************************
 //#include "pslib.h"
-//#include "psMemory.h"
+#include "psMemory.h"
+#include "psVector.h"
 //#include "psTrace.h"
 //#include "psString.h"
@@ -63,17 +64,11 @@
     psHistogram *newHist = NULL;
     int numBins = 0;
-    psType dummyFloatType;
-    psType dummyIntType;
-
-    dummyFloatType.type = PS_TYPE_FLOAT;
-    dummyFloatType.dimen = PS_DIMEN_VECTOR;
-    dummyIntType.type = PS_TYPE_FLOAT;
-    dummyIntType.dimen = PS_DIMEN_VECTOR;
+
 
     numBins = 1 + ((upper - lower) / size);
     newHist = (psHistogram *) psAlloc(sizeof(psHistogram));
-    newHist->lower = psVectorAlloc(dummyFloatType, numBins);
-    newHist->upper = psVectorAlloc(dummyFloatType, numBins);
-    newHist->nums =  psVectorAlloc(dummyIntType, numBins);
+    newHist->lower = psVectorAlloc(PS_TYPE_FLOAT, numBins);
+    newHist->upper = psVectorAlloc(PS_TYPE_FLOAT, numBins);
+    newHist->nums =  psVectorAlloc(PS_TYPE_INT32, numBins);
     newHist->minVal = lower;
     newHist->maxVal = upper;
@@ -92,11 +87,4 @@
     int numBins = 0;
     int i;
-    psType dummyFloatType;
-    psType dummyIntType;
-
-    dummyFloatType.type = PS_TYPE_FLOAT;
-    dummyFloatType.dimen = PS_DIMEN_VECTOR;
-    dummyIntType.type = PS_TYPE_FLOAT;
-    dummyIntType.dimen = PS_DIMEN_VECTOR;
 
     if (lower->n != upper->n) {
@@ -105,11 +93,11 @@
     numBins = lower->n;
     newHist = (psHistogram *) psAlloc(sizeof(psHistogram));
-    newHist->lower = psVectorAlloc(dummyFloatType, numBins);
-    newHist->upper = psVectorAlloc(dummyFloatType, numBins);
+    newHist->lower = psVectorAlloc(PS_TYPE_FLOAT, numBins);
+    newHist->upper = psVectorAlloc(PS_TYPE_FLOAT, numBins);
     for (i=0;i<numBins;i++) {
         newHist->lower->vec.f[i] = lower->vec.f[i];
         newHist->upper->vec.f[i] = upper->vec.f[i];
     }
-    newHist->nums = psVectorAlloc(dummyIntType, numBins);
+    newHist->nums = psVectorAlloc(PS_TYPE_INT32, numBins);
     newHist->minVal = minVal;
     newHist->maxVal = maxVal;
@@ -156,5 +144,5 @@
             if ((myVector->vec.f[i] >= myHist->lower->vec.f[i]) &&
                     (myVector->vec.f[i] <= myHist->upper->vec.f[i])) {
-                myHist->nums->vec.i[i]++;
+                myHist->nums->vec.i32[i]++;
             } else {
                 psError(__func__, "data value was not within the bounds of the bin it should habe been in.");
@@ -178,5 +166,5 @@
     if (maskVector != NULL) {
         for (i=0;i<myVector->n;i++) {
-            if (!(maskVal & maskVector->vec.i[i])) {
+            if (!(maskVal & maskVector->vec.i32[i])) {
                 mean+= myVector->vec.f[i];
                 count++;
@@ -203,7 +191,7 @@
     if (maskVector != NULL) {
         for (i=0;i<myVector->n;i++) {
-            if (!(maskVal & maskVector->vec.i[i])) {
+            if (!(maskVal & maskVector->vec.i32[i])) {
                 if (myVector->vec.f[i] > max) {
-                    max = maskVector->vec.i[i];
+                    max = maskVector->vec.i32[i];
                 }
             }
@@ -212,5 +200,5 @@
         for (i=0;i<myVector->n;i++) {
             if (myVector->vec.f[i] > max) {
-                max = maskVector->vec.i[i];
+                max = maskVector->vec.i32[i];
             }
         }
@@ -228,7 +216,7 @@
     if (maskVector != NULL) {
         for (i=0;i<myVector->n;i++) {
-            if (!(maskVal & maskVector->vec.i[i])) {
+            if (!(maskVal & maskVector->vec.i32[i])) {
                 if (myVector->vec.f[i] < min) {
-                    min = maskVector->vec.i[i];
+                    min = maskVector->vec.i32[i];
                 }
             }
@@ -237,5 +225,5 @@
         for (i=0;i<myVector->n;i++) {
             if (myVector->vec.f[i] < min) {
-                min = maskVector->vec.i[i];
+                min = maskVector->vec.i32[i];
             }
         }
@@ -256,5 +244,5 @@
     if (maskVector != NULL) {
         for (i=0;i<myVector->n;i++) {
-            if (!(maskVal & maskVector->vec.i[i])) {
+            if (!(maskVal & maskVector->vec.i32[i])) {
                 numData++;
             }
@@ -275,5 +263,4 @@
     psVector *unsortedVector = NULL;
     psVector *sortedVector = NULL;
-    psType dummyFloatType;
     int dataSize = 0;
     int count = 0;
@@ -281,16 +268,14 @@
     float median = 0.0;
 
-    dummyFloatType.type = PS_TYPE_FLOAT;
-    dummyFloatType.dimen = PS_DIMEN_VECTOR;
     dataSize = p_psArrayNValues(myVector, maskVector, maskVal);
 
     if (dataSize < MEDIAN_SIZE_THRESHOLD) {
-        unsortedVector = psVectorAlloc(dummyFloatType, dataSize);
-        sortedVector   = psVectorAlloc(dummyFloatType, dataSize);
+        unsortedVector = psVectorAlloc(PS_TYPE_FLOAT, dataSize);
+        sortedVector   = psVectorAlloc(PS_TYPE_FLOAT, dataSize);
 
         count = 0;
         if (maskVector != NULL) {
             for (i=0;i<myVector->n;i++) {
-                if (!(maskVal & maskVector->vec.i[i])) {
+                if (!(maskVal & maskVector->vec.i32[i])) {
                     unsortedVector->vec.f[count++] = maskVector->vec.f[i];
                 }
Index: /trunk/psLib/src/math/psStats.c
===================================================================
--- /trunk/psLib/src/math/psStats.c	(revision 673)
+++ /trunk/psLib/src/math/psStats.c	(revision 674)
@@ -5,5 +5,6 @@
 /******************************************************************************
 //#include "pslib.h"
-//#include "psMemory.h"
+#include "psMemory.h"
+#include "psVector.h"
 //#include "psTrace.h"
 //#include "psString.h"
@@ -63,17 +64,11 @@
     psHistogram *newHist = NULL;
     int numBins = 0;
-    psType dummyFloatType;
-    psType dummyIntType;
-
-    dummyFloatType.type = PS_TYPE_FLOAT;
-    dummyFloatType.dimen = PS_DIMEN_VECTOR;
-    dummyIntType.type = PS_TYPE_FLOAT;
-    dummyIntType.dimen = PS_DIMEN_VECTOR;
+
 
     numBins = 1 + ((upper - lower) / size);
     newHist = (psHistogram *) psAlloc(sizeof(psHistogram));
-    newHist->lower = psVectorAlloc(dummyFloatType, numBins);
-    newHist->upper = psVectorAlloc(dummyFloatType, numBins);
-    newHist->nums =  psVectorAlloc(dummyIntType, numBins);
+    newHist->lower = psVectorAlloc(PS_TYPE_FLOAT, numBins);
+    newHist->upper = psVectorAlloc(PS_TYPE_FLOAT, numBins);
+    newHist->nums =  psVectorAlloc(PS_TYPE_INT32, numBins);
     newHist->minVal = lower;
     newHist->maxVal = upper;
@@ -92,11 +87,4 @@
     int numBins = 0;
     int i;
-    psType dummyFloatType;
-    psType dummyIntType;
-
-    dummyFloatType.type = PS_TYPE_FLOAT;
-    dummyFloatType.dimen = PS_DIMEN_VECTOR;
-    dummyIntType.type = PS_TYPE_FLOAT;
-    dummyIntType.dimen = PS_DIMEN_VECTOR;
 
     if (lower->n != upper->n) {
@@ -105,11 +93,11 @@
     numBins = lower->n;
     newHist = (psHistogram *) psAlloc(sizeof(psHistogram));
-    newHist->lower = psVectorAlloc(dummyFloatType, numBins);
-    newHist->upper = psVectorAlloc(dummyFloatType, numBins);
+    newHist->lower = psVectorAlloc(PS_TYPE_FLOAT, numBins);
+    newHist->upper = psVectorAlloc(PS_TYPE_FLOAT, numBins);
     for (i=0;i<numBins;i++) {
         newHist->lower->vec.f[i] = lower->vec.f[i];
         newHist->upper->vec.f[i] = upper->vec.f[i];
     }
-    newHist->nums = psVectorAlloc(dummyIntType, numBins);
+    newHist->nums = psVectorAlloc(PS_TYPE_INT32, numBins);
     newHist->minVal = minVal;
     newHist->maxVal = maxVal;
@@ -156,5 +144,5 @@
             if ((myVector->vec.f[i] >= myHist->lower->vec.f[i]) &&
                     (myVector->vec.f[i] <= myHist->upper->vec.f[i])) {
-                myHist->nums->vec.i[i]++;
+                myHist->nums->vec.i32[i]++;
             } else {
                 psError(__func__, "data value was not within the bounds of the bin it should habe been in.");
@@ -178,5 +166,5 @@
     if (maskVector != NULL) {
         for (i=0;i<myVector->n;i++) {
-            if (!(maskVal & maskVector->vec.i[i])) {
+            if (!(maskVal & maskVector->vec.i32[i])) {
                 mean+= myVector->vec.f[i];
                 count++;
@@ -203,7 +191,7 @@
     if (maskVector != NULL) {
         for (i=0;i<myVector->n;i++) {
-            if (!(maskVal & maskVector->vec.i[i])) {
+            if (!(maskVal & maskVector->vec.i32[i])) {
                 if (myVector->vec.f[i] > max) {
-                    max = maskVector->vec.i[i];
+                    max = maskVector->vec.i32[i];
                 }
             }
@@ -212,5 +200,5 @@
         for (i=0;i<myVector->n;i++) {
             if (myVector->vec.f[i] > max) {
-                max = maskVector->vec.i[i];
+                max = maskVector->vec.i32[i];
             }
         }
@@ -228,7 +216,7 @@
     if (maskVector != NULL) {
         for (i=0;i<myVector->n;i++) {
-            if (!(maskVal & maskVector->vec.i[i])) {
+            if (!(maskVal & maskVector->vec.i32[i])) {
                 if (myVector->vec.f[i] < min) {
-                    min = maskVector->vec.i[i];
+                    min = maskVector->vec.i32[i];
                 }
             }
@@ -237,5 +225,5 @@
         for (i=0;i<myVector->n;i++) {
             if (myVector->vec.f[i] < min) {
-                min = maskVector->vec.i[i];
+                min = maskVector->vec.i32[i];
             }
         }
@@ -256,5 +244,5 @@
     if (maskVector != NULL) {
         for (i=0;i<myVector->n;i++) {
-            if (!(maskVal & maskVector->vec.i[i])) {
+            if (!(maskVal & maskVector->vec.i32[i])) {
                 numData++;
             }
@@ -275,5 +263,4 @@
     psVector *unsortedVector = NULL;
     psVector *sortedVector = NULL;
-    psType dummyFloatType;
     int dataSize = 0;
     int count = 0;
@@ -281,16 +268,14 @@
     float median = 0.0;
 
-    dummyFloatType.type = PS_TYPE_FLOAT;
-    dummyFloatType.dimen = PS_DIMEN_VECTOR;
     dataSize = p_psArrayNValues(myVector, maskVector, maskVal);
 
     if (dataSize < MEDIAN_SIZE_THRESHOLD) {
-        unsortedVector = psVectorAlloc(dummyFloatType, dataSize);
-        sortedVector   = psVectorAlloc(dummyFloatType, dataSize);
+        unsortedVector = psVectorAlloc(PS_TYPE_FLOAT, dataSize);
+        sortedVector   = psVectorAlloc(PS_TYPE_FLOAT, dataSize);
 
         count = 0;
         if (maskVector != NULL) {
             for (i=0;i<myVector->n;i++) {
-                if (!(maskVal & maskVector->vec.i[i])) {
+                if (!(maskVal & maskVector->vec.i32[i])) {
                     unsortedVector->vec.f[count++] = maskVector->vec.f[i];
                 }
