DifferencesBase.AbstractDifference
— TypeAbstractDifference
Supertype for differences.
DifferencesBase.MatrixDifference
— TypeMatrixDifference{Tm<:AbstractVector,Ta<:AbstractVector,Tr<:AbstractVector} <: AbstractDifference
Matrix difference.
DifferencesBase.NamedTupleDifference
— TypeNamedTupleDifference <: AbstractDifference
Named tuple difference.
DifferencesBase.SetDifference
— TypeSetDifference{T} <: AbstractDifference
Set difference.
DifferencesBase.VectorDifference
— TypeVectorDifference{Tm<:AbstractVector,Ta<:AbstractVector,Tr<:AbstractVector} <: AbstractDifference
Vector difference.
Base.diff
— Methoddiff(a::AbstractVector, b::AbstractVector, ia::AbstractVector, ib::AbstractVector)
Like diff
, but provide integer vectors that number the rows of the vectors a
and b
. The vectors ia
and ib
represent the row numbers of a
and b
respectively. The position of each vector element refers to the row index of a
or b
.
Base.diff
— Methoddiff(a::AbstractVector, b::AbstractVector)
Compute the difference between vector a
and vector b
, and return a tuple containing the elements that have been modified, added, and removed.
Base.diff
— Methoddiff(A::AbstractMatrix, B::AbstractMatrix, ia::AbstractVector, ja::AbstractVector, ib::AbstractVector, jb::AbstractVector)
Like diff
, but provide integer vectors that number the rows and columns of the matrices A
and B
. The vector ia
represents the row numbers of A
, and the vector jb
represents the column numbers of B
etc. The position of each vector element refers to the row index (or column index respectively) of A
or B
.
Base.diff
— Methoddiff(A::AbstractMatrix, B::AbstractMatrix)
Compute the difference between matrix A
and matrix B
, and return a tuple containing the elements that have been modified, added (per row and column), and removed (per row and column).
Base.diff
— Methoddiff(a::AbstractSet, b::AbstractSet)
Compute the difference between set a
and set b
, and return a tuple containing the unique elements that have been shared, added, and removed.
Examples
julia> diff(Set([1, 2, 3, 3]), Set([4, 2, 1]))
(Set([1, 2]), Set([4]), Set([3]))
Base.diff
— Methoddiff(a::NamedTuple, b::NamedTuple)
Compute the difference between named tuple a
and named tuple b
, and return a tuple containing the unique elements that have been modified, added, and removed.
DifferencesBase.added
— Methodadded(a::AbstractDifference)
Access the added elements.
DifferencesBase.added_indices
— Methodadded_indices(a::Union{VectorDifference,MatrixDifference})
Access the added indices.
DifferencesBase.common
— Methodcommon(a::SetDifference)
Access the common elements.
DifferencesBase.modified
— Methodmodified(a::Union{VectorDifference,MatrixDifference,NamedTupleDifference})
Access the modified elements.
DifferencesBase.modified_indices
— Methodmodified_indices(a::Union{VectorDifference,MatrixDifference})
Access the modified indices.
DifferencesBase.removed
— Methodremoved(a::AbstractDifference)
Access the removed elements.
DifferencesBase.removed_indices
— Methodremoved_indices(a::Union{VectorDifference,MatrixDifference})
Access the removed indices.