Argmax

From ObjectVision

Jump to: navigation, search

Ordering functions argmax

Contents

syntax

argmax(a, b, .. , n)

definition

argmax(a, b, .. , n) results in a data item with the order number of the argument with the highest value for the element-by-element comparison.

The domain unit of the resulting item is the same as the domain units of all arguments of the function.

The values unit of the resulting item is value type of the domain unit of of all arguments of the function.

If the highest value occurs more than once, the function results the first order number.

applies to

Data items with Numeric or string value type

conditions

  1. Domain of the arguments must match or be void.
  2. Arguments must have matching:

since version

5.15

example

attribute<uint32> argmaxABC (ADomain) := argmax(A, B, C);
A(int32),
sequencenr: 0
B(int32),
sequencenr: 1
C(int32),
sequencenr: 2
argmaxABC
0 1 2 2
1 -1 4 2
-2 2 2 1
4 0 7 2
999 111 -5 0

ADomain, nr of rows = 5

see also

Personal tools