IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 9, 2004, 2:29:09 PM (22 years ago)
Author:
harman
Message:

Added more error checks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/collections/psBitSet.h

    r614 r965  
    44 *
    55 *  Bit masks are useful tools for toggling various flags and options. This set of functions module provides
    6  *  a mechanism to create an array of bits of arbitrary length and manipulate them with basic binary 
     6 *  a mechanism to create an array of bits of arbitrary length and manipulate them with basic binary
    77 *  operations. A print function is also provided to display the entire set of bits in binary format as a
    88 *  string.
    99 *
    1010 *  @author Ross Harman, MHPCC
    11  *   
    12  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-05-08 00:08:27 $
     11 *
     12 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-06-10 00:28:58 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2525/** Struct containing array of bytes to hold bit data and corresponding array length.
    2626 *
    27  *  The bits in the struct are assembled in as an array of bytes with eight bits per byte. The bits are 
     27 *  The bits in the struct are assembled in as an array of bytes with eight bits per byte. The bits are
    2828 *  arranged with the LSB in first (right most) position of the first array element.
    2929 */
     
    4141/** Allocate a psBitSet.
    4242 *
    43  *  Create a psBitSet with the number of bytes specified by the user. All bits are set to zero upon 
     43 *  Create a psBitSet with the number of bytes specified by the user. All bits are set to zero upon
    4444 *  allocation.
    4545 *
     
    4848/*@null@*/
    4949psBitSet* psBitSetAlloc(
    50     int n   /**< Number of bytes in psBitSet array */
     50    int n   /**< Number of bits in psBitSet array */
    5151);
    5252
     
    6161/** Set a bit.
    6262 *
    63  *  Sets a bit at a given bit location, either one or zero. The bit is set based on a zero index with the 
     63 *  Sets a bit at a given bit location, either one or zero. The bit is set based on a zero index with the
    6464 *  first bit set in the zero bit slot of the zero element of the byte array. As an example, setting bit 3 in
    6565 *  an array with two elements would result in an psBitSet that looks like 00000000 00001000.
     
    7474/** Test the value of a bit.
    7575 *
    76  *  Prints the value of a bit at a given bit location, either one or zero. The resulting bit is based on a 
    77  *  zero index format with the first bit set in the zero bit slot of the zero element of the byte array 
     76 *  Prints the value of a bit at a given bit location, either one or zero. The resulting bit is based on a
     77 *  zero index format with the first bit set in the zero bit slot of the zero element of the byte array
    7878 *  As an example, testing bit 3 in a psBitSet with two bytes that looks like 00000000 00001000 would return a
    7979 *  value of one, since that is the value that was set.
Note: See TracChangeset for help on using the changeset viewer.