Hashdiff::LinearCompareArray(T, V)
Used to compare arrays in a linear complexity, which produces longer diffs than using the lcs algorithm but is considerably faster
Constructors
Class methods
Instance methods
additions
Sourceappend_addition(item, index)
Sourceappend_addititions_before_match(match_index)
Sourceappend_deletion(item, index)
Sourceappend_deletions_before_match(match_index)
Sourcecall
Sourcecompare_at_index
Sourcedeletions
Sourceexpected_additions
Sourceextra_items_in_new_array?
Sourceextra_items_in_old_array?
Sourceindex_of_match_after_additions
look ahead in the new array to see if the current item appears later thereby having new items added
index_of_match_after_deletions
look ahead in the old array to see if the current item appears later thereby having items removed
item_difference(old_item, new_item, item_index)
Sourceiterated_through_both_arrays?
Sourcenew_array
Sourcenew_index
Sourceold_array
Sourceold_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
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
options
Source