-
Notifications
You must be signed in to change notification settings - Fork 84
Conversation
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.
Overall, looks good! Why the change from vector to deque though? Deque is good if you need to insert at the front or middle, but in our case we only append to the end of the nodes collection. I think vector is more performant for our usage.
Hmm, basically if we change to vector we have to change all the Nodes points to vector indexes since resizing vectors invalidates all the pointers. We could do that though I'm not sure about performance vs pointers, but I changed to Deque because it took me forever to figure out why the pointers were getting invalidated and Deque never invalidates. |
Do you think we should change to vector and index? @justbuchanan |
Ahh that makes sense, I think I actually ran into that issue way back when I originally wrote that stuff. Deque sounds good to me. Might be good to add a note in there explaining why you chose deque over vector. |
Cool, I'm going to go ahead and merge this now, since we have 2 👍s |
Shouldn't we add the note explaining the use of deque first though? |
oh whoops, heh We can add that in another pr maybe? (guyys don't approve unless its ready 😢) |
Yeah I guess that'd be more closely related to #56 |
We can add that as an item for #56. sounds good! |
Replace Vector<T*> with Deque. Also Changed alot of functions to const.
(edit by joshhting) Closes #60