Skip to content

Commit

Permalink
uploadec from laptopyipee
Browse files Browse the repository at this point in the history
c
  • Loading branch information
SleepiCaffeine authored Jun 19, 2023
1 parent 8f335e0 commit 3729160
Show file tree
Hide file tree
Showing 93 changed files with 13,371 additions and 0 deletions.
193 changes: 193 additions & 0 deletions Data Structures/double_node-doc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
#ifndef DOUBLE_NODE_H
#define DOUBLE_NODE_H


/*!
* @class double_node
* @brief double_node class.
*
* @details A Node class, that has a pointer to a node in front and behind. This is an extention of the Node class.
*
* @fn get_data()
* @fn set_data(T dt)
* @fn get_next()
* @fn set_next(double_node<T>* const nd)
* @fn get_behind()
* @fn set_behind(double_node<T>* const nd)
* @tparam T typename
*/
template <typename T>
class double_node {

protected:
double_node<T>* next;
double_node<T>* behind;
T data;

public:
/**
* Creates a new double_node that points to NULL in both ways and has NULL data.
* @brief Default constructor.
* @see double_node(const T dt)
* @see double_node(double_node<T>* const nd, const T dt)
* @see double_node(double_node<T>& const const nd)
* @see double_node(double_node<T>* const nnd, double_node<T>* const bnd, const T dt)
*/
double_node()
: next{nullptr}, behind{nullptr} { };

/**
* Creates a new double_node that points to NULL in both ways, and has data.
* @brief Constructor.
* @param dt double_node data
* @see double_node()
* @see double_node(double_node<T>* const nd, const T dt)
* @see double_node(double_node<T>& const nd)
* @see double_node(double_node<T>* const nnd, double_node<T>* const bnd)
* @see double_node(double_node<T>* const nnd, double_node<T>* const bnd, const T dt)
*/
double_node(const T dt)
: double_node{nullptr, nullptr, dt} { };

/**
* Creates a new double_node object that points to a double_node, and has data.
* @note The parameter node will NOT point back to this node
* @brief Constructor.
* @param nd double_node to which it will point
* @param dt double_node data
* @see double_node(const T dt)
* @see double_node()
* @see double_node(double_node<T>& const nd)
* @see double_node(double_node<T>* const nnd, double_node<T>* const bnd)
* @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} { };

/**
* Creates a new double_node object that points to 2 double_nodes, but has no data.
* @note The 2 nodes provided as parameters will NOT point to this new node. You will have to either do this manually or use a DLL
*
* @param nnd double_node to which it will point
* @param bnd double_node which will point to it
* @see double_node(const T dt)
* @see double_node()
* @see double_node(double_node<T>* const nd, const T dt)
* @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}, behind{bnd} {}


/**
* Creates a new double_node object that points to 2 double_nodes, and has data
* @note The 2 nodes provided as parameters will NOT point to this new node. You will have to either do this manually or use a DLL
*
* @param nnd double_node to which it will point
* @param bnd double_node which will point to it
* @param dt double_node data
* @see double_node(const T dt)
* @see double_node()
* @see double_node(double_node<T>& const nd)
* @see double_node(double_node<T>* const nd, const T dt)
* @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}, behind{bnd}, data{dt} {}

/**
* Construct a new double_node object from another double_node object.
* @brief Copy constructor.
* @param nd double_node object which will be copied
* @see double_node(const T dt)
* @see double_node()
* @see double_node(double_node<T>* const nd, const T dt)
* @see double_node(double_node<T>* const nnd, double_node<T>* bnd)
* @see double_node(double_node<T>* const nnd, double_node<T>* const bnd, const T dt)
*/
double_node(const double_node<T>& nd);

/**
* @brief Get the pointer to the next double_node
* @return double_node object to which the current double_node object points to
* @see set_next(Node<T>* const nd)
*/
double_node<T>* get_next() const;

/**
* @brief Set the pointer to the next Node
* @param *nd double_node object to which the current double_node object will point to
* @see get_next()
*/
void set_next(double_node<T>* const nd);

/**
* @brief Get the pointer to the node behind the current double_node
* @return double_node object which points to this double_node
* @see set_behind(double_node<T>* const nd)
*/
double_node<T>* get_behind() const;

/**
* @brief Set the pointer to the node behind the current double_node
* @param *nd double_node object which points to the current double_node object
* @see get_behind()
*/
void set_behind(double_node<T>* const nd);

/**
* @brief Get the double node's data
* @return double_node data
* @see setData(const T dt)
*/
T get_data() const;

/**
* @brief Set the current double node's data
* @param dt new double_node data
* @see getData()
*/
void set_data(const T dt);
};

template <typename T>
double_node<T>::double_node(const double_node<T>& nd) {
next = new double_node<T>();
behind = new double_node<T>();

next = nd.get_next();
behind = nd.get_behind();
data = nd.get_data();
}

template <typename T>
void double_node<T>::set_behind(double_node<T>* const nd) {
this->behind = nd;
}

template <typename T>
double_node<T>* double_node<T>::get_behind() const {
return this->behind;
}

template <typename T>
void double_node<T>::set_next(double_node<T>* const nd) {
this->next = nd;
}

template <typename T>
double_node<T>* double_node<T>::get_next() const {
return this->next;
}

template <typename T>
T double_node<T>::get_data() const {
return this->data;
}

template <typename T>
void double_node<T>::set_data(const T dt) {
this->data = dt;
}

#endif // DOUBLE_NODE_H
89 changes: 89 additions & 0 deletions Data Structures/html/annotated.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>struct Node: Class List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">struct Node<span id="projectnumber">&#160;0.1</span>
</div>
<div id="projectbrief">A header which contains a dynamic Node struct, which can be used to create many common data structures</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
<div class="headertitle"><div class="title">Class List</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><div class="directory">
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><b>single</b></td><td class="desc"></td></tr>
<tr id="row_0_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structsingle_1_1linked__list.html" target="_self">linked_list</a></td><td class="desc"></td></tr>
<tr id="row_1_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_node.html" target="_self">Node</a></td><td class="desc"><a class="el" href="struct_node.html" title="Node struct.">Node</a> struct </td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
</small></address>
</body>
</html>
Binary file added Data Structures/html/bc_s.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Data Structures/html/bc_sd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 91 additions & 0 deletions Data Structures/html/classes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>struct Node: Class Index</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">struct Node<span id="projectnumber">&#160;0.1</span>
</div>
<div id="projectbrief">A header which contains a dynamic Node struct, which can be used to create many common data structures</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
<div class="headertitle"><div class="title">Class Index</div></div>
</div><!--header-->
<div class="contents">
<div class="qindex"><a class="qindex" href="#letter_L">L</a>&#160;|&#160;<a class="qindex" href="#letter_N">N</a></div>
<div class="classindex">
<dl class="classindex even">
<dt class="alphachar"><a id="letter_L" name="letter_L">L</a></dt>
<dd><a class="el" href="structsingle_1_1linked__list.html">linked_list</a> (single)</dd></dl>
<dl class="classindex odd">
<dt class="alphachar"><a id="letter_N" name="letter_N">N</a></dt>
<dd><a class="el" href="struct_node.html">Node</a></dd></dl>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
</small></address>
</body>
</html>
Binary file added Data Structures/html/closed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3729160

Please sign in to comment.