| Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.stsci.edu/~sontag/spicedocs/cspice/removd_c.html Дата изменения: Sat Dec 17 06:09:33 2005 Дата индексирования: Mon Apr 11 00:07:44 2016 Кодировка: | 
Remove an item from a double precision set.
SETS
VARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- item I Item to be removed. set I/O Removal set.
   item        is an item which is to be removed from the specified
               set. item may or may not already be an element of the
               set.
   set         is a CSPICE set.  set must be declared as a double
               precision SpiceCell.
               On input, set may or may not contain the input item 
               as an element. 
   set         on output contains the difference of the input set and
               the input item. If the item is not an element of the
               set, the set is not changed.
None.
None.
   1) In the following code fragment, a list of camera exposure
      durations are taken from the array expList and inserted into the
      set expDur.
      We then update the set by removing the element 30.0 and 
      inserting 20.0 in its place.
         #include "SpiceUsr.h"
                .
                .
                .
         /.
         The number of list items is NLIST.
         ./
         SpiceDouble        expList[NLIST] = 
                            { 
                               0.5, 2.0, 0.5, 30.0, 0.01, 30.0 
                            };
         /.
         Declare the set with maximum number of elements MAXSIZ.
         ./
         SPICEDOUBLE_CELL ( expDur,   MAXSIZ );
                .
                .
                .
         for ( i = 0;  i < NLIST;  i++ )
         {
            insrtd_c ( expList[i], &expDur );
         }
         /.
         At this point expDur contains the set
           { 0.01, 0.5, 2.0, 30.0 }
         ./
                .
                .
                .
         /. 
         Update the exposure set by replacing 30.0 with 20.0.
         ./
         removd_c ( 30.0, &expDur );
         insrtd_c ( 20.0, &expDur ); 
None.
   1) If the input set argument is a SpiceCell of type other than
      double precision, the error SPICE(TYPEMISMATCH) is signaled.
   2) 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.
None.
N.J. Bachman (JPL) C.A. Curzon (JPL) W.L. Taber (JPL) I.M. Underwood (JPL)
None.
-CSPICE Version 1.0.0, 07-AUG-2002 (NJB) (CAC) (WLT) (IMU)
remove an item from a d.p. set