Options
All
  • Public
  • Public/Protected
  • All
Menu

Functions

Const argmin_random_tie

  • argmin_random_tie(seq: any [], key?: function): any

Return a minimum element of seq; break ties at random.

Parameters

  • seq: any []
  • key: function = ...
      • (val: any): number
      • Parameters

        • val: any

        Returns number

Returns any

any Ref for reduce(): https://stackoverflow.com/a/31844649/9931154

Const identity

  • identity<T>(val: T): T

Returns the paramter

Type parameters

  • T

Parameters

  • val: T

Returns T

T

Const random_choice

  • random_choice<T>(arr: T []): T

Return a random element from an array.

Type parameters

  • T

Parameters

  • arr: T []

Returns T

T Ref: https://stackoverflow.com/a/4550514/9931154

Const shuffle_array

  • shuffle_array(arr: any []): any []

Shuffle the values of an array using Durstenfeld shuffle Returns a copy of the array.

Parameters

  • arr: any []

Returns any []

any Ref: https://stackoverflow.com/a/12646864/9931154

  • Inherited
  • Protected
  • Private
  • Static
  • Module
  • Object
  • Property
  • Function
  • Variable
  • Index
  • Type
  • Class
  • Interface
  • Enum
  • Constructor
  • Getter/Setter
Made with ❤️ by pirix-gh. Documentation generated by TypeDoc.