-
Notifications
You must be signed in to change notification settings - Fork 74
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
New method Connections::destroyMinPermanenceSynapses #446
Conversation
Previous this was a private function of the Temporal Memory. This is useful and general purpose. It is now a public method of Connections.
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.
This looks good overall 👍
A few nits for consideration, and 1-2 fixes please
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.
This looks good, I like the static TM's method is now useful for anybody in Connections.
Please consider making the unit test for it
const Permanence A_perm = dataForSynapse(A).permanence; | ||
const Permanence B_perm = dataForSynapse(B).permanence; | ||
if( A_perm == B_perm ) { | ||
return A < B; |
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.
I see you're already using the determinitstic sort logic from #465 👍
* @param nDestroy - Must be greater than or equal to zero! | ||
* @param excludeCells - Presynaptic cells which will NOT have any synapses destroyed. | ||
*/ | ||
void destroyMinPermanenceSynapses(const Segment segment, Int nDestroy, |
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.
this method should now have its unit-test, given its now public in Connections.
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.
..probably the test could be copied from TM tests, if there were one
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.
The TM has unit tests which call this method, albeit indirectly via a method in the TM. I think that the testing coverage is good enough so I'm going to go ahead and merge this.
Thanks for reviewing this!
As discussed in PR #285.
Previous this was a private function of the Temporal Memory.
This is useful and general purpose.
It is now a public method of Connections.
TODO: