IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 14, 2004, 2:51:08 PM (22 years ago)
Author:
eugene
Message:

minor changes based on bugzilla suggestions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/psLibSDRS.tex

    r961 r1039  
    1 %%% $Id: psLibSDRS.tex,v 1.56 2004-06-09 22:16:39 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.57 2004-06-15 00:51:08 eugene Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    11641164In these functions, \code{nalloc} is the number of elements to
    11651165allocate.  For \code{psVectorAlloc}, the value of \code{psVector.n} is
    1166 set to 0.  For \code{psVectorRealloc}, if the value of \code{nalloc}
    1167 is smaller than the current value of \code{psVector.n}, then
    1168 \code{psVector.n} is set to \code{nalloc}, the array is adjusted down
    1169 to match \code{nalloc}, and the extra elements are lost.  If
    1170 \code{nalloc} is larger than the current value of \code{psVector.n},
    1171 \code{psVector.n} is left intact.  If the value of \code{myArray} is
    1172 \code{NULL}, then \code{psVectorRealloc} must return an error.  In
    1173 \code{psVectorFree}, the function \code{elemFree} is required for
    1174 arrays of pointer types; it is the destructor appropriate to the data
    1175 pointed to by the pointers.  This function, which may be \code{NULL},
    1176 is called for each existing element of the array before the array
    1177 itself is freed.  If the function is \code{NULL}, the elements are are
    1178 not freed.  This function must not be defined for any data type except
    1179 the \code{void} pointer array.
     1166set to \code{nalloc}.  Users may choose to restrict the data range
     1167after the \code{psVectorAlloc} function is called.  For
     1168\code{psVectorRealloc}, if the value of \code{nalloc} is smaller than
     1169the current value of \code{psVector.n}, then \code{psVector.n} is set
     1170to \code{nalloc}, the array is adjusted down to match \code{nalloc},
     1171and the extra elements are lost.  If \code{nalloc} is larger than the
     1172current value of \code{psVector.n}, \code{psVector.n} is left intact.
     1173If the value of \code{myArray} is \code{NULL}, then
     1174\code{psVectorRealloc} must return an error.  In \code{psVectorFree},
     1175the function \code{elemFree} is required for arrays of pointer types;
     1176it is the destructor appropriate to the data pointed to by the
     1177pointers.  This function, which may be \code{NULL}, is called for each
     1178existing element of the array before the array itself is freed.  If
     1179the function is \code{NULL}, the elements are are not freed.  This
     1180function must not be defined for any data type except the \code{void}
     1181pointer array.
    11801182
    11811183\subsection{Simple Images}
     
    14831485%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    14841486
    1485 \subsection{Bitsets}
    1486 
    1487 Bitsets are required in order to turn options on and off.  We require
     1487\subsection{BitSets}
     1488
     1489BitSets are required in order to turn options on and off.  We require
    14881490the capability to have a bitset of arbitrary length (i.e., not limited
    1489 by the length of a \code{long}, say).  The \code{psBitset} structure
     1491by the length of a \code{long}, say).  The \code{psBitSet} structure
    14901492is defined below.  Note that the entry \code{bits} is an array of type
    14911493\code{char} storing the bits as bits of each byte in the array, with 8
     
    14981500    int n;                              ///< Number of chars that form the bitset
    14991501    char *bits;                         ///< The bits
    1500 } psBitset;
     1502} psBitSet;
    15011503\end{verbatim}
    15021504
    15031505We also require the corresponding constructor and destructor:
    15041506\begin{verbatim}
    1505 psBitset *psBitsetAlloc(int n);
    1506 void psBitsetFree(psBitset *restrict myBits);
     1507psBitSet *psBitSetAlloc(int n);
     1508void psBitSetFree(psBitSet *restrict myBits);
    15071509\end{verbatim}
    15081510where \code{n} is the requested number of bits.
     
    15181520
    15191521\begin{verbatim}
    1520 psBitset *psBitsetSet(psBitset *restrict myBits, int bit);
    1521 psBitset *psBitsetOp(psBitset *outBits,
    1522                      const psBitset *restrict inBits1,
     1522psBitSet *psBitSetSet(psBitSet *restrict myBits, int bit);
     1523psBitSet *psBitSetOp(psBitSet *outBits,
     1524                     const psBitSet *restrict inBits1,
    15231525                     char *operator,
    1524                      const psBitset *restrict inBits2);
    1525 psBitset *psBitsetNot(psBitset *out, psBitset *in);
    1526 int psBitsetTest(const psBitset *restrict checkBits, int bit);
    1527 \end{verbatim}
    1528 
    1529 \code{psBitsetSet} sets the specified \code{bit} in the
    1530 \code{psBitset}, and returns the updated bitset.  The input bitset
     1526                     const psBitSet *restrict inBits2);
     1527psBitSet *psBitSetNot(psBitSet *out, psBitSet *in);
     1528bool psBitSetTest(const psBitSet *restrict checkBits, int bit);
     1529\end{verbatim}
     1530
     1531\code{psBitSetSet} sets the specified \code{bit} in the
     1532\code{psBitSet}, and returns the updated bitset.  The input bitset
    15311533will be modified.
    15321534
    1533 \code{psBitsetOp} returns the \code{psBitset} that is the result of
     1535\code{psBitSetOp} returns the \code{psBitSet} that is the result of
    15341536performing the specified \code{operator} (one of \code{"AND"},
    15351537\code{"OR"}, or \code{"XOR"}) on \code{inBits1} and \code{inBits2}.
     
    15371539the function.
    15381540
    1539 \code{psBitsetNot} applies a unary \code{NOT} to a bitset, placing the
     1541\code{psBitSetNot} applies a unary \code{NOT} to a bitset, placing the
    15401542answer in the bitset \code{out}, or creating a new bitset if
    15411543\code{out} is \code{NULL}.
    15421544
    1543 Finally, \code{psBitsetTest} returns a true value if the specified
     1545Finally, \code{psBitSetTest} returns a true value if the specified
    15441546\code{bit} is set; otherwise, it returns a false value.
    15451547
     
    15641566in \code{x}.  In order to facilitate this, we will have a sort
    15651567function return a vector containing the indices for the unsorted list
    1566 in the order appropriate for the sorted vector.  The output vector must
    1567 be of type \code{psU32}.  This function is specified for input types
    1568 \code{psU8, psU16, psF32, psF64}.
     1568in the order appropriate for the sorted vector, sorted from the
     1569smallest (i.e.\ most negative) value in the first element, and the
     1570largest (i.e.\ most positive) value in the last element.  The output
     1571vector must be of type \code{psU32}.  This function is specified for
     1572input types \code{psU8, psU16, psF32, psF64}.
    15691573
    15701574\begin{verbatim}
Note: See TracChangeset for help on using the changeset viewer.