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

Table of contents
Abstract
I/O
Parameters
Examples
Particulars
Exceptions
Files
Restrictions
Required_Reading
Literature_References
Author_and_Institution
Version
Index_Entries


Abstract


   CSPICE_WNINCD determines whether an interval is
   included in a double precision window.

I/O


   Given:

      left,
      right    the scalar, double precision endpoints of an interval, which may
               or may not be contained in one of the intervals in `window'.

               help, left
                  DOUBLE = Scalar
               help, right
                  DOUBLE = Scalar

      window   scalar, double precision window, containing zero or more
               intervals.

               help, window
                  STRUCT = cspice_celld(2*N)

               The user must create `window' using
               cspice_celld.

   the call:

      wnincd = cspice_wnincd( left, right, window )

   returns:

      wnincd   a scalar boolean, True if the input interval is included
               in the input `window' --- that is, if

                  a(i)  <  left  <  right  <  b(i)
                        -        -         -

               for some interval [ a(i), b(i) ] in `window' --- and returns
               False otherwise.

               help, wnincd
                  BOOLEAN = Scalar

Parameters


   None.

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.

   1) Identify the intervals, from a set, that are contained within
      a given window.

      Example code begins here.


      PRO wnincd_ex1

         ;;
         ;; Create a cell containing a double precision
         ;; 6-vector.
         ;;
         win1 = cspice_celld( 6 )

         ;;
         ;; Define a window with three intervals.
         ;;
         darray = [ [ 1.d, 3.0], [ 7.0, 11.0], [23.0, 27.0] ]

         ;;
         ;; Add the window data to the cell.
         ;;
         for i=0, 2 do begin

            cspice_wninsd, darray[0,i], darray[1,i], win1

         endfor

         ;;
         ;; Define a set of test intervals.
         ;;
         test_array = [ [ 1.d, 3.d0], [ 9.d, 10.d], $
                        [ 0.d, 2.d0], [13.d, 15.d], $
                        [29.d,30.d] ]

         for i=0, (n_elements(test_array)/2) -1 do begin

           if( cspice_wnincd( test_array[0,i], $
                              test_array[1,i], win1) ) then begin

               print, test_array[0,i], test_array[1,i], +$
                             " - an element of the window"

            endif else begin

               print, test_array[0,i], test_array[1,i], +$
                         " - not an element of the window"

            endelse

         endfor

      END


      When this program was executed on a Mac/Intel/IDL8.x/64-bit
      platform, the output was:


             1.0000000       3.0000000 - an element of the window
             9.0000000       10.000000 - an element of the window
             0.0000000       2.0000000 - not an element of the window
             13.000000       15.000000 - not an element of the window
             29.000000       30.000000 - not an element of the window


Particulars


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

Exceptions


   1)  The cardinality of the input `window' must be even. Left
       endpoints of stored intervals must be strictly greater than
       preceding right endpoints. Right endpoints must be greater
       than or equal to corresponding left endpoints. Invalid window
       data are not diagnosed by this routine and may lead to
       unpredictable results.

   2)  The order of the input interval's endpoints, `left' and `right',
       is not checked, and that this does not affect the result.

   3)  If any of the input arguments, `left', `right' or `window', is
       undefined, an error is signaled by the IDL error handling
       system.

   4)  If any of the input arguments, `left', `right' or `window', is
       not of the expected type, or it does not have the expected
       dimensions and size, an error is signaled by the Icy
       interface.

Files


   None.

Restrictions


   None.

Required_Reading


   ICY.REQ
   CELLS.REQ
   WINDOWS.REQ

Literature_References


   None.

Author_and_Institution


   J. Diaz del Rio     (ODC Space)
   E.D. Wright         (JPL)

Version


   -Icy Version 1.0.2, 01-JUN-2021 (JDR)

       Edited the header to comply with NAIF standard. Added
       example's problem statement.

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections.

       Removed reference to the routine's corresponding CSPICE header from
       -Abstract section.

       Added arguments' type and size information in the -I/O section.

   -Icy Version 1.0.1, 12-SEP-2006 (EDW)

       Correct Required Reading citation cell.req to cells.req.

   -Icy Version 1.0.0, 08-AUG-2004 (EDW)

Index_Entries


   included in a d.p. window



Fri Dec 31 18:43:09 2021