Index: trunk/psLib/src/collections/psArray.c
===================================================================
--- trunk/psLib/src/collections/psArray.c	(revision 3148)
+++ trunk/psLib/src/collections/psArray.c	(revision 3165)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-02-03 00:54:10 $
+ *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-02-09 01:04:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -157,2 +157,51 @@
     return in;
 }
+
+/// Set an element in the array.
+psBool psArraySet(psArray* in,                       ///< input array to set element in
+                  psU32 position,                    ///< the element position to set
+                  void* value)                       ///< the value to set it to
+{
+    if (in == NULL)
+    {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psArray_ARRAY_NULL);
+        return false;
+    }
+
+    if (position >= in->nalloc)
+    {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psArray_POSITION_BEYOND_NALLOC,
+                position, in->nalloc);
+        return false;
+    }
+
+    psFree(in->data[position]);
+    in->data[position] = value;
+
+    return true;
+}
+
+/// Get an element in the array.
+void* psArrayGet(psArray* in, psU32 position )
+{
+    if (in == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psArray_ARRAY_NULL);
+        return NULL;
+    }
+
+    if (position >= in->nalloc) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psArray_POSITION_BEYOND_NALLOC,
+                position, in->nalloc);
+        return NULL;
+    }
+
+    return in->data[position];
+}
+
+
+
+
Index: trunk/psLib/src/collections/psArray.h
===================================================================
--- trunk/psLib/src/collections/psArray.h	(revision 3148)
+++ trunk/psLib/src/collections/psArray.h	(revision 3165)
@@ -12,6 +12,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-02-03 00:54:10 $
+ *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-02-09 01:04:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -126,4 +126,24 @@
 );
 
+/** Set an element in the array.  If the current element is non-NULL, the old
+ *  element is freed.
+ *
+ *  @return psBool  TRUE if the element was set successfully, otherwise FALSE
+ */
+psBool psArraySet(
+    psArray* in,                       ///< input array to set element in
+    psU32 position,                    ///< the element position to set
+    void* value                        ///< the value to set it to
+);
+
+/** Get an element from the array.
+ *
+ *  @return void*   the element at given position.
+ */
+void* psArrayGet(
+    psArray* in,                       ///< input array to get element from
+    psU32 position                     ///< the element position to get
+);
+
 /// @}
 
Index: trunk/psLib/src/collections/psCollectionsErrors.dat
===================================================================
--- trunk/psLib/src/collections/psCollectionsErrors.dat	(revision 3148)
+++ trunk/psLib/src/collections/psCollectionsErrors.dat	(revision 3165)
@@ -10,4 +10,5 @@
 psArray_REALLOC_NULL                   psArrayRealloc must be given a non-NULL psArray to resize.
 psArray_ARRAY_NULL                     Specified psArray can not be NULL.
+psArray_POSITION_BEYOND_NALLOC         Specified position, %d, is greater than the allocated size of the array, %d.
 #
 psVector_REALLOC_NULL                  psVectorRealloc must a given a non-NULL psVector to resize.  Desired datatype unknown.
Index: trunk/psLib/src/collections/psCollectionsErrors.h
===================================================================
--- trunk/psLib/src/collections/psCollectionsErrors.h	(revision 3148)
+++ trunk/psLib/src/collections/psCollectionsErrors.h	(revision 3165)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-02-02 20:21:48 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-02-09 01:04:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -32,4 +32,5 @@
 #define PS_ERRORTEXT_psArray_REALLOC_NULL "psArrayRealloc must be given a non-NULL psArray to resize."
 #define PS_ERRORTEXT_psArray_ARRAY_NULL "Specified psArray can not be NULL."
+#define PS_ERRORTEXT_psArray_POSITION_BEYOND_NALLOC "Specified position, %d, is greater than the allocated size of the array, %d."
 #define PS_ERRORTEXT_psVector_REALLOC_NULL "psVectorRealloc must a given a non-NULL psVector to resize.  Desired datatype unknown."
 #define PS_ERRORTEXT_psVector_NOT_A_VECTOR "The input psVector must have a vector dimension type."
