void wncomd_c ( SpiceDouble left,
SpiceDouble right,
SpiceCell * window,
SpiceCell * result )
Determine the complement of a double precision window with
respect to a specified interval.
WINDOWS
WINDOWS
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].
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.
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.
None.
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.
None.
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.
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 ]
None.
None.
N.J. Bachman (JPL)
H.A. Neilan (JPL)
W.L. Taber (JPL)
I.M. Underwood (JPL)
-CSPICE Version 1.0.0, 27-AUG-2002 (NJB) (HAN) (WLT) (IMU)
complement a d.p. window
Link to routine wncomd_c source file wncomd_c.c
|