\brief Return the run length of equal values starting at the given indices in the base and target arrays. \param base_index The starting index in the base array. \param base_length The length of the base array. \param target_index The starting index in the target array. \param target_length The length of the target array. \return The run length of equal values starting at the given indices in the
| 130 | /// \return The run length of equal values starting at the given indices in the base |
| 131 | /// and target arrays. |
| 132 | virtual int64_t RunLengthOfEqualsFrom(int64_t base_index, int64_t base_length, |
| 133 | int64_t target_index, int64_t target_length) { |
| 134 | int64_t run_length_of_equals = 0; |
| 135 | while (base_index < base_length && target_index < target_length) { |
| 136 | if (!Equals(base_index, target_index)) { |
| 137 | break; |
| 138 | } |
| 139 | base_index += 1; |
| 140 | target_index += 1; |
| 141 | run_length_of_equals += 1; |
| 142 | } |
| 143 | return run_length_of_equals; |
| 144 | } |
| 145 | }; |
| 146 | |
| 147 | template <typename ArrayType> |