set_c |

## ProcedureSpiceBoolean set_c ( SpiceCell * a, ConstSpiceChar * op, SpiceCell * b ) ## AbstractGiven a relational operator, compare two sets of any data type. ## Required_ReadingCELLS, SETS ## KeywordsCELLS, SETS ## Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- a I First set. op I Comparison operator. b I Second set. The function returns the result of the comparison: a (op) b. ## Detailed_Inputa is a CSPICE set. a must be declared as a character, double precision, or integer SpiceCell. 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 true if a and b are equal (contain the same elements). "<>" a <> b is true if a and b are not equal. "<=" a <= b is true if a is a subset of b. "<" a < b is true if a is a proper subset of b. ">=" a >= b is true if b is a subset of a. ">" a > b is true if b is a proper subset of a. "&" a & b is true if a and b have one or more elements in common (the intersection of the two sets in non-empty.) "~" a ~ b is true if a and b are disjoint sets. When comparing elements of character sets, this routine ignores trailing blanks. b is a CSPICE set of the same data type as a. ## Detailed_OutputThe function returns the result of the comparison: a (op) b. ## ParametersNone. ## Exceptions1) If the set relational operator is not recognized, the error SPICE(INVALIDOPERATION) is signaled. 2) The error SPICE(EMPTYSTRING) is signaled if the input operator string does not contain at least one character, since this input string cannot be converted to a Fortran-style string in this case. 3) The error SPICE(NULLPOINTER) is signalled if the input operator string pointer is null. 4) If the input set arguments don't have identical data types, the error SPICE(TYPEMISMATCH) is signaled. 5) If either of the input set arguments may be unordered or contain duplicates, the error SPICE(NOTASET) is signaled. ## FilesNone. ## ParticularsNone. ## Examples1) In the following code fragment, ## Restrictions1) String comparisons performed by this routine are Fortran-style: trailing blanks in the input sets are ignored. This gives consistent behavior with CSPICE code generated by the f2c translator, as well as with the Fortran SPICE Toolkit. Note that this behavior is not identical to that of the ANSI C library functions strcmp and strncmp. ## Literature_ReferencesNone. ## Author_and_InstitutionN.J. Bachman (JPL) H.A. Neilan (JPL) W.L. Taber (JPL) I.M. Underwood (JPL) ## Version-CSPICE Version 1.1.0, 15-FEB-2005 (NJB) Bug fix: loop bound changed from 1 to 2 in loop used to free dynamically allocated arrays. -CSPICE Version 1.0.0, 08-AUG-2002 (NJB) (CAC) (WLT) (IMU) ## Index_Entriescompare sets |

Wed Apr 5 17:54:42 2017