-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented SpectrumTree Class #678
base: master
Are you sure you want to change the base?
Implemented SpectrumTree Class #678
Conversation
Codecov Report
@@ Coverage Diff @@
## master #678 +/- ##
==========================================
- Coverage 81.30% 80.99% -0.31%
==========================================
Files 153 142 -11
Lines 25970 25576 -394
==========================================
- Hits 21115 20716 -399
- Misses 4855 4860 +5
|
{ | ||
_currentNode = null; | ||
_nextNode = SpectrumTree.GetMinNode(_rootNode); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be easy to add tests for Reset() method and .Current field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
{ | ||
node.parent.leftChild = node.leftChild; | ||
node.leftChild.parent = node.parent; | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there are some adjacent node cases that aren't tested
There are a few small places where you could add tests, but no need to do that before merging unless you feel like it. |
The spectrum tree is a basic Binary Search Tree storing mz, intensity pairs. The nodes are ordered by m.z.
This data structure will allow for efficient search and deletion. It will be used for efficiently aligning two spectra, as is required by spectral similarity.