Index: /trunk/doc/pslib/psLibSDRS.tex
===================================================================
--- /trunk/doc/pslib/psLibSDRS.tex	(revision 1038)
+++ /trunk/doc/pslib/psLibSDRS.tex	(revision 1039)
@@ -1,3 +1,3 @@
-%%% $Id: psLibSDRS.tex,v 1.56 2004-06-09 22:16:39 price Exp $
+%%% $Id: psLibSDRS.tex,v 1.57 2004-06-15 00:51:08 eugene Exp $
 \documentclass[panstarrs]{panstarrs}
 
@@ -1164,18 +1164,20 @@
 In these functions, \code{nalloc} is the number of elements to
 allocate.  For \code{psVectorAlloc}, the value of \code{psVector.n} is
-set to 0.  For \code{psVectorRealloc}, if the value of \code{nalloc}
-is smaller than the current value of \code{psVector.n}, then
-\code{psVector.n} is set to \code{nalloc}, the array is adjusted down
-to match \code{nalloc}, and the extra elements are lost.  If
-\code{nalloc} is larger than the current value of \code{psVector.n},
-\code{psVector.n} is left intact.  If the value of \code{myArray} is
-\code{NULL}, then \code{psVectorRealloc} must return an error.  In
-\code{psVectorFree}, the function \code{elemFree} is required for
-arrays of pointer types; it is the destructor appropriate to the data
-pointed to by the pointers.  This function, which may be \code{NULL},
-is called for each existing element of the array before the array
-itself is freed.  If the function is \code{NULL}, the elements are are
-not freed.  This function must not be defined for any data type except
-the \code{void} pointer array.
+set to \code{nalloc}.  Users may choose to restrict the data range
+after the \code{psVectorAlloc} function is called.  For
+\code{psVectorRealloc}, if the value of \code{nalloc} is smaller than
+the current value of \code{psVector.n}, then \code{psVector.n} is set
+to \code{nalloc}, the array is adjusted down to match \code{nalloc},
+and the extra elements are lost.  If \code{nalloc} is larger than the
+current value of \code{psVector.n}, \code{psVector.n} is left intact.
+If the value of \code{myArray} is \code{NULL}, then
+\code{psVectorRealloc} must return an error.  In \code{psVectorFree},
+the function \code{elemFree} is required for arrays of pointer types;
+it is the destructor appropriate to the data pointed to by the
+pointers.  This function, which may be \code{NULL}, is called for each
+existing element of the array before the array itself is freed.  If
+the function is \code{NULL}, the elements are are not freed.  This
+function must not be defined for any data type except the \code{void}
+pointer array.
 
 \subsection{Simple Images}
@@ -1483,9 +1485,9 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-\subsection{Bitsets}
-
-Bitsets are required in order to turn options on and off.  We require
+\subsection{BitSets}
+
+BitSets are required in order to turn options on and off.  We require
 the capability to have a bitset of arbitrary length (i.e., not limited
-by the length of a \code{long}, say).  The \code{psBitset} structure
+by the length of a \code{long}, say).  The \code{psBitSet} structure
 is defined below.  Note that the entry \code{bits} is an array of type
 \code{char} storing the bits as bits of each byte in the array, with 8
@@ -1498,11 +1500,11 @@
     int n;                              ///< Number of chars that form the bitset
     char *bits;                         ///< The bits
-} psBitset;
+} psBitSet;
 \end{verbatim}
 
 We also require the corresponding constructor and destructor:
 \begin{verbatim}
-psBitset *psBitsetAlloc(int n);
-void psBitsetFree(psBitset *restrict myBits);
+psBitSet *psBitSetAlloc(int n);
+void psBitSetFree(psBitSet *restrict myBits);
 \end{verbatim}
 where \code{n} is the requested number of bits.
@@ -1518,18 +1520,18 @@
 
 \begin{verbatim}
-psBitset *psBitsetSet(psBitset *restrict myBits, int bit);
-psBitset *psBitsetOp(psBitset *outBits, 
-                     const psBitset *restrict inBits1,
+psBitSet *psBitSetSet(psBitSet *restrict myBits, int bit);
+psBitSet *psBitSetOp(psBitSet *outBits, 
+                     const psBitSet *restrict inBits1,
                      char *operator, 
-                     const psBitset *restrict inBits2);
-psBitset *psBitsetNot(psBitset *out, psBitset *in);
-int psBitsetTest(const psBitset *restrict checkBits, int bit);
-\end{verbatim}
-
-\code{psBitsetSet} sets the specified \code{bit} in the
-\code{psBitset}, and returns the updated bitset.  The input bitset
+                     const psBitSet *restrict inBits2);
+psBitSet *psBitSetNot(psBitSet *out, psBitSet *in);
+bool psBitSetTest(const psBitSet *restrict checkBits, int bit);
+\end{verbatim}
+
+\code{psBitSetSet} sets the specified \code{bit} in the
+\code{psBitSet}, and returns the updated bitset.  The input bitset
 will be modified.
 
-\code{psBitsetOp} returns the \code{psBitset} that is the result of
+\code{psBitSetOp} returns the \code{psBitSet} that is the result of
 performing the specified \code{operator} (one of \code{"AND"},
 \code{"OR"}, or \code{"XOR"}) on \code{inBits1} and \code{inBits2}.
@@ -1537,9 +1539,9 @@
 the function.
 
-\code{psBitsetNot} applies a unary \code{NOT} to a bitset, placing the
+\code{psBitSetNot} applies a unary \code{NOT} to a bitset, placing the
 answer in the bitset \code{out}, or creating a new bitset if
 \code{out} is \code{NULL}.
 
-Finally, \code{psBitsetTest} returns a true value if the specified
+Finally, \code{psBitSetTest} returns a true value if the specified
 \code{bit} is set; otherwise, it returns a false value.
 
@@ -1564,7 +1566,9 @@
 in \code{x}.  In order to facilitate this, we will have a sort
 function return a vector containing the indices for the unsorted list
-in the order appropriate for the sorted vector.  The output vector must
-be of type \code{psU32}.  This function is specified for input types
-\code{psU8, psU16, psF32, psF64}.
+in the order appropriate for the sorted vector, sorted from the
+smallest (i.e.\ most negative) value in the first element, and the
+largest (i.e.\ most positive) value in the last element.  The output
+vector must be of type \code{psU32}.  This function is specified for
+input types \code{psU8, psU16, psF32, psF64}.
 
 \begin{verbatim}
