Extract intervals_chain, intervals_tuple, intervals_distribution modules#104
Open
Maximus2012 wants to merge 2 commits intomainfrom
Open
Extract intervals_chain, intervals_tuple, intervals_distribution modules#104Maximus2012 wants to merge 2 commits intomainfrom
Maximus2012 wants to merge 2 commits intomainfrom
Conversation
Pull Request Test Coverage Report for Build 23052076641Details
💛 - Coveralls |
|
goruha
requested changes
Mar 28, 2026
Comment on lines
+77
to
+79
| for interval in tuple_result: | ||
| distribution[int(interval) - 1] += 1 | ||
|
|
Member
There was a problem hiding this comment.
Do not use loops. We should use numpy functions instead of loops
Member
|
We need to create tests and performance tests for new functions. |
Member
goruha
requested changes
Apr 1, 2026
Comment on lines
+63
to
+73
| if mode == constants_mode.redundant: | ||
| perm = ar.argsort(kind="mergesort") | ||
| mask = np.empty(ar.shape[0] + 1, dtype=bool) | ||
| mask[:1] = True | ||
| mask[1:-1] = ar[perm[1:]] != ar[perm[:-1]] | ||
| mask[-1:] = True | ||
| last_mask = mask[1:] | ||
| trailing = len(ar) - perm[last_mask] | ||
| if binding == constants_binding.end: | ||
| trailing = trailing[::-1] | ||
| return np.concatenate((chain, trailing)) |
Member
There was a problem hiding this comment.
Это вряд ли работает корректно. Нужно сделать тесты.
На вход же приходит intervals_chain - если ты их отсортируешь то потеряешь связанность
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1.1: Decompose
foapy.intervalsinto dedicated modules.Changes
_intervals_chain.py– core chain-building logic_intervals_tuple.py– unchaining strategies (lossy, normal, cycle, redundant)_intervals_distribution.py– histogram of interval lengths from a tuple_intervals.py– updated to delegate to the new modulescore/__init__.py– exports for all new modulesRelated Issues
Closes #83
Closes #84
Closes #85