oph_sequence

Description

Behaviour

Returns an array with a list of information regarding the sequences of non-zero consecutive values in input array.

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.
  • info: metric to be evaluated for each sequence:
    • ‘length’ returns an array with sequence lengths (default);
    • ‘first’ returns the index of the first element of each sequence;
    • ‘last’ returns the index of the last element of each sequence.
  • padding: set to ‘yes’ in case output array needs to be padded with zeros. By default no padding is used.

Return type

Binary-array.

Examples

Evaluate the sizes of sequences of non-zeros values in a measure.

oph_sequence('OPH_DOUBLE','OPH_DOUBLE',measure)

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”
info “string” “no” “‘length’|’first’|’last’” “‘length’”   “0” / “1”
padding “string” “no” “‘yes’|’no’” “‘no’”   “0” / “1”