dash icon indicating copy to clipboard operation
dash copied to clipboard

dash::equal does not work for non-trivial ranges

Open fmoessbauer opened this issue 7 years ago • 2 comments

The current implementation of dash::equal is both highly inefficient, as well as erroneous.

As the implementation internally operates on the local parts of the first range, the distribution of the second is not honored.

Consider the following example, where the | denote the "borders" of a unit. Logically both ranges are equal.

First:  |x x x x|x x x x|x x x x|
Second:  x|x x x x|x x x x|x x x  |

In this case the current implementation even segfaults, as it reads past the local second range.

See PR #509 for details.

fmoessbauer avatar Mar 17 '18 11:03 fmoessbauer

Pull #509 is merged long time ago. Can we close this issue?

rkowalewski avatar Nov 06 '18 09:11 rkowalewski

Actually not, as the PR just fixes trivial ranges. Non-Trivial ranges (like the example above) are still not supported.

Also have a look at this (currently disabled) unit test: https://github.com/dash-project/dash/pull/509/files#diff-c82107809db03e2103249f9bb3de4956R43

fmoessbauer avatar Nov 06 '18 10:11 fmoessbauer