Collection
protocol Collection : Sequence where Self.SubSequence : Collection
-
Creates a diff between the calee and
other
collectionComplexity
O((N+M)*D)
Declaration
Swift
public func diff( _ other: Self, isEqual: EqualityChecker<Self> ) -> Diff
Parameters
other
a collection to compare the calee to
Return Value
a Diff between the calee and
other
collection -
Generates all traces required to create an output diff. See the paper for more information on traces.
Declaration
Swift
public func diffTraces( to: Self, isEqual: EqualityChecker<Self> ) -> [Trace]
Parameters
to
other collection
Return Value
all traces required to create an output diff
-
Returns the traces which mark the shortest diff path.
Declaration
Swift
public func outputDiffPathTraces( to: Self, isEqual: EqualityChecker<Self> ) -> [Trace]
-
See also
diff(_:isEqual:)
Declaration
Swift
public func diff( _ other: Self ) -> Diff
-
See also
diffTraces(to:isEqual:)
Declaration
Swift
public func diffTraces( to: Self ) -> [Trace]
-
See also
outputDiffPathTraces(to:isEqual:)
Declaration
Swift
public func outputDiffPathTraces( to: Self ) -> [Trace]
-
Creates an extended diff between the callee and
other
collectionComplexity
O((N+M)*D). There’s additional cost of O(D^2) to compute the moves.
Declaration
Swift
public func extendedDiff(_ other: Self, isEqual: EqualityChecker<Self>) -> ExtendedDiff
Parameters
other
a collection to compare the callee to
isEqual
instance comparator closure
Return Value
ExtendedDiff between the callee and
other
collection -
Creates an extended diff between the callee and
other
collectionComplexity
O(D^2). where D is number of elements in diff.
Declaration
Swift
public func extendedDiff(from diff: Diff, other: Self, isEqual: EqualityChecker<Self>) -> ExtendedDiff
Parameters
diff
source diff
other
a collection to compare the callee to
isEqual
instance comparator closure
Return Value
ExtendedDiff between the callee and
other
collection -
Undocumented
Declaration
Swift
func firstMatch( _ diff: Diff, dirtyIndices: Set<Diff.Index>, candidate: Diff.Element, candidateIndex: Diff.Index, other: Self, isEqual: EqualityChecker<Self> ) -> (ExtendedDiff.Element, Diff.Index)?
-
Undocumented
Declaration
Swift
func createMatch(_ candidate: Diff.Element, match: Diff.Element, other: Self, isEqual: EqualityChecker<Self>) -> ExtendedDiff.Element?
-
See also
extendedDiff(_:isEqual:)
Declaration
Swift
public func extendedDiff(_ other: Self) -> ExtendedDiff
-
Creates a diff between the callee and
other
collection. It diffs elements two levels deep (thereforenested
)Declaration
Swift
public func nestedDiff( to: Self, isEqualSection: EqualityChecker<Self>, isEqualElement: NestedElementEqualityChecker<Self> ) -> NestedDiff
Parameters
other
a collection to compare the calee to
Return Value
a
NestedDiff
between the calee andother
collection
-
Declaration
Swift
public func nestedDiff( to: Self, isEqualSection: EqualityChecker<Self> ) -> NestedDiff
-
Declaration
Swift
public func nestedDiff( to: Self, isEqualElement: NestedElementEqualityChecker<Self> ) -> NestedDiff
-
Declaration
Swift
public func nestedDiff(to: Self) -> NestedDiff
-
Creates a diff between the callee and
other
collection. It diffs elements two levels deep (thereforenested
)Declaration
Swift
public func nestedExtendedDiff( to: Self, isEqualSection: EqualityChecker<Self>, isEqualElement: NestedElementEqualityChecker<Self> ) -> NestedExtendedDiff
Parameters
other
a collection to compare the calee to
Return Value
a
NestedDiff
between the calee andother
collection
-
Declaration
Swift
public func nestedExtendedDiff( to: Self, isEqualSection: EqualityChecker<Self> ) -> NestedExtendedDiff
-
Declaration
Swift
public func nestedExtendedDiff( to: Self, isEqualElement: NestedElementEqualityChecker<Self> ) -> NestedExtendedDiff
-
Declaration
Swift
public func nestedExtendedDiff(to: Self) -> NestedExtendedDiff