Index Page elemd_c
A B C D E F G H I J K L M N O P Q R S T U V W X
Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries
#### Procedure
       SpiceBoolean elemd_c ( SpiceDouble     item,
                              SpiceCell     * set   )
#### Abstract
       Determine whether an item is an element of a double precision set.
#### Required_Reading
       SETS
#### Keywords
       CELLS, SETS
#### Brief_I/O
       VARIABLE  I/O  DESCRIPTION
       --------  ---  --------------------------------------------------
       item       I   Item to be tested.
       set        I   Set to be tested.

       The function returns SPICETRUE if item is an element of set.
#### Detailed_Input
       item        is an item which may or may not be an element of
                   the input set.

       set         is a CSPICE set.  set must be declared as a double
                   precision SpiceCell.
#### Detailed_Output
       The function returns SPICETRUE if item is a member of the set,
       and returns SPICEFALSE otherwise.
#### Parameters
       None.
#### Exceptions
       1) If the input set argument does not qualify as a CSPICE set,
          the error SPICE(NOTASET) will be signaled.  CSPICE sets have
          their data elements sorted in increasing order and contain
          no duplicate data elements.

       2) If the input set does not have double precision data type,
          the error SPICE(TYPEMISMATCH will be signaled.
#### Files
       None.
#### Particulars
       This routine uses a binary search to check for the presence in the set
       of the specified item.
#### Examples
       Let set contain the elements

          { -1.0, 0.0, 1.0, 3.0, 5.0 }

       The the following expressions have the value SPICETRUE

          elemd_c ( -1.0, &set )
          elemd_c (  0.0, &set )
          elemd_c (  3.0, &set )

       and the following expressions have the value SPICEFALSE

          elemd_c ( -2.0, &set )
          elemd_c (  2.0, &set )
          elemd_c (  6.0, &set )
#### Restrictions
       None.
#### Literature_References
       None.
#### Author_and_Institution
       N.J. Bachman    (JPL)
       C.A. Curzon     (JPL)
       H.A. Neilan     (JPL)
       W.L. Taber      (JPL)
       I.M. Underwood  (JPL)
#### Version
       -CSPICE Version 1.0.0, 07-AUG-2002 (NJB) (CAC) (HAN) (WLT) (IMU)
#### Index_Entries
       element of a d.p. set
#### Link to routine elemd_c source file elemd_c.c

    Wed Jun  9 13:05:23 2010