18cfee / 432_Skip_List

2 stars 0 forks source link

HEAD Issue for Origin #3

Open sanchewy opened 6 years ago

sanchewy commented 6 years ago

Hey guys, I am running into problems with the implementation of the origin method. When I find the correct origin value and add it to the ond[] array for level 1, I can't jump to level 2 to get the next ond[] value because we don't have a HEAD reference for level 2. The only way currently to get from level 1 to level 2 is by searching through all the nodes in level 1 until you find one that has a node.down reference. This is super inefficient (and annoying). I think we need to make the HEAD an array (HEAD[]) rather than a single reference to the start of level 1. This will require changes to the Insert method (and now also the Insert without height method).

Let me know if you have anymore ideas. Checkout my KeinanAddingOrigin branch if you aren't understanding what I am saying.

18cfee commented 6 years ago

Hey makes sense. We could possibly still have a HEAD, but then it would have to point to OND array. Maybe I should have done a bit more designing before jumping into it.

Sent via the Samsung Galaxy S7, an AT&T 4G LTE smartphone -------- Original message --------From: sanchewy notifications@github.com Date: 11/7/17 12:36 PM (GMT-07:00) To: 18cfee/432_Skip_List 432_Skip_List@noreply.github.com Cc: Carl Fee fee_carl@yahoo.com, Assign assign@noreply.github.com Subject: [18cfee/432_Skip_List] HEAD Issue for Origin (#3) Hey guys, I am running into problems with the implementation of the origin method. When I find the correct origin value and add it to the ond[] array for level 1, I can't jump to level 2 to get the next ond[] value because we don't have a HEAD reference for level 2. The only way currently to get from level 1 to level 2 is by searching through all the nodes in level 1 until you find one that has a node.down reference. This is super inefficient (and annoying). I think we need to make the HEAD an array (HEAD[]) rather than a single reference to the start of level 1. This will require changes to the Insert method (and now also the Insert without height method). Let me know if you have anymore ideas. Checkout my KeinanAddingOrigin branch if you aren't understanding what I am saying.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/18cfee/432_Skip_List","title":"18cfee/432_Skip_List","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/18cfee/432_Skip_List"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"HEAD Issue for Origin (#3)"}],"action":{"name":"View Issue","url":"https://github.com/18cfee/432_Skip_List/issues/3"}}}

sanchewy commented 6 years ago

I went back and fixed the print and insert methods to use an arraylist in my branch. The only problem now is that insert doesn't assign a node.index value (which I need for the chooseNewOGTG() function).

18cfee commented 6 years ago

Yeah, I did not implement that. After reading the paper again, I am not sure how to keep that updated. I don't know what time you go to bed, but I am free until around 1130 tonight if you want to call.