Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.stsci.edu/~sontag/spicedocs/cspice/wnreld_c.html
Дата изменения: Sat Dec 17 06:10:18 2005 Дата индексирования: Mon Apr 11 00:13:34 2016 Кодировка: |
Compare two double precision windows.
WINDOWS
VARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- a I First window. op I Comparison operator. b I Second window. The function returns the result of comparison: a (op) b.
a, b are CSPICE windows, each of which contains zero or more intervals. a and b must be declared as double precision SpiceCells. op is a comparison operator, indicating the way in which the input sets are to be compared. op may be any of the following: Operator Meaning -------- ------------------------------------- "=" a = b is SPICETRUE if a and b are equal (contain the same intervals). "<>" a <> b is SPICETRUE if a and b are not equal. "<=" a <= b is SPICETRUE if a is a subset of b. "<" a < b is SPICETRUE is a is a proper subset of b. ">=" a >= b is SPICETRUE if b is a subset of a. ">" a > b is SPICETRUE if b is a proper subset of a.
The function returns the result of the comparison.
None.
This function returns SPICETRUE whenever the specified relationship between the input windows a and b is satisfied. For example, the expression wnreld_c ( &needed, "<=", &avail ) is SPICETRUE whenever the window needed is a subset of the window avail. One window is a subset of another window if each of the intervals in the first window is included in one of the intervals in the second window. In addition, the first window is a proper subset of the second if the second window contains at least one point not contained in the first window. (Thus, "<" implies "<=", and ">" implies ">=".) The following pairs of expressions are equivalent. wnreld_c ( &a, ">", &b ); wnreld_c ( &b, "<", &a ); wnreld_c ( &a, ">=", &b ); wnreld_c ( &b, "<=", &a );
Let a contain the intervals [ 1, 3 ] [ 7, 11 ] [ 23, 27 ] Let b and c contain the intervals [ 1, 2 ] [ 9, 9 ] [ 24, 27 ] Let d contain the intervals [ 5, 10 ] [ 15, 25 ] Finally, let e and f be empty windows (containing no intervals). Because b and c contain the same intervals, wnreld_c ( &b, "=", &c ) wnreld_c ( &b, "<=", &c ) wnreld_c ( &b, ">=", &c ) are all SPICETRUE, while wnreld_c ( &b, "<>", &c ) is SPICEFALSE. Because neither b nor c contains any points not also contained by the other, neither is a proper subset of the other. Thus, wnreld_c ( &b, "<", &c ) wnreld_c ( &b, ">", &c ) are both SPICEFALSE. Every point contained in b and c is also contained in a. Thus, wnreld_c ( &b, "<=", &a ) wnreld_c ( &a, ">=", &c ) are both SPICETRUE. In addition, a contains points not contained in b and c. (That is, the differences a-b and a-c are not empty.) Thus, b and c are peoper subsets of a as well, and wnreld_c ( &b, "<", &a ) wnreld_c ( &a, ">", &b ) are both SPICETRUE. Although a and d have points in common, neither contains the other. Thus wnreld_c ( &a, "=", &d ) wnreld_c ( &a, "<=", &d ) wnreld_c ( &a, ">=", &d ) are all SPICEFALSE. In addition, any window is equal to itself, a subset of itself, and a superset of itself. Thus, wnreld_c ( &a, "=", &a ) wnreld_c ( &a, "<=", &a ) wnreld_c ( &a, ">=", &a ) are always SPICETRUE. However, no window is a proper subset or a proper superset of itself. Thus, wnreld_c ( &a, "<", &a ) wnreld_c ( &a, ">", &a ) are always SPICEFALSE. Finally, an empty window is a proper subset of any window except another empty window. Thus, wnreld_c ( &e, "<", &a ) is SPICETRUE, but wnreld_c ( &e, "<", &f ) is SPICEFALSE.
None.
1) If any of the function arguments are SpiceCells of type other than double precision, the error SPICE(TYPEMISMATCH) is signaled. 2) If the relational operator is not recognized, the error SPICE(INVALIDOPERATION) is signaled. 3) The error SPICE(EMPTYSTRING) is signaled if the input operator string does not contain at least one character, since the input string cannot be converted to a Fortran-style string in this case. 4) The error SPICE(NULLPOINTER) is signalled if the input operator string pointer is null.
None.
N.J. Bachman (JPL) H.A. Neilan (JPL) W.L. Taber (JPL) I.M. Underwood (JPL)
None.
-CSPICE Version 1.0.0, 27-JUL-2002 (NJB) (HAN) (WLT) (IMU)
compare two d.p. windows