oph_reduce

Description

Behaviour

It reduces a measure array performing the specified operation on ‘count’ elements.

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.
  • operator name: type of operator
    • ‘oph_count’: computes the number of actual values (not missing);
    • ‘oph_max’: computes the maximum (default);
    • ‘oph_min’: computes the minimum;
    • ‘oph_avg’: computes the mean;
    • ‘oph_sum’: computes the sum;
    • ‘oph_std’: computes the standard deviation;
    • ‘oph_var’: computes the variance;
    • ‘oph_cmoment’: computes the central moment;
    • ‘oph_acmoment’: computes the absolute central moment;
    • ‘oph_rmoment’: computes the raw moment;
    • ‘oph_armoment’: computes the absolute raw moment;
    • ‘oph_quantile’: computes the quantile;
    • ‘oph_arg_max’: compute the index of the maximum;
    • ‘oph_arg_min’: compute the index of the minimum.
  • count: number of elements to be reduced. Default value (0) corresponds to the entire array.
  • order: order used in evaluation the moments or value of the quantile in range [0, 1].
  • missingvalue : value to be considered as missing value; by default it is NAN (for ‘oph_double’ and ‘oph_float’).

Return type

Binary-array.

Examples

Compute the mean on 30 measures.

oph_reduce('OPH_DOUBLE','OPH_DOUBLE',measure,'OPH_AVG',30)

Operation type

Reduce.

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’|’oph_short’|’oph_byte’”     “1” / “1”
output measure type “oph_type” “yes” “‘oph_double’|’oph_float’|’oph_int’|’oph_long’|’oph_short’|’oph_byte’”     “1” / “1”
measure “binary-array” “yes”       “1” / “1”
operator name “oph_operator” “no” “‘oph_count’|’oph_max’|’oph_min’|’oph_avg’|’oph_sum’|’oph_std’|’oph_var’|’oph_cmoment’|’oph_acmoment’|’oph_rmoment’|’oph_armoment’|’oph_arg_max’|’oph_arg_min’” “‘oph_max’”   “0” / “1”
count “long-long” “no”   “0” “array length” / “array length” “0” / “1”
order “double” “no”   “2”   “0” / “1”
missingvalue “double” “no” “NAN”     “0” / “1”