DATAMANIP (kdatamanip) functions
LIBRARY ROUTINE
lkcompare - perform comparison operation on data object(s)
LIBRARY CALL
int lkcompare (
kobject i1,
kobject i2,
double val,
char *function,
double tval,
double fval,
double tol,
kobject o)
INPUT
- i1 - the input object to be processed
- i2 - the second input object (if NULL then uses the
constant "val")
- val - the constant to be instead of the second data object
- function - the function to be applied
- tval - the value to be assigned if comparison is TRUE
- fval - the value to be assigned if comparison is FALSE
- tol - the plus/minus tolerence in which to do the comparison
(not functional yet)
OUTPUT
RETURN VALUE
TRUE (1) on success, FALSE (0) otherwise
DESCRIPTION
The following is the library routine that performs
a comparison operation on two data objects.
The routine takes two input data object (or a single data
object and a constant), a function name, and an output
data object in which to store the result of the
function.
The supported functions are:
.TS
center tab(:) ;
l l .
eq : o = i1 == (i2 or val)
ne : o = i1 != (i2 or val)
gt : o = i1 > (i2 or val)
ge : o = i1 >= (i2 or val)
lt : o = i1 < (i2 or val)
le : o = i1 <= (i2 or val)
.TE
Therefore if lkcompare() were called with two input data
objects:
lkcompare(i1, i2, 0.0, 1.0, 0.0, "eq", o);
then the following would be performed:
o = (i1 == i2) ? 1.0 : 0.0
If lkcompare were called with a single data object and
a constant:
lkcompare(i1, NULL, 10.0, 1.0, 0.0, "eq", o);
then the following would be performed:
o = (i1 == 10.0) ? 1.0 : 0.0
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
none
FILES
$DATAMANIP/objects/library/kdatamanip/src/lkcompare.c
SEE ALSO
kdatamanip(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.