Array

struct Array<Element> : _DestructorSafeContainer
  • Returns the index and value of the largest element in the array.

    Declaration

    Swift

    public func argmax() -> (Int, Element)
  • Returns the indices of the array’s elements in sorted order.

    Declaration

    Swift

    public func argsort(by areInIncreasingOrder: (Element, Element) -> Bool) -> [Array.Index]
  • Returns a new array containing the elements at the specified indices.

    Declaration

    Swift

    public func gather(indices: [Array.Index]) -> [Element]