Package pypower :: Module fairmax
[hide private]
[frames] | no frames]

Module fairmax

source code

Same as built-in max, except breaks ties randomly.

Functions [hide private]
 
fairmax(x)
Same as built-in max, except breaks ties randomly.
source code
Variables [hide private]
  __package__ = 'pypower'
Function Details [hide private]

fairmax(x)

source code 

Same as built-in max, except breaks ties randomly.

Takes a vector as an argument and returns the same output as the built-in function max with two output parameters, except that where the maximum value occurs at more than one position in the vector, the index is chosen randomly from these positions as opposed to just choosing the first occurance.

See Also: max

Authors:
Ray Zimmerman (PSERC Cornell), Richard Lincoln