Index: /trunk/psLib/src/dataManip/Makefile
===================================================================
--- /trunk/psLib/src/dataManip/Makefile	(revision 641)
+++ /trunk/psLib/src/dataManip/Makefile	(revision 642)
@@ -3,5 +3,6 @@
 endif
 
-TARGET = psImage.o psStats.o libpsDataManip.a
+#TARGET = psImage.o psStats.o libpsDataManip.a
+TARGET = psStats.o libpsDataManip.a
 
 all: $(TARGET)
Index: /trunk/psLib/src/dataManip/psStats.c
===================================================================
--- /trunk/psLib/src/dataManip/psStats.c	(revision 641)
+++ /trunk/psLib/src/dataManip/psStats.c	(revision 642)
@@ -4,9 +4,11 @@
 #include <stdarg.h>
 #include "pslib.h"
-//#include "psMemory.h"
-//#include "psTrace.h"
-//#include "psString.h"
-//#include "psError.h"
-#include "psArray.h"
+#include "psMemory.h"
+#include "psTrace.h"
+#include "psString.h"
+#include "psError.h"
+/******************************************************************************
+//#include "psArray.h"
+ *****************************************************************************/
 #include "psStats.h"
 
@@ -65,7 +67,7 @@
     numBins = 1 + ((upper - lower) / size);
     newHist = (psHistogram *) psAlloc(sizeof(psHistogram));
-    newHist->lower = psFloatArrayAlloc(numBins);
-    newHist->upper = psFloatArrayAlloc(numBins);
-    newHist->nums = psIntArrayAlloc(numBins);
+    newHist->lower = psVectorAlloc(numBins, PS_TYPE_FLOAT);
+    newHist->upper = psVectorAlloc(numBins, PS_TYPE_FLOAT);
+    newHist->nums =  psVectorAlloc(numBins, PS_TYPE_INT);
     newHist->minVal = lower;
     newHist->maxVal = upper;
@@ -76,6 +78,6 @@
 }
 
-psHistogram *psHistogramAllocGeneric(const psFloatArray *restrict lower,
-                                     const psFloatArray *restrict upper,
+psHistogram *psHistogramAllocGeneric(const psVector *restrict lower,
+                                     const psVector *restrict upper,
                                      float minVal,
                                      float maxVal)
@@ -90,11 +92,11 @@
     numBins = lower->n;
     newHist = (psHistogram *) psAlloc(sizeof(psHistogram));
-    newHist->lower = psFloatArrayAlloc(numBins);
-    newHist->upper = psFloatArrayAlloc(numBins);
+    newHist->lower = psVectorAlloc(numBins, PS_TYPE_FLOAT);
+    newHist->upper = psVectorAlloc(numBins, PS_TYPE_FLOAT);
     for (i=0;i<numBins;i++) {
-        newHist->lower->arr[i] = lower->arr[i];
-        newHist->upper->arr[i] = upper->arr[i];
-    }
-    newHist->nums = psIntArrayAlloc(numBins);
+        newHist->lower->vec.vecF[i] = lower->vec.vecF[i];
+        newHist->upper->vec.vecF[i] = upper->vec.vecF[i];
+    }
+    newHist->nums = psVectorAlloc(numBins, PS_TYPE_INT);
     newHist->minVal = minVal;
     newHist->maxVal = maxVal;
@@ -124,6 +126,6 @@
         myHist->maxNum
  *****************************************************************************/
-psHistogram *psGetArrayHistogram(       psHistogram *restrict myHist,
-                                        const psFloatArray *restrict myArray)
+psHistogram *psGetArrayHistogram(psHistogram *restrict myHist,
+                                 const psVector *restrict myVector)
 {
     int i = 0;
@@ -132,14 +134,14 @@
 
     binSize = (myHist->maxVal - myHist->minVal) / (float) myHist->nums->n;
-    for (i=0;i<myArray->n;i++) {
-        if (myArray->arr[i] < myHist->minVal) {
+    for (i=0;i<myVector->n;i++) {
+        if (myVector->vec.vecF[i] < myHist->minVal) {
             myHist->minNum++;
-        } else if (myArray->arr[i] > myHist->maxVal) {
+        } else if (myVector->vec.vecF[i] > myHist->maxVal) {
             myHist->maxNum++;
         } else {
-            binNum = (int) ((myArray->arr[i] - myHist->minVal) / binSize);
-            if ((myArray->arr[i] >= myHist->lower->arr[i]) &&
-                    (myArray->arr[i] <= myHist->upper->arr[i])) {
-                myHist->nums->arr[i]++;
+            binNum = (int) ((myVector->vec.vecF[i] - myHist->minVal) / binSize);
+            if ((myVector->vec.vecF[i] >= myHist->lower->vec.vecF[i]) &&
+                    (myVector->vec.vecF[i] <= myHist->upper->vec.vecF[i])) {
+                myHist->nums->vec.vecI[i]++;
             } else {
                 psError(__func__, "data value was not within the bounds of the bin it should habe been in.");
@@ -153,6 +155,6 @@
     MISC STATISTICAL FUNCTIONS
  *****************************************************************************/
-float p_psArraySampleMean(const psFloatArray *restrict myArray,
-                          const psIntArray *restrict maskArray,
+float p_psArraySampleMean(const psVector *restrict myVector,
+                          const psVector *restrict maskVector,
                           unsigned int maskVal)
 {
@@ -160,13 +162,13 @@
     float mean = 0.0;
 
-    if (maskArray != NULL) {
-        for (i=0;i<myArray->n;i++) {
-            if (!(maskVal & maskArray->arr[i])) {
-                mean+= maskArray->arr[i];
+    if (maskVector != NULL) {
+        for (i=0;i<myVector->n;i++) {
+            if (!(maskVal & maskVector->vec.vecI[i])) {
+                mean+= maskVector->vec.vecI[i];
             }
         }
     } else {
-        for (i=0;i<myArray->n;i++) {
-            mean+= maskArray->arr[i];
+        for (i=0;i<myVector->n;i++) {
+            mean+= maskVector->vec.vecI[i];
         }
     }
@@ -174,6 +176,6 @@
 }
 
-float p_psArrayMax(const psFloatArray *restrict myArray,
-                   const psIntArray *restrict maskArray,
+float p_psArrayMax(const psVector *restrict myVector,
+                   const psVector *restrict maskVector,
                    unsigned int maskVal)
 {
@@ -181,16 +183,16 @@
     float max = -1e99;
 
-    if (maskArray != NULL) {
-        for (i=0;i<myArray->n;i++) {
-            if (!(maskVal & maskArray->arr[i])) {
-                if (myArray->arr[i] > max) {
-                    max = maskArray->arr[i];
+    if (maskVector != NULL) {
+        for (i=0;i<myVector->n;i++) {
+            if (!(maskVal & maskVector->vec.vecI[i])) {
+                if (myVector->vec.vecF[i] > max) {
+                    max = maskVector->vec.vecI[i];
                 }
             }
         }
     } else {
-        for (i=0;i<myArray->n;i++) {
-            if (myArray->arr[i] > max) {
-                max = maskArray->arr[i];
+        for (i=0;i<myVector->n;i++) {
+            if (myVector->vec.vecF[i] > max) {
+                max = maskVector->vec.vecI[i];
             }
         }
@@ -199,6 +201,6 @@
 }
 
-float p_psArrayMin(const psFloatArray *restrict myArray,
-                   const psIntArray *restrict maskArray,
+float p_psArrayMin(const psVector *restrict myVector, /* FLOATS */
+                   const psVector *restrict maskVector, /* INTS */
                    unsigned int maskVal)
 {
@@ -206,16 +208,16 @@
     float min = 1e99;
 
-    if (maskArray != NULL) {
-        for (i=0;i<myArray->n;i++) {
-            if (!(maskVal & maskArray->arr[i])) {
-                if (myArray->arr[i] < min) {
-                    min = maskArray->arr[i];
+    if (maskVector != NULL) {
+        for (i=0;i<myVector->n;i++) {
+            if (!(maskVal & maskVector->vec.vecI[i])) {
+                if (myVector->vec.vecF[i] < min) {
+                    min = maskVector->vec.vecI[i];
                 }
             }
         }
     } else {
-        for (i=0;i<myArray->n;i++) {
-            if (myArray->arr[i] < min) {
-                min = maskArray->arr[i];
+        for (i=0;i<myVector->n;i++) {
+            if (myVector->vec.vecF[i] < min) {
+                min = maskVector->vec.vecI[i];
             }
         }
@@ -224,6 +226,6 @@
 }
 
-int p_psArrayNValues(const psFloatArray *restrict myArray,
-                     const psIntArray *restrict maskArray,
+int p_psArrayNValues(const psVector *restrict myVector, // float
+                     const psVector *restrict maskVector, // ints
                      unsigned int maskVal)
 {
@@ -231,18 +233,18 @@
     int numData = 0;
 
-    if (maskArray != NULL) {
-        for (i=0;i<myArray->n;i++) {
-            if (!(maskVal & maskArray->arr[i])) {
+    if (maskVector != NULL) {
+        for (i=0;i<myVector->n;i++) {
+            if (!(maskVal & maskVector->vec.vecI[i])) {
                 numData++;
             }
         }
     } else {
-        numData = myArray->n;
+        numData = myVector->n;
     }
     return(numData);
 }
 
-psStats *psArrayStats(const psFloatArray *restrict myArray,
-                      const psIntArray *restrict maskArray,
+psStats *psArrayStats(const psVector *restrict myVector, // FLOAT
+                      const psVector *restrict maskVector, // INT
                       unsigned int maskVal,
                       psStats *stats)
@@ -251,17 +253,17 @@
 
     newStruct = psStatsAlloc(stats->options);
-    if (myArray == NULL) {
+    if (myVector == NULL) {
         psError(__func__,
-                "Input data array (myArray) was NULL.");
-    }
-
-    if ((maskArray != NULL) &&
-            (myArray->n != maskArray->n)) {
-        psError(__func__, "Array data and array mask are of different sizes.");
+                "Input data array (myVector) was NULL.");
+    }
+
+    if ((maskVector != NULL) &&
+            (myVector->n != maskVector->n)) {
+        psError(__func__, "Vector data and vector mask are of different sizes.");
     }
 
     switch (stats->options) {
     case PS_STAT_SAMPLE_MEAN:
-        newStruct->max = p_psArraySampleMean(myArray, maskArray, maskVal);
+        newStruct->max = p_psArraySampleMean(myVector, maskVector, maskVal);
         break;
     case PS_STAT_SAMPLE_MEDIAN:
@@ -317,11 +319,11 @@
         break;
     case PS_STAT_MAX:
-        newStruct->max = p_psArrayMax(myArray, maskArray, maskVal);
+        newStruct->max = p_psArrayMax(myVector, maskVector, maskVal);
         break;
     case PS_STAT_MIN:
-        newStruct->min = p_psArrayMin(myArray, maskArray, maskVal);
+        newStruct->min = p_psArrayMin(myVector, maskVector, maskVal);
         break;
     case PS_STAT_NVALUES:
-        newStruct->nValues = p_psArrayNValues(myArray, maskArray, maskVal);
+        newStruct->nValues = p_psArrayNValues(myVector, maskVector, maskVal);
         break;
     default:
Index: /trunk/psLib/src/dataManip/psStats.h
===================================================================
--- /trunk/psLib/src/dataManip/psStats.h	(revision 641)
+++ /trunk/psLib/src/dataManip/psStats.h	(revision 642)
@@ -6,4 +6,72 @@
  *  \ingroup MathGroup
  */
+
+/******************************************************************************
+    The following typedefs and functions belong in the psArray.h and psArray.c
+    files.  However, those files are not available at this time, due to the
+    changing definition of the psLib data/functions.  For temporary purposes
+    only, I am including them here so that I can continue coding while our
+    basic data types are still being implemented.
+ *****************************************************************************/
+typedef enum {
+    PS_TYPE_CHAR,
+    PS_TYPE_SHORT,
+    PS_TYPE_INT,
+    PS_TYPE_LONG,
+    PS_TYPE_UCHAR,
+    PS_TYPE_USHORT,
+    PS_TYPE_UINT,
+    PS_TYPE_ULONG,
+    PS_TYPE_FLOAT,
+    PS_TYPE_DOUBLE,
+    PS_TYPE_COMPLEX,
+    PS_TYPE_OTHER,
+} psElemType;
+
+typedef enum {
+    PS_DIMEN_SCALAR,
+    PS_DIMEN_VECTOR,
+    PS_DIMEN_TRANSV,
+    PS_DIMEN_IMAGE,
+    PS_DIMEN_OTHER
+} psDimen;
+
+typedef struct
+{
+    psElemType type;
+    psDimen dimen;
+}
+psType;
+
+typedef struct
+{
+    psType type;                ///< Type of data.
+    int nalloc;                 ///< Total number of elements available.
+    int n;                      ///< Number of elements in use.
+
+    union {
+        int *vecI;
+        float *vecF;
+        double *vecD;
+        //        complex float *vecC;
+        void **vecP;
+    }vec;                       ///< Union with array data.
+}
+psVector;
+
+psVector *psVectorAlloc(int        nalloc,
+                        psElemType type)
+{
+    return(NULL);
+}
+
+psVector *psVectorRealloc(psVector myVector,
+                          int nalloc)
+{
+    return(NULL);
+}
+
+void psVectorFree(psVector *restrict psArr)
+{}
 
 /** statistics which may be calculated */
@@ -65,8 +133,9 @@
 /** Do Statistics on an array.  Returns a status value. \ingroup MathGroup */
 psStats *
-psArrayStats(const psFloatArray *restrict myArray, ///< Array to be analysed
-             const psIntArray *restrict maskArray, ///< Ignore elements where (maskArray & maskVal) != 0
-             ///< May be NULL
-             unsigned int maskVal, ///< Only mask elements with one of these bits set in maskArray
+psArrayStats(const psVector *restrict myVector, ///< Vector to be analysed
+             // must be FLOAT
+             const psVector *restrict maskVector, ///< Ignore elements where (maskVector & maskVal) != 0
+             // must be INT or NULL
+             unsigned int maskVal, ///< Only mask elements with one of these bits set in maskVector
              psStats *stats  ///< stats structure defines stats to be calculated and how
             );
@@ -87,9 +156,11 @@
 typedef struct
 {
-    const psFloatArray *restrict lower; ///< Lower bounds for the bins
-    const psFloatArray *restrict upper; ///< Upper bounds for the bins
-    psIntArray *nums;   ///< Number in each of the bins
-    float minVal, maxVal;  ///< Minimum and maximum values
-    int minNum, maxNum;   ///< Number below the minimum and above the maximum
+    const psVector *restrict lower; ///< Lower bounds for the bins (FLOAT)
+    const psVector *restrict upper; ///< Upper bounds for the bins (FLOAT)
+    psVector *nums;   ///< Number in each of the bins (INT)
+    float minVal;
+    float maxVal;  ///< Minimum and maximum values
+    int minNum;
+    int maxNum;   ///< Number below the minimum and above the maximum
 }
 psHistogram;
@@ -104,6 +175,6 @@
 /** Generic constructor \ingroup MathGroup */
 psHistogram *
-psHistogramAllocGeneric(const psFloatArray *restrict lower, ///< Lower bounds for the bins
-                        const psFloatArray *restrict upper, ///< Upper bounds for the bins
+psHistogramAllocGeneric(const psVector *restrict lower, ///< Lower bounds for the bins
+                        const psVector *restrict upper, ///< Upper bounds for the bins
                         float minVal, ///< Minimum value
                         float maxVal ///< Maximum value
@@ -119,5 +190,5 @@
 psHistogram *
 psGetArrayHistogram(psHistogram *restrict myHist, ///< Histogram data
-                    const psFloatArray *restrict myArray ///< Array to analyse
+                    const psVector *restrict myVector ///< Vector to analyse
                    );
 
Index: /trunk/psLib/src/math/psStats.c
===================================================================
--- /trunk/psLib/src/math/psStats.c	(revision 641)
+++ /trunk/psLib/src/math/psStats.c	(revision 642)
@@ -4,9 +4,11 @@
 #include <stdarg.h>
 #include "pslib.h"
-//#include "psMemory.h"
-//#include "psTrace.h"
-//#include "psString.h"
-//#include "psError.h"
-#include "psArray.h"
+#include "psMemory.h"
+#include "psTrace.h"
+#include "psString.h"
+#include "psError.h"
+/******************************************************************************
+//#include "psArray.h"
+ *****************************************************************************/
 #include "psStats.h"
 
@@ -65,7 +67,7 @@
     numBins = 1 + ((upper - lower) / size);
     newHist = (psHistogram *) psAlloc(sizeof(psHistogram));
-    newHist->lower = psFloatArrayAlloc(numBins);
-    newHist->upper = psFloatArrayAlloc(numBins);
-    newHist->nums = psIntArrayAlloc(numBins);
+    newHist->lower = psVectorAlloc(numBins, PS_TYPE_FLOAT);
+    newHist->upper = psVectorAlloc(numBins, PS_TYPE_FLOAT);
+    newHist->nums =  psVectorAlloc(numBins, PS_TYPE_INT);
     newHist->minVal = lower;
     newHist->maxVal = upper;
@@ -76,6 +78,6 @@
 }
 
-psHistogram *psHistogramAllocGeneric(const psFloatArray *restrict lower,
-                                     const psFloatArray *restrict upper,
+psHistogram *psHistogramAllocGeneric(const psVector *restrict lower,
+                                     const psVector *restrict upper,
                                      float minVal,
                                      float maxVal)
@@ -90,11 +92,11 @@
     numBins = lower->n;
     newHist = (psHistogram *) psAlloc(sizeof(psHistogram));
-    newHist->lower = psFloatArrayAlloc(numBins);
-    newHist->upper = psFloatArrayAlloc(numBins);
+    newHist->lower = psVectorAlloc(numBins, PS_TYPE_FLOAT);
+    newHist->upper = psVectorAlloc(numBins, PS_TYPE_FLOAT);
     for (i=0;i<numBins;i++) {
-        newHist->lower->arr[i] = lower->arr[i];
-        newHist->upper->arr[i] = upper->arr[i];
-    }
-    newHist->nums = psIntArrayAlloc(numBins);
+        newHist->lower->vec.vecF[i] = lower->vec.vecF[i];
+        newHist->upper->vec.vecF[i] = upper->vec.vecF[i];
+    }
+    newHist->nums = psVectorAlloc(numBins, PS_TYPE_INT);
     newHist->minVal = minVal;
     newHist->maxVal = maxVal;
@@ -124,6 +126,6 @@
         myHist->maxNum
  *****************************************************************************/
-psHistogram *psGetArrayHistogram(       psHistogram *restrict myHist,
-                                        const psFloatArray *restrict myArray)
+psHistogram *psGetArrayHistogram(psHistogram *restrict myHist,
+                                 const psVector *restrict myVector)
 {
     int i = 0;
@@ -132,14 +134,14 @@
 
     binSize = (myHist->maxVal - myHist->minVal) / (float) myHist->nums->n;
-    for (i=0;i<myArray->n;i++) {
-        if (myArray->arr[i] < myHist->minVal) {
+    for (i=0;i<myVector->n;i++) {
+        if (myVector->vec.vecF[i] < myHist->minVal) {
             myHist->minNum++;
-        } else if (myArray->arr[i] > myHist->maxVal) {
+        } else if (myVector->vec.vecF[i] > myHist->maxVal) {
             myHist->maxNum++;
         } else {
-            binNum = (int) ((myArray->arr[i] - myHist->minVal) / binSize);
-            if ((myArray->arr[i] >= myHist->lower->arr[i]) &&
-                    (myArray->arr[i] <= myHist->upper->arr[i])) {
-                myHist->nums->arr[i]++;
+            binNum = (int) ((myVector->vec.vecF[i] - myHist->minVal) / binSize);
+            if ((myVector->vec.vecF[i] >= myHist->lower->vec.vecF[i]) &&
+                    (myVector->vec.vecF[i] <= myHist->upper->vec.vecF[i])) {
+                myHist->nums->vec.vecI[i]++;
             } else {
                 psError(__func__, "data value was not within the bounds of the bin it should habe been in.");
@@ -153,6 +155,6 @@
     MISC STATISTICAL FUNCTIONS
  *****************************************************************************/
-float p_psArraySampleMean(const psFloatArray *restrict myArray,
-                          const psIntArray *restrict maskArray,
+float p_psArraySampleMean(const psVector *restrict myVector,
+                          const psVector *restrict maskVector,
                           unsigned int maskVal)
 {
@@ -160,13 +162,13 @@
     float mean = 0.0;
 
-    if (maskArray != NULL) {
-        for (i=0;i<myArray->n;i++) {
-            if (!(maskVal & maskArray->arr[i])) {
-                mean+= maskArray->arr[i];
+    if (maskVector != NULL) {
+        for (i=0;i<myVector->n;i++) {
+            if (!(maskVal & maskVector->vec.vecI[i])) {
+                mean+= maskVector->vec.vecI[i];
             }
         }
     } else {
-        for (i=0;i<myArray->n;i++) {
-            mean+= maskArray->arr[i];
+        for (i=0;i<myVector->n;i++) {
+            mean+= maskVector->vec.vecI[i];
         }
     }
@@ -174,6 +176,6 @@
 }
 
-float p_psArrayMax(const psFloatArray *restrict myArray,
-                   const psIntArray *restrict maskArray,
+float p_psArrayMax(const psVector *restrict myVector,
+                   const psVector *restrict maskVector,
                    unsigned int maskVal)
 {
@@ -181,16 +183,16 @@
     float max = -1e99;
 
-    if (maskArray != NULL) {
-        for (i=0;i<myArray->n;i++) {
-            if (!(maskVal & maskArray->arr[i])) {
-                if (myArray->arr[i] > max) {
-                    max = maskArray->arr[i];
+    if (maskVector != NULL) {
+        for (i=0;i<myVector->n;i++) {
+            if (!(maskVal & maskVector->vec.vecI[i])) {
+                if (myVector->vec.vecF[i] > max) {
+                    max = maskVector->vec.vecI[i];
                 }
             }
         }
     } else {
-        for (i=0;i<myArray->n;i++) {
-            if (myArray->arr[i] > max) {
-                max = maskArray->arr[i];
+        for (i=0;i<myVector->n;i++) {
+            if (myVector->vec.vecF[i] > max) {
+                max = maskVector->vec.vecI[i];
             }
         }
@@ -199,6 +201,6 @@
 }
 
-float p_psArrayMin(const psFloatArray *restrict myArray,
-                   const psIntArray *restrict maskArray,
+float p_psArrayMin(const psVector *restrict myVector, /* FLOATS */
+                   const psVector *restrict maskVector, /* INTS */
                    unsigned int maskVal)
 {
@@ -206,16 +208,16 @@
     float min = 1e99;
 
-    if (maskArray != NULL) {
-        for (i=0;i<myArray->n;i++) {
-            if (!(maskVal & maskArray->arr[i])) {
-                if (myArray->arr[i] < min) {
-                    min = maskArray->arr[i];
+    if (maskVector != NULL) {
+        for (i=0;i<myVector->n;i++) {
+            if (!(maskVal & maskVector->vec.vecI[i])) {
+                if (myVector->vec.vecF[i] < min) {
+                    min = maskVector->vec.vecI[i];
                 }
             }
         }
     } else {
-        for (i=0;i<myArray->n;i++) {
-            if (myArray->arr[i] < min) {
-                min = maskArray->arr[i];
+        for (i=0;i<myVector->n;i++) {
+            if (myVector->vec.vecF[i] < min) {
+                min = maskVector->vec.vecI[i];
             }
         }
@@ -224,6 +226,6 @@
 }
 
-int p_psArrayNValues(const psFloatArray *restrict myArray,
-                     const psIntArray *restrict maskArray,
+int p_psArrayNValues(const psVector *restrict myVector, // float
+                     const psVector *restrict maskVector, // ints
                      unsigned int maskVal)
 {
@@ -231,18 +233,18 @@
     int numData = 0;
 
-    if (maskArray != NULL) {
-        for (i=0;i<myArray->n;i++) {
-            if (!(maskVal & maskArray->arr[i])) {
+    if (maskVector != NULL) {
+        for (i=0;i<myVector->n;i++) {
+            if (!(maskVal & maskVector->vec.vecI[i])) {
                 numData++;
             }
         }
     } else {
-        numData = myArray->n;
+        numData = myVector->n;
     }
     return(numData);
 }
 
-psStats *psArrayStats(const psFloatArray *restrict myArray,
-                      const psIntArray *restrict maskArray,
+psStats *psArrayStats(const psVector *restrict myVector, // FLOAT
+                      const psVector *restrict maskVector, // INT
                       unsigned int maskVal,
                       psStats *stats)
@@ -251,17 +253,17 @@
 
     newStruct = psStatsAlloc(stats->options);
-    if (myArray == NULL) {
+    if (myVector == NULL) {
         psError(__func__,
-                "Input data array (myArray) was NULL.");
-    }
-
-    if ((maskArray != NULL) &&
-            (myArray->n != maskArray->n)) {
-        psError(__func__, "Array data and array mask are of different sizes.");
+                "Input data array (myVector) was NULL.");
+    }
+
+    if ((maskVector != NULL) &&
+            (myVector->n != maskVector->n)) {
+        psError(__func__, "Vector data and vector mask are of different sizes.");
     }
 
     switch (stats->options) {
     case PS_STAT_SAMPLE_MEAN:
-        newStruct->max = p_psArraySampleMean(myArray, maskArray, maskVal);
+        newStruct->max = p_psArraySampleMean(myVector, maskVector, maskVal);
         break;
     case PS_STAT_SAMPLE_MEDIAN:
@@ -317,11 +319,11 @@
         break;
     case PS_STAT_MAX:
-        newStruct->max = p_psArrayMax(myArray, maskArray, maskVal);
+        newStruct->max = p_psArrayMax(myVector, maskVector, maskVal);
         break;
     case PS_STAT_MIN:
-        newStruct->min = p_psArrayMin(myArray, maskArray, maskVal);
+        newStruct->min = p_psArrayMin(myVector, maskVector, maskVal);
         break;
     case PS_STAT_NVALUES:
-        newStruct->nValues = p_psArrayNValues(myArray, maskArray, maskVal);
+        newStruct->nValues = p_psArrayNValues(myVector, maskVector, maskVal);
         break;
     default:
Index: /trunk/psLib/src/math/psStats.h
===================================================================
--- /trunk/psLib/src/math/psStats.h	(revision 641)
+++ /trunk/psLib/src/math/psStats.h	(revision 642)
@@ -6,4 +6,72 @@
  *  \ingroup MathGroup
  */
+
+/******************************************************************************
+    The following typedefs and functions belong in the psArray.h and psArray.c
+    files.  However, those files are not available at this time, due to the
+    changing definition of the psLib data/functions.  For temporary purposes
+    only, I am including them here so that I can continue coding while our
+    basic data types are still being implemented.
+ *****************************************************************************/
+typedef enum {
+    PS_TYPE_CHAR,
+    PS_TYPE_SHORT,
+    PS_TYPE_INT,
+    PS_TYPE_LONG,
+    PS_TYPE_UCHAR,
+    PS_TYPE_USHORT,
+    PS_TYPE_UINT,
+    PS_TYPE_ULONG,
+    PS_TYPE_FLOAT,
+    PS_TYPE_DOUBLE,
+    PS_TYPE_COMPLEX,
+    PS_TYPE_OTHER,
+} psElemType;
+
+typedef enum {
+    PS_DIMEN_SCALAR,
+    PS_DIMEN_VECTOR,
+    PS_DIMEN_TRANSV,
+    PS_DIMEN_IMAGE,
+    PS_DIMEN_OTHER
+} psDimen;
+
+typedef struct
+{
+    psElemType type;
+    psDimen dimen;
+}
+psType;
+
+typedef struct
+{
+    psType type;                ///< Type of data.
+    int nalloc;                 ///< Total number of elements available.
+    int n;                      ///< Number of elements in use.
+
+    union {
+        int *vecI;
+        float *vecF;
+        double *vecD;
+        //        complex float *vecC;
+        void **vecP;
+    }vec;                       ///< Union with array data.
+}
+psVector;
+
+psVector *psVectorAlloc(int        nalloc,
+                        psElemType type)
+{
+    return(NULL);
+}
+
+psVector *psVectorRealloc(psVector myVector,
+                          int nalloc)
+{
+    return(NULL);
+}
+
+void psVectorFree(psVector *restrict psArr)
+{}
 
 /** statistics which may be calculated */
@@ -65,8 +133,9 @@
 /** Do Statistics on an array.  Returns a status value. \ingroup MathGroup */
 psStats *
-psArrayStats(const psFloatArray *restrict myArray, ///< Array to be analysed
-             const psIntArray *restrict maskArray, ///< Ignore elements where (maskArray & maskVal) != 0
-             ///< May be NULL
-             unsigned int maskVal, ///< Only mask elements with one of these bits set in maskArray
+psArrayStats(const psVector *restrict myVector, ///< Vector to be analysed
+             // must be FLOAT
+             const psVector *restrict maskVector, ///< Ignore elements where (maskVector & maskVal) != 0
+             // must be INT or NULL
+             unsigned int maskVal, ///< Only mask elements with one of these bits set in maskVector
              psStats *stats  ///< stats structure defines stats to be calculated and how
             );
@@ -87,9 +156,11 @@
 typedef struct
 {
-    const psFloatArray *restrict lower; ///< Lower bounds for the bins
-    const psFloatArray *restrict upper; ///< Upper bounds for the bins
-    psIntArray *nums;   ///< Number in each of the bins
-    float minVal, maxVal;  ///< Minimum and maximum values
-    int minNum, maxNum;   ///< Number below the minimum and above the maximum
+    const psVector *restrict lower; ///< Lower bounds for the bins (FLOAT)
+    const psVector *restrict upper; ///< Upper bounds for the bins (FLOAT)
+    psVector *nums;   ///< Number in each of the bins (INT)
+    float minVal;
+    float maxVal;  ///< Minimum and maximum values
+    int minNum;
+    int maxNum;   ///< Number below the minimum and above the maximum
 }
 psHistogram;
@@ -104,6 +175,6 @@
 /** Generic constructor \ingroup MathGroup */
 psHistogram *
-psHistogramAllocGeneric(const psFloatArray *restrict lower, ///< Lower bounds for the bins
-                        const psFloatArray *restrict upper, ///< Upper bounds for the bins
+psHistogramAllocGeneric(const psVector *restrict lower, ///< Lower bounds for the bins
+                        const psVector *restrict upper, ///< Upper bounds for the bins
                         float minVal, ///< Minimum value
                         float maxVal ///< Maximum value
@@ -119,5 +190,5 @@
 psHistogram *
 psGetArrayHistogram(psHistogram *restrict myHist, ///< Histogram data
-                    const psFloatArray *restrict myArray ///< Array to analyse
+                    const psVector *restrict myVector ///< Vector to analyse
                    );
 
