Diff

public struct Diff<Index>

A generic struct that represents a diff between two collections.

  • The indexes whose corresponding values in the old collection are in the LCS.

    Declaration

    Swift

    public var commonIndexes: [Index] { get }
  • The indexes whose corresponding values in the new collection are not in the LCS.

    Declaration

    Swift

    public var addedIndexes: [Index] { get }
  • The indexes whose corresponding values in the old collection are not in the LCS.

    Declaration

    Swift

    public var removedIndexes: [Index] { get }
  • Construct the Diff between two given collections.

    Declaration

    Swift

    public init<C>(_ old: C, _ new: C) where Index == C.Index, C : Collection, C.Element : Equatable
  • The indexes whose corresponding values in the old collection are in the LCS.

    Declaration

    Swift

    var commonIndexSet: IndexSet { get }
  • The indexes whose corresponding values in the new collection are not in the LCS.

    Declaration

    Swift

    var addedIndexSet: IndexSet { get }
  • The indexes whose corresponding values in the old collection are not in the LCS.

    Declaration

    Swift

    var removedIndexSet: IndexSet { get }