runLengthEncode prefers sequences to duplicates
A pull request for this has already been merged.
- #4532 by @pzinn — merged
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
I'm not sure if I'm expecting something unreasonable, but in this situation:
```m2
i4 : runLengthEncode {1,2,2,2,3,3,3}
o4 = {1..2, 2:2, 3:3}
```
I would expect `{1, 3:2, 3:3}` instead.
For context, this method is used for compactly displaying the twists of sums of line bundles, so knowing that O(2) is repeated 3 times is more significant.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the runLengthEncode entry point and any related tests or examples. Reproduce the provided input, then determine how the function chooses between sequence ranges and duplicate counts; done means the output preserves the expected duplicate count for 2 and remains covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100