class

Hashdiff::LinearCompareArray(T, V)

Inherits Reference < Object

Used to compare arrays in a linear complexity, which produces longer diffs than using the lcs algorithm but is considerably faster

Constructors

new(old_array : Array(T), new_array : Array(V), **options)
Source

Class methods

call(old_array : Array(L), new_array : Array(M), **options) forall L, M, T, V
Source

Instance methods

additions
Source
append_addition(item, index)
Source
append_addititions_before_match(match_index)
Source
append_deletion(item, index)
Source
append_deletions_before_match(match_index)
Source
append_differences(difference : Array(Tuple))
Source
call
Source
compare_at_index
Source
deletions
Source
expected_additions
Source
expected_additions=(expected_additions : Int32)
Source
extra_items_in_new_array?
Source
extra_items_in_old_array?
Source
index_of_match_after_additions

look ahead in the new array to see if the current item appears later thereby having new items added

Source
index_of_match_after_deletions

look ahead in the old array to see if the current item appears later thereby having items removed

Source
item_difference(old_item, new_item, item_index)
Source
iterated_through_both_arrays?
Source
new_array
Source
new_index
Source
new_index=(new_index : Int32)
Source
old_array
Source
old_index

getter differences = Array(Tuple(String, Array(Int32 | String | Symbol) | Array(Int32 | String) | String, T) | Tuple(String, Array(Int32 | String | Symbol) | Array(Int32 | String) | String, V)).new

Source
old_index=(old_index : Int32)

getter differences = Array(Tuple(String, Array(Int32 | String | Symbol) | Array(Int32 | String) | String, T) | Tuple(String, Array(Int32 | String | Symbol) | Array(Int32 | String) | String, V)).new

Source
options
Source

Nested types