SpiceBoolean elemd_c ( SpiceDouble item,
SpiceCell * set )
Determine whether an item is an element of a double precision set.
SETS
CELLS, SETS
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.
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.
The function returns SPICETRUE if item is a member of the set,
and returns SPICEFALSE otherwise.
None.
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.
None.
This routine uses a binary search to check for the presence in the set
of the specified item.
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 )
None.
None.
N.J. Bachman (JPL)
C.A. Curzon (JPL)
H.A. Neilan (JPL)
W.L. Taber (JPL)
I.M. Underwood (JPL)
-CSPICE Version 1.0.0, 07-AUG-2002 (NJB) (CAC) (HAN) (WLT) (IMU)
element of a d.p. set
Link to routine elemd_c source file elemd_c.c
|