Conversation
…oard-computer into Directional-Vector
avesk
left a comment
There was a problem hiding this comment.
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.
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.
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.
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 No newline at end of file | ||
| pass |
There was a problem hiding this comment.
nit pick: probably should print some error message out here instead of a pass
Construction of testing class for heat matrix.