User Tools

Site Tools


haas:fall2016:data:projects:dln0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
haas:fall2016:data:projects:dln0 [2016/09/10 16:02] – external edit 127.0.0.1haas:fall2016:data:projects:dln0 [2016/10/01 15:29] (current) – [In inc/node.h] wedge
Line 14: Line 14:
  
 =====Objective===== =====Objective=====
-In this project, we take our first opportunity to undergo a complete code re-write of node functionality, and we will also introduce the necessary functionality for doubly linked node operations.+In this project, we take our first opportunity to undergo a complete code re-write of node functionality, and we will also introduce the necessary functionality for doubly-linked node operations.
  
 =====Procedure to obtain dln0===== =====Procedure to obtain dln0=====
-As this is a rewrite, dln0 is not based on any of the code you have written up to this point. As such, the transition process is slightly different:+As this is a rewrite, dln0 is not based on any of the code you have written up to this point. As such, the transition process is slightly different. Two different approaches are outlined below: 
 + 
 +====In-project transition (Makefile from sll4)====
  
 <cli> <cli>
Line 29: Line 31:
  
 Once you run "**make get-dln0**" you should have a **dln0** directory that you can access and commence working on just as you have with the other project directories. Once you run "**make get-dln0**" you should have a **dln0** directory that you can access and commence working on just as you have with the other project directories.
 +
 +====grabit====
 +Just as we did with the first project in the series, **sln1**, we can also use grabit to obtain this project:
 +
 +<cli>
 +lab46:~/src/data$ grabit data
 +ERROR: must specify class and project!
 +example:
 +    grabit discrete matrixadd
 +
 +Projects available for data:
 +    * dln0
 +    * sln1
 +
 +lab46:~/src/data$ 
 +</cli>
 +
 +So, we can just go ahead and do:
 +
 +<cli>
 +lab46:~/src/data$ grabit data dln0
 +...
 +</cli>
 +
 +And voila! Freshly grabbed **dln0** in our ~/src/data/ directory.
 =====Project Overview===== =====Project Overview=====
  
Line 50: Line 77:
 struct node { struct node {
     union  info      payload;     union  info      payload;
-    struct node     *after+    struct node     *there
-    struct node     *prior;+    struct node     *back;
 }; };
  
Line 65: Line 92:
 </code> </code>
  
-There is an addition of a "prior" node pointer, to allow connections to our previous neighbors.+There is an addition of a "back" node pointer, to allow connections to our previous neighbors.
  
 The node info element has been changed as well... instead of a singular value, it is now a union by the name of payload, which contains a value entry (a char entry), a data entry (Node pointer), and an other entry (a void pointer). The node info element has been changed as well... instead of a singular value, it is now a union by the name of payload, which contains a value entry (a char entry), a data entry (Node pointer), and an other entry (a void pointer).
Line 155: Line 182:
  
 ====In inc/support.h==== ====In inc/support.h====
-Finally we have support.h... this header will contain some information on helper functions utilized in the various unit tests. You really don't need to bother with this... in fact, do not use any of these functions in your implementation.+Finally we have support.h... this header will contain some information on helper functions utilized in the various unit tests. You really don't need to bother with this... in fact, do **not** use any of these functions in your implementation.
 ====node library==== ====node library====
 In **src/node/**, you will find skeletons of what was previously there, ready for you to re-implement. In **src/node/**, you will find skeletons of what was previously there, ready for you to re-implement.
haas/fall2016/data/projects/dln0.1473523366.txt.gz · Last modified: 2016/10/01 15:22 (external edit)