OT v0.1.0 OT.Text.Transformation
The transformation of two concurrent operations such that they satisfy the TP1 property of operational transformation.
Summary
Functions
Transform an operation against another operation
Functions
transform(OT.Text.Operation.t, OT.Text.Operation.t, OT.Type.side) :: OT.Text.Operation.t
Transform an operation against another operation.
Given an operation A that occurred at the same time as operation B against the same text state, transform the components of operation A such that the state of the text after applying operation A and then operation B is the same as after applying operation B and then the transformation of operation A against operation B:
S ○ Oa ○ transform(Ob, Oa) = S ○ Ob ○ transform(Oa, Ob)
This function also takes a third side
argument that indicates which
operation came later. This is important when deciding whether it is acceptable
to break up insert components from one operation or the other.