Index Page
cspice_removi
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_REMOVI removes an item from a integer set.

   For important details concerning this module's function, please refer to
   the CSPICE routine removi_c.

I/O

   
   Given:

      item   is a integer item or N-vector of items to remove  
             from the specified set. 'item' may or may not already 
             be an element of the set. 

             Note: when deleting multiple items to 'set', pass the routine
             a vector instead of using a loop to delete one element 
             at a time.

      set    is an Icy set. The user must create 'set' using
             cspice_celli. 

             On input, 'set' may or may not contain the input 'item' 
             as an element. 


   the call:

      cspice_removi, items, set

   returns:

      set   on output contains the difference of input 'set' and
            input 'item'. If the item is not an element of
            'set', the set is not changed.

Examples


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

      ;;
      ;; Create a cell for ten elements.
      ;;
      SIZE = 10

      set = cspice_celli( SIZE )

      ;;
      ;; Now insert a list of items.
      ;;
      items = [ 0, 1, 1, 2, 3, 5, 8, 13, 21 ]

      cspice_insrti, items, set

      ;;
      ;; Remove the even values.
      ;; 
      items = [ 0, 2, 4, 6, 8, 12 ]

      cspice_removi, items, set

      ;;
      ;; Output the contents of 'set'. Recall
      ;; set data begins at 'set.base[ set.data + 0 ]'.
      ;;
      for i=0, cspice_card(set)-1 do begin
         print, set.base[ set.data + i]
      endfor 

   IDL outputs:
   
           1
           3
           5
          13
          21

Particulars


   The user must create any needed cell structures with cspice_celld
   or cspice_celli prior to use regardless of whether the routine 
   uses the cell as input or returns it as output.
   

Required Reading


   ICY.REQ
   CELLS.REQ
   SETS.REQ

Version


   -Icy Version 1.0.1, 28-SEP-2006, EDW (JPL)

      Corrections to English.

      Correct Required Reading citation CELL.REQ to CELLS.REQ.

   -Icy Version 1.0.0, 21-FEB-2005, EDW (JPL)


Index_Entries

 
   remove an item from an integer set 
 



Wed Apr  5 17:58:03 2017