Skip to content

Commit

Permalink
Updated some documentation, version, comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SleepiCaffeine committed Jun 21, 2023
1 parent 0cb4155 commit 3c2385f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
22 changes: 6 additions & 16 deletions Data Structures/double_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* @file double_node.h
* @author Vakaris Michejenko (sleepicaffeine@gmail.com)
* @brief A header that defines a dynamic double_node class
* @version 0.2
* @date 2023-06-19
* @version 0.21
* @date 2023-06-21
* @copyright Copyright (c) 2023
* @link https://github.com/SleepiCaffeine
*/
Expand Down Expand Up @@ -73,9 +73,7 @@ class double_node {
* @see double_node(double_node<T>* const nnd, double_node<T>* const bnd, const T dt)
*/
double_node(double_node<T>* const nd)
: next{nd}, prev{nullptr} {
nd->set_prev(this);
}
: next{nd}, prev{nullptr} { }

/**
* Creates a new double_node object that points to a double_node, and has data.
Expand All @@ -91,9 +89,7 @@ class double_node {
* @see double_node(double_node<T>* const nnd, double_node<T>* const bnd, const T dt)
*/
double_node(double_node<T>* const nd, const T dt)
: next{nd}, data{dt} {
nd->set_prev(this);
};
: next{nd}, data{dt} { }

/**
* Creates a new double_node object that points to 2 double_nodes, but has no data.
Expand All @@ -109,10 +105,7 @@ class double_node {
* @see double_node(double_node<T>* const nnd, double_node<T>* const bnd, const T dt)
*/
double_node(double_node<T>* const nnd, double_node<T>* const bnd)
: next{nnd}, prev{bnd} {
//nnd->set_prev(this);
//bnd->set_next(this);
}
: next{nnd}, prev{bnd} { }


/**
Expand All @@ -130,10 +123,7 @@ class double_node {
* @see double_node(double_node<T>* const nnd, double_node<T>* const bnd)
*/
double_node(double_node<T>* const nnd, double_node<T>* const bnd, const T dt)
: next{nnd}, prev{bnd}, data{dt} {
//nnd->set_prev(this);
//bnd->set_next(this);
}
: next{nnd}, prev{bnd}, data{dt} { }

/**
* Construct a new double_node object from another double_node object.
Expand Down
8 changes: 4 additions & 4 deletions Data Structures/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
* @file node.h
* @author Vakaris Michejenko (sleepicaffeine@gmail.com)
* @brief A header that defines a dynamic node class
* @version 0.2
* @date 2023-06-19
* @version 0.21
* @date 2023-06-21
* @copyright Copyright (c) 2023
* @link https://github.com/SleepiCaffeine
*/

#ifndef NODE_H
#define NODE_H
/*!
* @class Node
* @brief Node class.
* @class node
* @brief node class.
*
* @details A standard Node data structure that is used as a base unit in many other data structures. Supports insertion, removal, and dynamic types.
*
Expand Down
2 changes: 1 addition & 1 deletion Data Structures/sl_list.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class sl_list {
void set_head(node<T>* const nd);

/**
* Changes the head's data to the provided node
* Changes the head's data to the provided data value
* @param dt The head's new data
* @see set_head(node<T>* const nd)
* @see get_head()
Expand Down

0 comments on commit 3c2385f

Please sign in to comment.