Matrix/Vector coordinate list conversions#4
Merged
gsvgit merged 8 commits intoLamagraph:mainfrom Feb 4, 2026
Merged
Conversation
6edf4f8 to
f7d2a29
Compare
gsvgit
reviewed
Feb 4, 2026
QuadTree/Matrix.fs
Outdated
| | Leaf(v1), Leaf(v2), Leaf(v3), Leaf(v4) when v1 = v2 && v2 = v3 && v3 = v4 -> Leaf(v1) | ||
| | _ -> Node(x1, x2, x3, x4) | ||
|
|
||
| type COOEntry<'value> = uint64 * uint64 * 'value |
Member
There was a problem hiding this comment.
А чего здесь единицы измерения не добавили?
| let nrows = coo.nrows | ||
| let ncols = coo.ncols | ||
|
|
||
| // the resulting matrix is always square |
Member
There was a problem hiding this comment.
Хорошоая ли это идея? А если матрица достаточно сильно прямоугольная? Скажем, 3х1000 ?
Member
There was a problem hiding this comment.
А. Или тогда будет более сложное дерево в итоге?
QuadTree/Matrix.fs
Outdated
| // the resulting matrix is always square | ||
| let storageSize = getNearestUpperPowerOfTwo (max (uint64 nrows) (uint64 ncols)) | ||
|
|
||
| let predicate (px, py) size (entry: COOEntry<'a>) = |
Member
There was a problem hiding this comment.
Что проверяет этот предикат? Может более говорящее название дать?
| let eq = actual = expected | ||
|
|
||
| Assert.True(eq) | ||
|
|
Member
There was a problem hiding this comment.
Тут тоже не помешал бы тест на "схлопывание" одинаковых значений. Причём не тольео None или Dummy.
gsvgit
approved these changes
Feb 4, 2026
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.
Conversions from coordinate list to btree/qtree, btree/qtree to coordinate list