DATAMANIP (kdatamanip) functions


LIBRARY ROUTINE

lkreplace - replace all occurrences of X with Y in data object

LIBRARY CALL

int lkreplace(
		 kobject src_obj,
                 kobject gate_obj,
                 double  old_val,
                 double  new_val,
                 int     upper_tol_flag,
                 double  upper_tol,
                 int     lower_tol_flag,
                 double  lower_tol,
                 kobject dest_obj)

INPUT

OUTPUT

RETURN VALUE

TRUE (1) on success, FALSE (0) otherwise

DESCRIPTION

lkreplace replaces each occurence of the value old_val in the object with the value new_val. The operations occur on the map segment if one is present in the source object otherwise the operations occur on the value segment.

The tolerance values allow the value that is being replaced to fall within a given range. the upper_tol and lower_tol values will not be used unless the corresponding flags are TRUE.

The gating functionality will be removed in a future release.

Currently, lkreplace explicitly checks the validity mask, and will not perform the operation if the masked data is invalid. This will also be updated in a future release to act more like lkarith1, where the operation will still be performed, but the mask presentation attributes are used.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$DATAMANIP/objects/library/kdatamanip/src/lkreplace.c

SEE ALSO

kdatamanip(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.