Index Page wncomd_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
       void wncomd_c ( SpiceDouble    left,
                       SpiceDouble    right,
                       SpiceCell    * window,
                       SpiceCell    * result )
#### Abstract
       Determine the complement of a double precision window with
       respect to a specified interval.
#### Required_Reading
       WINDOWS
#### Keywords
       WINDOWS
#### Brief_I/O
       VARIABLE  I/O  DESCRIPTION
       --------  ---  --------------------------------------------------
       left,
       right      I   Left, right endpoints of complement interval.
       window     I   Input window.
       result     O   Complement of window with respect to [left,right].
#### Detailed_Input
       left,
       right       are the left and right endpoints of the complement
                   interval.

       window      is the window to be complemented.  window must be
                   declared as a double precision SpiceCell.
#### Detailed_Output
       result      is the output window, containing the complement
                   of window with respect to the interval from left
                   to right. If the output window is not large enough
                   to contain the result, as many intervals as will
                   fit are returned.

                   result must be declared as a double precision SpiceCell.

                   result must be distinct from window.
#### Parameters
       None.
#### Exceptions
       1) If either input window does not have double precision type,
          the error SPICE(TYPEMISMATCH) is signaled.

       2) If left is greater than right, the error SPICE(BADENDPOINTS) is
          signaled.
#### Files
       None.
#### Particulars
       Mathematically, the complement of a window contains those
       points that are not contained in the window. That is, the
       complement of the set of closed intervals

          [ a(0), b(0) ], [ a(1), b(1) ], ..., [ a(n), b(n) ]

       is the set of open intervals

          ( -inf, a(0) ), ( b(0), a(1) ), ..., ( b(n), +inf )

       Because ANSI C offers no satisfactory representation of
       infinity, we must take the complement with respect to a
       finite interval.

       In addition, ANSI C offers no satisfactory floating point
       representation of open intervals. Therefore, the complement
       of a floating point window is closure of the set theoretical
       complement. In short, the floating point complement of the
       window

          [ a(0), b(0) ], [ a(1), b(1) ], ..., [ a(n), b(n) ]

       with respect to the interval from left to right is the
       intersection of the windows

          ( -inf, a(0) ), ( b(0), a(1) ), ..., ( b(n), +inf )

       and

          [ left, right ]

       Note that floating point intervals of measure zero (singleton
       intervals) in the original window are replaced by gaps of
       measure zero, which are filled. Thus, complementing a floating
       point window twice does not necessarily yield the original window.
#### Examples
       Let window contain the intervals

         [ 1, 3 ]  [ 7, 11 ]  [ 23, 27 ]

       Then the floating point complement of window with respect
       to [2,20] contains the intervals

          [ 3, 7 ]  [ 11, 20 ]

       and the complement with respect to [ 0, 100 ] contains

          [ 0, 1 ]  [ 3, 7 ]  [ 11, 23 ]  [ 27, 100 ]
#### Restrictions
       None.
#### Literature_References
       None.
#### Author_and_Institution
       N.J. Bachman    (JPL)
       H.A. Neilan     (JPL)
       W.L. Taber      (JPL)
       I.M. Underwood  (JPL)
#### Version
       -CSPICE Version 1.0.0, 27-AUG-2002 (NJB) (HAN) (WLT) (IMU)
#### Index_Entries
       complement a d.p. window
#### Link to routine wncomd_c source file wncomd_c.c

    Wed Jun  9 13:05:33 2010