Generic Instance Method

difference(from:)

Returns the difference needed to produce this collection’s ordered elements from the given collection.

Declaration

func difference<C>(from other: C) -> CollectionDifference<MLDataTable.Row> where C : BidirectionalCollection, Self.Element == C.Element

Parameters

other

The base state.

Return Value

The difference needed to produce this collection’s ordered elements from the given collection.

Discussion

This function does not infer element moves. If you need to infer moves, call the inferringMoves() method on the resulting difference.

Complexity: Worst case performance is O(n * m), where n is the count of this collection and m is other.count. You can expect faster execution when the collections share many common elements, or if Element conforms to Hashable.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software