-
Notifications
You must be signed in to change notification settings - Fork 1
Directional vector #64
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
base: master
Are you sure you want to change the base?
Conversation
…oard-computer into Directional-Vector
avesk
left a comment
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 great! There are only a couple small things. The capacity/queue_size thing would be a bit annoying to switch around and isn't critical for functionality so I understand if you think we should just move ahead with the merge and address it in a subsequent PR
| oldest_frame_decay = .5**self.queue_size | ||
|
|
||
| # Check queue is full | ||
| if self.capacity >= self.queue_size: |
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 think capacity and queue_size should be swapped. I.e Capacity should be the maximum capacity of the queue, and queue size should be the current number of elements in the queue
| self.heat_matrix = (self.heat_matrix / self._get_oldest_frame()) * new_frame | ||
|
|
||
| #Calculate overall decay being applied to a frame during its life time | ||
| oldest_frame_decay = .5**self.queue_size |
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 think this line can go inside the if block since its only relevant under the full queue condition.
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.
Either that or just make line 41 self.heat_matrix = self.heat_matrix * .5 - (self._get_oldest_frame()*(.5**self.queue_size))
| class InvalidOriginError(Exception): | ||
| """Raised when origin is outside of matrix""" | ||
| pass | ||
| pass |
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.
nit pick: probably should print some error message out here instead of a pass
Construction of testing class for heat matrix.