oph_predicate2

Description

Behaviour

It evaluates a predicate2. If ‘expression0’ satisfies ‘comparison’ then ‘expression1’ is executed, else ‘expression2’ is executed.

Parameters

  • input measure type : Ophidia typing. Supported types are: ‘oph_double’; ‘oph_float’; ‘oph_long’; ‘oph_int’; ‘oph_short’; ‘oph_byte’.
  • output measure type : Ophidia typing. Supported types are: ‘oph_double’; ‘oph_float’; ‘oph_long’; ‘oph_int’; ‘oph_short’; ‘oph_byte’.
  • measure : input measure.
  • expression 0 : first expression.
  • comparison : condition to be verified.
  • expression 1 : expression executed if expression 0 satisfies comparison.
  • expression 2 : expression executed if expression 0 does not satisfy comparison.
  • occurrence : if is set to a number ‘n’ then expression 1 is evaluated only for the ‘n’-th of the condition; otherwise the expression 2 is evaluated. Use ‘first’ or ‘begin’ for the first occurrence. Use ‘last’ or ‘end’ for the last occurrence. Use ‘all’ to skip this check (default).

Return type

Binary-array.

Examples

Identify measures with temperature values greater than 300 K.

oph_predicate('OPH_DOUBLE','OPH_DOUBLE',measure,'x-300','>0','1','0')

Operation type

simple

Arguments

Argument name Type Mandatory Values Default Min/Max-value Min/Max-times
input measure type “oph_type” “yes” “‘oph_double’|’oph_float’ |’oph_int’|’oph_long’|’op h_short’|’oph_byte’”     “1” / “1”
output measure type “oph_type” “yes” “‘oph_double’|’oph_float’ |’oph_int’|’oph_long’|’op h_short’|’oph_byte’”     “1” / “1”
measure “binary-array” “yes”       “1” / “1”
expression 0 “string” “yes”       “1” / “1”
comparison “string” “yes”       “1” / “1”
expression 1 “string” “yes”       “1” / “1”
expression 2 “string” “yes”       “1” / “1”
occurrence “string” “no”   “all”   “0” / “1”