class K8S::Hashdiff::LinearCompareArray(T, V)
- K8S::Hashdiff::LinearCompareArray(T, V)
 - Reference
 - Object
 
Overview
Used to compare arrays in a linear complexity, which produces longer diffs than using the lcs algorithm but is considerably faster
Defined in:
k8s/hashdiff/linear_compare_arrays.crConstructors
Class Method Summary
Instance Method Summary
- #additions
 - #append_addition(item, index)
 - #append_addititions_before_match(match_index)
 - #append_deletion(item, index)
 - #append_deletions_before_match(match_index)
 - #append_differences(difference : Array(Tuple))
 - #call
 - #compare_at_index
 - #deletions
 - #expected_additions : Int32
 - #expected_additions=(expected_additions : Int32)
 - #extra_items_in_new_array?
 - #extra_items_in_old_array?
 - 
        #index_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)
 - #iterated_through_both_arrays?
 - #new_array : Array(V)
 - #new_index : Int32
 - #new_index=(new_index : Int32)
 - #old_array : Array(T)
 - 
        #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
 - 
        #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 : Options
 
Constructor Detail
Class Method Detail
Instance Method Detail
look ahead in the new array to see if the current item appears later thereby having new items added
look ahead in the old array to see if the current item appears later thereby having items removed
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
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