Documentation for 53a6c16730
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: Class List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
@@ -224,12 +224,12 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();
|
||||
<tr id="row_35_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d2/d05/class_min_heap.html" target="_self">MinHeap</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_36_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d29/struct_min_heap_node.html" target="_self">MinHeapNode</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_37_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d1/d77/structmst.html" target="_self">mst</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_38_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/da1/structnode.html" target="_self">node</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_39_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d8b/struct_node.html" target="_self">Node</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_38_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d8b/struct_node.html" target="_self">Node</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_39_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/da1/structnode.html" target="_self">node</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_40_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/dc8/struct_point.html" target="_self">Point</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_41_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d1b/structquery.html" target="_self">query</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_42_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/db5/struct_queue.html" target="_self">Queue</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_43_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/da9/classqueue.html" target="_self">queue</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_42_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/da9/classqueue.html" target="_self">queue</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_43_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/db5/struct_queue.html" target="_self">Queue</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_44_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d8/d72/class_r_btree.html" target="_self">RBtree</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_45_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/db4/struct_segment_intersection.html" target="_self">SegmentIntersection</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_46_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d4f/class_solution.html" target="_self">Solution</a></td><td class="desc"></td></tr>
|
||||
@@ -248,7 +248,7 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -167,12 +167,12 @@ var annotated_dup =
|
||||
[ "MinHeap", "d2/d05/class_min_heap.html", "d2/d05/class_min_heap" ],
|
||||
[ "MinHeapNode", "d5/d29/struct_min_heap_node.html", null ],
|
||||
[ "mst", "d1/d77/structmst.html", null ],
|
||||
[ "node", "d5/da1/structnode.html", "d5/da1/structnode" ],
|
||||
[ "Node", "db/d8b/struct_node.html", null ],
|
||||
[ "node", "d5/da1/structnode.html", "d5/da1/structnode" ],
|
||||
[ "Point", "d8/dc8/struct_point.html", "d8/dc8/struct_point" ],
|
||||
[ "query", "dd/d1b/structquery.html", null ],
|
||||
[ "Queue", "dc/db5/struct_queue.html", null ],
|
||||
[ "queue", "db/da9/classqueue.html", "db/da9/classqueue" ],
|
||||
[ "Queue", "dc/db5/struct_queue.html", null ],
|
||||
[ "RBtree", "d8/d72/class_r_btree.html", null ],
|
||||
[ "SegmentIntersection", "d4/db4/struct_segment_intersection.html", "d4/db4/struct_segment_intersection" ],
|
||||
[ "Solution", "dd/d4f/class_solution.html", null ],
|
||||
|
||||
14
classes.html
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: Class Index</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
@@ -130,13 +130,13 @@ $(document).ready(function(){initNavTree('classes.html',''); initResizable(); })
|
||||
<dd><a class="el" href="d2/d05/class_min_heap.html">MinHeap</a></dd><dd><a class="el" href="d5/d29/struct_min_heap_node.html">MinHeapNode</a></dd><dd><a class="el" href="d1/d77/structmst.html">mst</a></dd></dl>
|
||||
<dl class="classindex odd">
|
||||
<dt class="alphachar"><a id="letter_N" name="letter_N">N</a></dt>
|
||||
<dd><a class="el" href="d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html">NCRModuloP</a> (math::ncr_modulo_p)</dd><dd><a class="el" href="d4/df4/classmachine__learning_1_1neural__network_1_1_neural_network.html">NeuralNetwork</a> (machine_learning::neural_network)</dd><dd><a class="el" href="d4/d0e/classdata__structures_1_1linked__list_1_1_node.html">Node</a> (data_structures::linked_list)</dd><dd><a class="el" href="d9/d49/structdata__structures_1_1_node.html">Node</a> (<a class="el" href="d5/d3c/namespacedata__structures.html">data_structures</a>)</dd><dd><a class="el" href="dd/d40/classdata__structures_1_1tree__234_1_1_node.html">Node</a> (data_structures::tree_234)</dd><dd><a class="el" href="d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html">Trie::Node</a> (data_structures::trie_using_hashmap)</dd><dd><a class="el" href="d5/da1/structnode.html">node</a></dd><dd><a class="el" href="db/d8b/struct_node.html">Node</a></dd><dd><a class="el" href="da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a> (operations_on_datastructures::circular_linked_list)</dd><dd><a class="el" href="d5/db5/classoperations__on__datastructures_1_1inorder__traversal__of__bst_1_1_node.html">Node</a> (operations_on_datastructures::inorder_traversal_of_bst)</dd><dd><a class="el" href="d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html">Node</a> (operations_on_datastructures::reverse_binary_tree)</dd><dd><a class="el" href="d2/d9a/structothers_1_1iterative__tree__traversals_1_1_node.html">Node</a> (others::iterative_tree_traversals)</dd><dd><a class="el" href="d9/df7/structothers_1_1recursive__tree__traversals_1_1_node.html">Node</a> (others::recursive_tree_traversals)</dd><dd><a class="el" href="d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html">perSegTree::Node</a> (<a class="el" href="dd/d69/namespacerange__queries.html">range_queries</a>)</dd><dd><a class="el" href="da/d61/structsearch_1_1sublist__search_1_1_node.html">Node</a> (search::sublist_search)</dd></dl>
|
||||
<dd><a class="el" href="d6/dc1/classmath_1_1ncr__modulo__p_1_1_n_c_r_modulo_p.html">NCRModuloP</a> (math::ncr_modulo_p)</dd><dd><a class="el" href="d4/df4/classmachine__learning_1_1neural__network_1_1_neural_network.html">NeuralNetwork</a> (machine_learning::neural_network)</dd><dd><a class="el" href="d4/d0e/classdata__structures_1_1linked__list_1_1_node.html">Node</a> (data_structures::linked_list)</dd><dd><a class="el" href="d9/d49/structdata__structures_1_1_node.html">Node</a> (<a class="el" href="d5/d3c/namespacedata__structures.html">data_structures</a>)</dd><dd><a class="el" href="dd/d40/classdata__structures_1_1tree__234_1_1_node.html">Node</a> (data_structures::tree_234)</dd><dd><a class="el" href="d5/d12/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node.html">Trie::Node</a> (data_structures::trie_using_hashmap)</dd><dd><a class="el" href="db/d8b/struct_node.html">Node</a></dd><dd><a class="el" href="d5/da1/structnode.html">node</a></dd><dd><a class="el" href="da/d16/structoperations__on__datastructures_1_1circular__linked__list_1_1_node.html">Node</a> (operations_on_datastructures::circular_linked_list)</dd><dd><a class="el" href="d5/db5/classoperations__on__datastructures_1_1inorder__traversal__of__bst_1_1_node.html">Node</a> (operations_on_datastructures::inorder_traversal_of_bst)</dd><dd><a class="el" href="d8/dfd/structoperations__on__datastructures_1_1reverse__binary__tree_1_1_node.html">Node</a> (operations_on_datastructures::reverse_binary_tree)</dd><dd><a class="el" href="d2/d9a/structothers_1_1iterative__tree__traversals_1_1_node.html">Node</a> (others::iterative_tree_traversals)</dd><dd><a class="el" href="d9/df7/structothers_1_1recursive__tree__traversals_1_1_node.html">Node</a> (others::recursive_tree_traversals)</dd><dd><a class="el" href="d5/d66/classrange__queries_1_1per_seg_tree_1_1_node.html">perSegTree::Node</a> (<a class="el" href="dd/d69/namespacerange__queries.html">range_queries</a>)</dd><dd><a class="el" href="da/d61/structsearch_1_1sublist__search_1_1_node.html">Node</a> (search::sublist_search)</dd></dl>
|
||||
<dl class="classindex even">
|
||||
<dt class="alphachar"><a id="letter_P" name="letter_P">P</a></dt>
|
||||
<dd><a class="el" href="d8/d28/classrange__queries_1_1per_seg_tree.html">perSegTree</a> (<a class="el" href="dd/d69/namespacerange__queries.html">range_queries</a>)</dd><dd><a class="el" href="d6/d45/structciphers_1_1elliptic__curve__key__exchange_1_1_point.html">Point</a> (<a class="el" href="df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html">ciphers::elliptic_curve_key_exchange</a>)</dd><dd><a class="el" href="d7/d48/structgeometry_1_1grahamscan_1_1_point.html">Point</a> (geometry::grahamscan)</dd><dd><a class="el" href="d9/d5a/structgeometry_1_1jarvis_1_1_point.html">Point</a> (geometry::jarvis)</dd><dd><a class="el" href="d8/dc8/struct_point.html">Point</a></dd></dl>
|
||||
<dl class="classindex odd">
|
||||
<dt class="alphachar"><a id="letter_Q" name="letter_Q">Q</a></dt>
|
||||
<dd><a class="el" href="dd/d1b/structquery.html">query</a></dd><dd><a class="el" href="dc/db5/struct_queue.html">Queue</a></dd><dd><a class="el" href="db/da9/classqueue.html">queue</a></dd><dd><a class="el" href="d6/d04/classdata__structures_1_1queue__using__array_1_1_queue___array.html">Queue_Array</a> (data_structures::queue_using_array)</dd></dl>
|
||||
<dd><a class="el" href="dd/d1b/structquery.html">query</a></dd><dd><a class="el" href="db/da9/classqueue.html">queue</a></dd><dd><a class="el" href="dc/db5/struct_queue.html">Queue</a></dd><dd><a class="el" href="d6/d04/classdata__structures_1_1queue__using__array_1_1_queue___array.html">Queue_Array</a> (data_structures::queue_using_array)</dd></dl>
|
||||
<dl class="classindex even">
|
||||
<dt class="alphachar"><a id="letter_R" name="letter_R">R</a></dt>
|
||||
<dd><a class="el" href="d8/d72/class_r_btree.html">RBtree</a></dd><dd><a class="el" href="d0/d58/classgraph_1_1_rooted_tree.html">RootedTree</a> (<a class="el" href="df/dce/namespacegraph.html">graph</a>)</dd></dl>
|
||||
@@ -158,7 +158,7 @@ $(document).ready(function(){initNavTree('classes.html',''); initResizable(); })
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: others/smallest_circle.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -160,71 +160,71 @@ The function returns the radius of the circle and prints the coordinated of the
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>radius of the circle </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> {</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordtype">double</span> minR = INFINITY;</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordtype">double</span> R;</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <a class="code hl_struct" href="../../d8/dc8/struct_point.html">Point</a> C;</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <a class="code hl_struct" href="../../d8/dc8/struct_point.html">Point</a> minC;</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> </div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="comment">/* This code is invalid and does not give correct result for TEST 3 */</span></div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="comment">// for each point in the list</span></div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < P.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() - 2; i++)</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="comment">// for every subsequent point in the list</span></div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = i + 1; j < P.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>(); j++)</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="comment">// for every subsequent point in the list</span></div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> k = j + 1; <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a> < P.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>(); <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>++) {</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="comment">// here, we now have picked three points from the given set of</span></div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="comment">// points that we can use</span></div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="comment">// viz., P[i], P[j] and P[k]</span></div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> C.x = -0.5 * ((P[i].y * (P[j].x * P[j].x + P[j].y * P[j].y -</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].x * P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].x - P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].y * P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].y) +</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> P[j].y * (P[k].x * P[k].x + P[k].y * P[k].y -</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> P[i].x * P[i].x - P[i].y * P[i].y) +</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].y * (P[i].x * P[i].x + P[i].y * P[i].y -</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> P[j].x * P[j].x - P[j].y * P[j].y)) /</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> (P[i].x * (P[j].y - P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].y) +</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> P[j].x * (P[k].y - P[i].y) +</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].x * (P[i].y - P[j].y)));</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> C.<a class="code hl_variable" href="../../d8/dc8/struct_point.html#a2e1b5fb2b2a83571f5c0bc0f66a73cf7">y</a> = 0.5 * ((P[i].x * (P[j].x * P[j].x + P[j].y * P[j].y -</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].x * P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].x - P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].y * P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].y) +</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> P[j].x * (P[k].x * P[k].x + P[k].y * P[k].y -</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> P[i].x * P[i].x - P[i].y * P[i].y) +</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].x * (P[i].x * P[i].x + P[i].y * P[i].y -</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> P[j].x * P[j].x - P[j].y * P[j].y)) /</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> (P[i].x * (P[j].y - P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].y) +</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> P[j].x * (P[k].y - P[i].y) +</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].x * (P[i].y - P[j].y)));</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> R = (<a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(P[i], P[j]) * <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(P[j], P[k]) *</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(P[k], P[i])) /</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> (4 * <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a94682a4a70d5906857ca09de5b9fb2cc">TriangleArea</a>(P[i], P[j], P[k]));</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#aee6d48762c1dfb9f14627927f0c16fad">PointInCircle</a>(P, C, R)) {</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> }</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">if</span> (R <= minR) {</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> minR = R;</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> minC = C;</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> }</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> }</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="comment">// for each point in the list</span></div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < P.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() - 1; i++)</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="comment">// for every subsequent point in the list</span></div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = i + 1; j < P.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>(); j++) {</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="comment">// check for diameterically opposite points</span></div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> C.x = (P[i].x + P[j].x) / 2;</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> C.<a class="code hl_variable" href="../../d8/dc8/struct_point.html#a2e1b5fb2b2a83571f5c0bc0f66a73cf7">y</a> = (P[i].y + P[j].y) / 2;</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> R = <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(C, P[i]);</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#aee6d48762c1dfb9f14627927f0c16fad">PointInCircle</a>(P, C, R)) {</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> }</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordflow">if</span> (R <= minR) {</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> minR = R;</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> minC = C;</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> }</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> }</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << minC.x << <span class="stringliteral">" "</span> << minC.<a class="code hl_variable" href="../../d8/dc8/struct_point.html#a2e1b5fb2b2a83571f5c0bc0f66a73cf7">y</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keywordflow">return</span> minR;</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 87</span> {</div>
|
||||
<div class="line"><span class="lineno"> 88</span> <span class="keywordtype">double</span> minR = INFINITY;</div>
|
||||
<div class="line"><span class="lineno"> 89</span> <span class="keywordtype">double</span> R;</div>
|
||||
<div class="line"><span class="lineno"> 90</span> <a class="code hl_struct" href="../../d8/dc8/struct_point.html">Point</a> C;</div>
|
||||
<div class="line"><span class="lineno"> 91</span> <a class="code hl_struct" href="../../d8/dc8/struct_point.html">Point</a> minC;</div>
|
||||
<div class="line"><span class="lineno"> 92</span> </div>
|
||||
<div class="line"><span class="lineno"> 93</span> <span class="comment">/* This code is invalid and does not give correct result for TEST 3 */</span></div>
|
||||
<div class="line"><span class="lineno"> 94</span> <span class="comment">// for each point in the list</span></div>
|
||||
<div class="line"><span class="lineno"> 95</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < P.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() - 2; i++)</div>
|
||||
<div class="line"><span class="lineno"> 96</span> <span class="comment">// for every subsequent point in the list</span></div>
|
||||
<div class="line"><span class="lineno"> 97</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = i + 1; j < P.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>(); j++)</div>
|
||||
<div class="line"><span class="lineno"> 98</span> <span class="comment">// for every subsequent point in the list</span></div>
|
||||
<div class="line"><span class="lineno"> 99</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> k = j + 1; <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a> < P.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>(); <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>++) {</div>
|
||||
<div class="line"><span class="lineno"> 100</span> <span class="comment">// here, we now have picked three points from the given set of</span></div>
|
||||
<div class="line"><span class="lineno"> 101</span> <span class="comment">// points that we can use</span></div>
|
||||
<div class="line"><span class="lineno"> 102</span> <span class="comment">// viz., P[i], P[j] and P[k]</span></div>
|
||||
<div class="line"><span class="lineno"> 103</span> C.x = -0.5 * ((P[i].y * (P[j].x * P[j].x + P[j].y * P[j].y -</div>
|
||||
<div class="line"><span class="lineno"> 104</span> P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].x * P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].x - P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].y * P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].y) +</div>
|
||||
<div class="line"><span class="lineno"> 105</span> P[j].y * (P[k].x * P[k].x + P[k].y * P[k].y -</div>
|
||||
<div class="line"><span class="lineno"> 106</span> P[i].x * P[i].x - P[i].y * P[i].y) +</div>
|
||||
<div class="line"><span class="lineno"> 107</span> P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].y * (P[i].x * P[i].x + P[i].y * P[i].y -</div>
|
||||
<div class="line"><span class="lineno"> 108</span> P[j].x * P[j].x - P[j].y * P[j].y)) /</div>
|
||||
<div class="line"><span class="lineno"> 109</span> (P[i].x * (P[j].y - P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].y) +</div>
|
||||
<div class="line"><span class="lineno"> 110</span> P[j].x * (P[k].y - P[i].y) +</div>
|
||||
<div class="line"><span class="lineno"> 111</span> P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].x * (P[i].y - P[j].y)));</div>
|
||||
<div class="line"><span class="lineno"> 112</span> C.<a class="code hl_variable" href="../../d8/dc8/struct_point.html#a2e1b5fb2b2a83571f5c0bc0f66a73cf7">y</a> = 0.5 * ((P[i].x * (P[j].x * P[j].x + P[j].y * P[j].y -</div>
|
||||
<div class="line"><span class="lineno"> 113</span> P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].x * P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].x - P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].y * P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].y) +</div>
|
||||
<div class="line"><span class="lineno"> 114</span> P[j].x * (P[k].x * P[k].x + P[k].y * P[k].y -</div>
|
||||
<div class="line"><span class="lineno"> 115</span> P[i].x * P[i].x - P[i].y * P[i].y) +</div>
|
||||
<div class="line"><span class="lineno"> 116</span> P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].x * (P[i].x * P[i].x + P[i].y * P[i].y -</div>
|
||||
<div class="line"><span class="lineno"> 117</span> P[j].x * P[j].x - P[j].y * P[j].y)) /</div>
|
||||
<div class="line"><span class="lineno"> 118</span> (P[i].x * (P[j].y - P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].y) +</div>
|
||||
<div class="line"><span class="lineno"> 119</span> P[j].x * (P[k].y - P[i].y) +</div>
|
||||
<div class="line"><span class="lineno"> 120</span> P[<a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a>].x * (P[i].y - P[j].y)));</div>
|
||||
<div class="line"><span class="lineno"> 121</span> R = (<a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(P[i], P[j]) * <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(P[j], P[k]) *</div>
|
||||
<div class="line"><span class="lineno"> 122</span> <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(P[k], P[i])) /</div>
|
||||
<div class="line"><span class="lineno"> 123</span> (4 * <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a94682a4a70d5906857ca09de5b9fb2cc">TriangleArea</a>(P[i], P[j], P[k]));</div>
|
||||
<div class="line"><span class="lineno"> 124</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#aee6d48762c1dfb9f14627927f0c16fad">PointInCircle</a>(P, C, R)) {</div>
|
||||
<div class="line"><span class="lineno"> 125</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><span class="lineno"> 126</span> }</div>
|
||||
<div class="line"><span class="lineno"> 127</span> <span class="keywordflow">if</span> (R <= minR) {</div>
|
||||
<div class="line"><span class="lineno"> 128</span> minR = R;</div>
|
||||
<div class="line"><span class="lineno"> 129</span> minC = C;</div>
|
||||
<div class="line"><span class="lineno"> 130</span> }</div>
|
||||
<div class="line"><span class="lineno"> 131</span> }</div>
|
||||
<div class="line"><span class="lineno"> 132</span> </div>
|
||||
<div class="line"><span class="lineno"> 133</span> <span class="comment">// for each point in the list</span></div>
|
||||
<div class="line"><span class="lineno"> 134</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < P.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() - 1; i++)</div>
|
||||
<div class="line"><span class="lineno"> 135</span> <span class="comment">// for every subsequent point in the list</span></div>
|
||||
<div class="line"><span class="lineno"> 136</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = i + 1; j < P.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>(); j++) {</div>
|
||||
<div class="line"><span class="lineno"> 137</span> <span class="comment">// check for diameterically opposite points</span></div>
|
||||
<div class="line"><span class="lineno"> 138</span> C.x = (P[i].x + P[j].x) / 2;</div>
|
||||
<div class="line"><span class="lineno"> 139</span> C.<a class="code hl_variable" href="../../d8/dc8/struct_point.html#a2e1b5fb2b2a83571f5c0bc0f66a73cf7">y</a> = (P[i].y + P[j].y) / 2;</div>
|
||||
<div class="line"><span class="lineno"> 140</span> R = <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(C, P[i]);</div>
|
||||
<div class="line"><span class="lineno"> 141</span> <span class="keywordflow">if</span> (!<a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#aee6d48762c1dfb9f14627927f0c16fad">PointInCircle</a>(P, C, R)) {</div>
|
||||
<div class="line"><span class="lineno"> 142</span> <span class="keywordflow">continue</span>;</div>
|
||||
<div class="line"><span class="lineno"> 143</span> }</div>
|
||||
<div class="line"><span class="lineno"> 144</span> <span class="keywordflow">if</span> (R <= minR) {</div>
|
||||
<div class="line"><span class="lineno"> 145</span> minR = R;</div>
|
||||
<div class="line"><span class="lineno"> 146</span> minC = C;</div>
|
||||
<div class="line"><span class="lineno"> 147</span> }</div>
|
||||
<div class="line"><span class="lineno"> 148</span> }</div>
|
||||
<div class="line"><span class="lineno"> 149</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << minC.x << <span class="stringliteral">" "</span> << minC.<a class="code hl_variable" href="../../d8/dc8/struct_point.html#a2e1b5fb2b2a83571f5c0bc0f66a73cf7">y</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 150</span> <span class="keywordflow">return</span> minR;</div>
|
||||
<div class="line"><span class="lineno"> 151</span>}</div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="acomposite__simpson__rule_8cpp_html_a1b74d828b33760094906797042b89442"><div class="ttname"><a href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">numerical_methods::simpson_method::k</a></div><div class="ttdeci">double k(double x)</div><div class="ttdoc">Another test function.</div><div class="ttdef"><b>Definition:</b> composite_simpson_rule.cpp:117</div></div>
|
||||
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
|
||||
@@ -279,11 +279,11 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>ditance </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> {</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordtype">double</span> dx = B.x - A.x;</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keywordtype">double</span> dy = B.<a class="code hl_variable" href="../../d8/dc8/struct_point.html#a2e1b5fb2b2a83571f5c0bc0f66a73cf7">y</a> - A.<a class="code hl_variable" href="../../d8/dc8/struct_point.html#a2e1b5fb2b2a83571f5c0bc0f66a73cf7">y</a>;</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">return</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html">std::sqrt</a>((dx * dx) + (dy * dy));</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 37</span> {</div>
|
||||
<div class="line"><span class="lineno"> 38</span> <span class="keywordtype">double</span> dx = B.x - A.x;</div>
|
||||
<div class="line"><span class="lineno"> 39</span> <span class="keywordtype">double</span> dy = B.<a class="code hl_variable" href="../../d8/dc8/struct_point.html#a2e1b5fb2b2a83571f5c0bc0f66a73cf7">y</a> - A.<a class="code hl_variable" href="../../d8/dc8/struct_point.html#a2e1b5fb2b2a83571f5c0bc0f66a73cf7">y</a>;</div>
|
||||
<div class="line"><span class="lineno"> 40</span> <span class="keywordflow">return</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html">std::sqrt</a>((dx * dx) + (dy * dy));</div>
|
||||
<div class="line"><span class="lineno"> 41</span>}</div>
|
||||
<div class="ttc" id="asqrt_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html">std::sqrt</a></div><div class="ttdeci">T sqrt(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -310,14 +310,14 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Main program </p>
|
||||
<div class="fragment"><div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> {</div>
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a>();</div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a0283886819c7c140a023582b7269e2d0">test2</a>();</div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a6d0455dd5c30adda100e95f0423c786e">test3</a>();</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 198</span> {</div>
|
||||
<div class="line"><span class="lineno"> 199</span> <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a>();</div>
|
||||
<div class="line"><span class="lineno"> 200</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 201</span> <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a0283886819c7c140a023582b7269e2d0">test2</a>();</div>
|
||||
<div class="line"><span class="lineno"> 202</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 203</span> <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a6d0455dd5c30adda100e95f0423c786e">test3</a>();</div>
|
||||
<div class="line"><span class="lineno"> 204</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 205</span>}</div>
|
||||
<div class="ttc" id="asmallest__circle_8cpp_html_a0283886819c7c140a023582b7269e2d0"><div class="ttname"><a href="../../d0/d01/smallest__circle_8cpp.html#a0283886819c7c140a023582b7269e2d0">test2</a></div><div class="ttdeci">void test2()</div><div class="ttdef"><b>Definition:</b> smallest_circle.cpp:173</div></div>
|
||||
<div class="ttc" id="asmallest__circle_8cpp_html_a6d0455dd5c30adda100e95f0423c786e"><div class="ttname"><a href="../../d0/d01/smallest__circle_8cpp.html#a6d0455dd5c30adda100e95f0423c786e">test3</a></div><div class="ttdeci">void test3()</div><div class="ttdef"><b>Definition:</b> smallest_circle.cpp:188</div></div>
|
||||
<div class="ttc" id="asmallest__circle_8cpp_html_ae1a3968e7947464bee7714f6d43b7002"><div class="ttname"><a href="../../d0/d01/smallest__circle_8cpp.html#ae1a3968e7947464bee7714f6d43b7002">test</a></div><div class="ttdeci">void test()</div><div class="ttdef"><b>Definition:</b> smallest_circle.cpp:158</div></div>
|
||||
@@ -372,13 +372,13 @@ Here is the call graph for this function:</div>
|
||||
<dl class="section return"><dt>Returns</dt><dd>True if P lies on or within the circle </dd>
|
||||
<dd>
|
||||
False if P lies outside the circle </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> {</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < P.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>(); i++) {</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(P[i], Center) > R)</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> }</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 72</span> {</div>
|
||||
<div class="line"><span class="lineno"> 73</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < P.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>(); i++) {</div>
|
||||
<div class="line"><span class="lineno"> 74</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(P[i], Center) > R)</div>
|
||||
<div class="line"><span class="lineno"> 75</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 76</span> }</div>
|
||||
<div class="line"><span class="lineno"> 77</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 78</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -406,15 +406,15 @@ Here is the call graph for this function:</div>
|
||||
Circle with <br />
|
||||
radius 3.318493136080724 <br />
|
||||
centre at (3.0454545454545454, 1.3181818181818181) </p>
|
||||
<div class="fragment"><div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> {</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Point></a> Pv;</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(0, 0));</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(5, 4));</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(1, 3));</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(4, 1));</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(3, -2));</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a0b0676df8e4da7a08c7ccaecea344903">circle</a>(Pv) << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 158</span> {</div>
|
||||
<div class="line"><span class="lineno"> 159</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Point></a> Pv;</div>
|
||||
<div class="line"><span class="lineno"> 160</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(0, 0));</div>
|
||||
<div class="line"><span class="lineno"> 161</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(5, 4));</div>
|
||||
<div class="line"><span class="lineno"> 162</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(1, 3));</div>
|
||||
<div class="line"><span class="lineno"> 163</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(4, 1));</div>
|
||||
<div class="line"><span class="lineno"> 164</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(3, -2));</div>
|
||||
<div class="line"><span class="lineno"> 165</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a0b0676df8e4da7a08c7ccaecea344903">circle</a>(Pv) << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 166</span>}</div>
|
||||
<div class="ttc" id="anamespaceciphers_1_1elliptic__curve__key__exchange_html_af0a6e3521629c25c2b5d620f26429830"><div class="ttname"><a href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">ciphers::elliptic_curve_key_exchange::Point</a></div><div class="ttdeci">struct ciphers::elliptic_curve_key_exchange::Point Point</div><div class="ttdoc">Definition of struct Point.</div></div>
|
||||
<div class="ttc" id="apush_back_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">std::vector::push_back</a></div><div class="ttdeci">T push_back(T... args)</div></div>
|
||||
<div class="ttc" id="asmallest__circle_8cpp_html_a0b0676df8e4da7a08c7ccaecea344903"><div class="ttname"><a href="../../d0/d01/smallest__circle_8cpp.html#a0b0676df8e4da7a08c7ccaecea344903">circle</a></div><div class="ttdeci">double circle(const std::vector< Point > &P)</div><div class="ttdef"><b>Definition:</b> smallest_circle.cpp:87</div></div>
|
||||
@@ -446,14 +446,14 @@ Here is the call graph for this function:</div>
|
||||
Circle with <br />
|
||||
radius 1.4142135623730951 <br />
|
||||
centre at (1.0, 1.0) </p>
|
||||
<div class="fragment"><div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> {</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Point></a> Pv;</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(0, 0));</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(0, 2));</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(2, 2));</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(2, 0));</div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a0b0676df8e4da7a08c7ccaecea344903">circle</a>(Pv) << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 173</span> {</div>
|
||||
<div class="line"><span class="lineno"> 174</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Point></a> Pv;</div>
|
||||
<div class="line"><span class="lineno"> 175</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(0, 0));</div>
|
||||
<div class="line"><span class="lineno"> 176</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(0, 2));</div>
|
||||
<div class="line"><span class="lineno"> 177</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(2, 2));</div>
|
||||
<div class="line"><span class="lineno"> 178</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(2, 0));</div>
|
||||
<div class="line"><span class="lineno"> 179</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a0b0676df8e4da7a08c7ccaecea344903">circle</a>(Pv) << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 180</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -481,14 +481,14 @@ Here is the call graph for this function:</div>
|
||||
Circle with <br />
|
||||
radius 1.821078397711709 <br />
|
||||
centre at (2.142857142857143, 1.7857142857142856) </p><dl class="todo"><dt><b><a class="el" href="../../dd/da0/todo.html#_todo000010">Todo:</a></b></dt><dd>This test fails </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> {</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Point></a> Pv;</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(0.5, 1));</div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(3.5, 3));</div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(2.5, 0));</div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(2, 1.5));</div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a0b0676df8e4da7a08c7ccaecea344903">circle</a>(Pv) << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 188</span> {</div>
|
||||
<div class="line"><span class="lineno"> 189</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Point></a> Pv;</div>
|
||||
<div class="line"><span class="lineno"> 190</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(0.5, 1));</div>
|
||||
<div class="line"><span class="lineno"> 191</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(3.5, 3));</div>
|
||||
<div class="line"><span class="lineno"> 192</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(2.5, 0));</div>
|
||||
<div class="line"><span class="lineno"> 193</span> Pv.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/push_back.html">push_back</a>(<a class="code hl_typedef" href="../../df/d6b/namespaceciphers_1_1elliptic__curve__key__exchange.html#af0a6e3521629c25c2b5d620f26429830">Point</a>(2, 1.5));</div>
|
||||
<div class="line"><span class="lineno"> 194</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a0b0676df8e4da7a08c7ccaecea344903">circle</a>(Pv) << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 195</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -541,13 +541,13 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>area of triangle </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> {</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordtype">double</span> a = <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(A, B);</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordtype">double</span> b = <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(B, C);</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordtype">double</span> c = <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(C, A);</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordtype">double</span> p = (a + b + c) / 2;</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">return</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html">std::sqrt</a>(p * (p - a) * (p - b) * (p - c));</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 54</span> {</div>
|
||||
<div class="line"><span class="lineno"> 55</span> <span class="keywordtype">double</span> a = <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(A, B);</div>
|
||||
<div class="line"><span class="lineno"> 56</span> <span class="keywordtype">double</span> b = <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(B, C);</div>
|
||||
<div class="line"><span class="lineno"> 57</span> <span class="keywordtype">double</span> c = <a class="code hl_function" href="../../d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a">LenghtLine</a>(C, A);</div>
|
||||
<div class="line"><span class="lineno"> 58</span> <span class="keywordtype">double</span> p = (a + b + c) / 2;</div>
|
||||
<div class="line"><span class="lineno"> 59</span> <span class="keywordflow">return</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html">std::sqrt</a>(p * (p - a) * (p - b) * (p - c));</div>
|
||||
<div class="line"><span class="lineno"> 60</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -563,7 +563,7 @@ Here is the call graph for this function:</div>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_9510827d0b234b3cc54b29892f217477.html">others</a></li><li class="navelem"><a class="el" href="../../d0/d01/smallest__circle_8cpp.html">smallest_circle.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<map id="test2" name="test2">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,81,56,108"/>
|
||||
<area shape="rect" id="node2" href="$d0/d01/smallest__circle_8cpp.html#a0b0676df8e4da7a08c7ccaecea344903" title=" " alt="" coords="155,81,208,108"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="319,5,391,32"/>
|
||||
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="104,132,259,159"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="319,5,391,32"/>
|
||||
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back#" title=" " alt="" coords="104,132,259,159"/>
|
||||
<area shape="rect" id="node4" href="$d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a" title=" " alt="" coords="467,107,553,133"/>
|
||||
<area shape="rect" id="node6" href="$d0/d01/smallest__circle_8cpp.html#aee6d48762c1dfb9f14627927f0c16fad" title=" " alt="" coords="307,157,404,184"/>
|
||||
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="452,183,568,209"/>
|
||||
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size#" title=" " alt="" coords="452,183,568,209"/>
|
||||
<area shape="rect" id="node8" href="$d0/d01/smallest__circle_8cpp.html#a94682a4a70d5906857ca09de5b9fb2cc" title=" " alt="" coords="308,56,403,83"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt.html#" title=" " alt="" coords="616,81,687,108"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt#" title=" " alt="" coords="616,81,687,108"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
9a81ff56728f9c8b3a77fb2aafdef4a8
|
||||
e39e60e1ca0af098cd3104a10dfc1769
|
||||
@@ -82,7 +82,7 @@ var sectionId = 'dynsection-6';
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="235.5,-138.12 235.5,-157.12 289.5,-157.12 289.5,-138.12 235.5,-138.12"/>
|
||||
<text text-anchor="middle" x="262.5" y="-145.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
@@ -97,7 +97,7 @@ var sectionId = 'dynsection-6';
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-43.12 74,-62.12 190,-62.12 190,-43.12 74,-43.12"/>
|
||||
<text text-anchor="middle" x="132" y="-50.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
@@ -148,7 +148,7 @@ var sectionId = 'dynsection-6';
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="335,-5.12 335,-24.12 422,-24.12 422,-5.12 335,-5.12"/>
|
||||
<text text-anchor="middle" x="378.5" y="-12.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
@@ -178,7 +178,7 @@ var sectionId = 'dynsection-6';
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="458,-81.12 458,-100.12 511,-100.12 511,-81.12 458,-81.12"/>
|
||||
<text text-anchor="middle" x="484.5" y="-88.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@@ -36,7 +36,7 @@
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="235.5,-138.12 235.5,-157.12 289.5,-157.12 289.5,-138.12 235.5,-138.12"/>
|
||||
<text text-anchor="middle" x="262.5" y="-145.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
@@ -51,7 +51,7 @@
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-43.12 74,-62.12 190,-62.12 190,-43.12 74,-43.12"/>
|
||||
<text text-anchor="middle" x="132" y="-50.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
@@ -102,7 +102,7 @@
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="335,-5.12 335,-24.12 422,-24.12 422,-5.12 335,-5.12"/>
|
||||
<text text-anchor="middle" x="378.5" y="-12.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
@@ -132,7 +132,7 @@
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="458,-81.12 458,-100.12 511,-100.12 511,-81.12 458,-81.12"/>
|
||||
<text text-anchor="middle" x="484.5" y="-88.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
@@ -1,9 +1,9 @@
|
||||
<map id="circle" name="circle">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,107,59,133"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="119,5,191,32"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="119,5,191,32"/>
|
||||
<area shape="rect" id="node3" href="$d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a" title=" " alt="" coords="267,107,353,133"/>
|
||||
<area shape="rect" id="node5" href="$d0/d01/smallest__circle_8cpp.html#aee6d48762c1dfb9f14627927f0c16fad" title=" " alt="" coords="107,157,204,184"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="252,183,368,209"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size#" title=" " alt="" coords="252,183,368,209"/>
|
||||
<area shape="rect" id="node7" href="$d0/d01/smallest__circle_8cpp.html#a94682a4a70d5906857ca09de5b9fb2cc" title=" " alt="" coords="108,56,203,83"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt.html#" title=" " alt="" coords="416,81,487,108"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt#" title=" " alt="" coords="416,81,487,108"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
b63f7291b68685b997fe0cd3b7a318c5
|
||||
fe8f1e71a7f632eec4b970719b4ea82a
|
||||
@@ -21,7 +21,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="85.5,-135.83 85.5,-154.83 139.5,-154.83 139.5,-135.83 85.5,-135.83"/>
|
||||
<text text-anchor="middle" x="112.5" y="-142.83" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
@@ -66,7 +66,7 @@
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="185,-2.83 185,-21.83 272,-21.83 272,-2.83 185,-2.83"/>
|
||||
<text text-anchor="middle" x="228.5" y="-9.83" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
@@ -96,7 +96,7 @@
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="308,-78.83 308,-97.83 361,-97.83 361,-78.83 308,-78.83"/>
|
||||
<text text-anchor="middle" x="334.5" y="-85.83" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
@@ -1,4 +1,4 @@
|
||||
<map id="LenghtLine" name="LenghtLine">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,5,91,32"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt.html#" title=" " alt="" coords="139,5,209,32"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt#" title=" " alt="" coords="139,5,209,32"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
85602a3e499be87b1e844c5208077b3b
|
||||
b43ab4cfd0446519b4bc5eb193e9ffca
|
||||
@@ -21,7 +21,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="100,-0.5 100,-19.5 153,-19.5 153,-0.5 100,-0.5"/>
|
||||
<text text-anchor="middle" x="126.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -1,11 +1,11 @@
|
||||
<map id="test3" name="test3">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,81,56,108"/>
|
||||
<area shape="rect" id="node2" href="$d0/d01/smallest__circle_8cpp.html#a0b0676df8e4da7a08c7ccaecea344903" title=" " alt="" coords="155,81,208,108"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="319,5,391,32"/>
|
||||
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="104,132,259,159"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="319,5,391,32"/>
|
||||
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back#" title=" " alt="" coords="104,132,259,159"/>
|
||||
<area shape="rect" id="node4" href="$d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a" title=" " alt="" coords="467,107,553,133"/>
|
||||
<area shape="rect" id="node6" href="$d0/d01/smallest__circle_8cpp.html#aee6d48762c1dfb9f14627927f0c16fad" title=" " alt="" coords="307,157,404,184"/>
|
||||
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="452,183,568,209"/>
|
||||
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size#" title=" " alt="" coords="452,183,568,209"/>
|
||||
<area shape="rect" id="node8" href="$d0/d01/smallest__circle_8cpp.html#a94682a4a70d5906857ca09de5b9fb2cc" title=" " alt="" coords="308,56,403,83"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt.html#" title=" " alt="" coords="616,81,687,108"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt#" title=" " alt="" coords="616,81,687,108"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
76a49154b66346e73439879cc3094fc2
|
||||
1aa7dbda1931837eca2c70c8f82f79bd
|
||||
@@ -82,7 +82,7 @@ var sectionId = 'dynsection-7';
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="235.5,-138.12 235.5,-157.12 289.5,-157.12 289.5,-138.12 235.5,-138.12"/>
|
||||
<text text-anchor="middle" x="262.5" y="-145.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
@@ -97,7 +97,7 @@ var sectionId = 'dynsection-7';
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-43.12 74,-62.12 190,-62.12 190,-43.12 74,-43.12"/>
|
||||
<text text-anchor="middle" x="132" y="-50.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
@@ -148,7 +148,7 @@ var sectionId = 'dynsection-7';
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="335,-5.12 335,-24.12 422,-24.12 422,-5.12 335,-5.12"/>
|
||||
<text text-anchor="middle" x="378.5" y="-12.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
@@ -178,7 +178,7 @@ var sectionId = 'dynsection-7';
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="458,-81.12 458,-100.12 511,-100.12 511,-81.12 458,-81.12"/>
|
||||
<text text-anchor="middle" x="484.5" y="-88.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@@ -36,7 +36,7 @@
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="235.5,-138.12 235.5,-157.12 289.5,-157.12 289.5,-138.12 235.5,-138.12"/>
|
||||
<text text-anchor="middle" x="262.5" y="-145.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
@@ -51,7 +51,7 @@
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="74,-43.12 74,-62.12 190,-62.12 190,-43.12 74,-43.12"/>
|
||||
<text text-anchor="middle" x="132" y="-50.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
@@ -102,7 +102,7 @@
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="335,-5.12 335,-24.12 422,-24.12 422,-5.12 335,-5.12"/>
|
||||
<text text-anchor="middle" x="378.5" y="-12.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
@@ -132,7 +132,7 @@
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="458,-81.12 458,-100.12 511,-100.12 511,-81.12 458,-81.12"/>
|
||||
<text text-anchor="middle" x="484.5" y="-88.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
@@ -1,5 +1,5 @@
|
||||
<map id="TriangleArea" name="TriangleArea">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,31,100,57"/>
|
||||
<area shape="rect" id="node2" href="$d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a" title=" " alt="" coords="148,5,233,32"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt.html#" title=" " alt="" coords="281,31,352,57"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt#" title=" " alt="" coords="281,31,352,57"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
26e65b58d9e25ec75a9213cd7654d639
|
||||
fee926049fcc32123881f7267a91efd6
|
||||
@@ -36,7 +36,7 @@
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="207,-0.5 207,-19.5 260,-19.5 260,-0.5 207,-0.5"/>
|
||||
<text text-anchor="middle" x="233.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
@@ -1,11 +1,11 @@
|
||||
<map id="test" name="test">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,81,49,108"/>
|
||||
<area shape="rect" id="node2" href="$d0/d01/smallest__circle_8cpp.html#a0b0676df8e4da7a08c7ccaecea344903" title=" " alt="" coords="148,81,201,108"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="313,5,385,32"/>
|
||||
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="97,132,252,159"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="313,5,385,32"/>
|
||||
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back#" title=" " alt="" coords="97,132,252,159"/>
|
||||
<area shape="rect" id="node4" href="$d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a" title=" " alt="" coords="461,107,546,133"/>
|
||||
<area shape="rect" id="node6" href="$d0/d01/smallest__circle_8cpp.html#aee6d48762c1dfb9f14627927f0c16fad" title=" " alt="" coords="300,157,397,184"/>
|
||||
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="445,183,561,209"/>
|
||||
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size#" title=" " alt="" coords="445,183,561,209"/>
|
||||
<area shape="rect" id="node8" href="$d0/d01/smallest__circle_8cpp.html#a94682a4a70d5906857ca09de5b9fb2cc" title=" " alt="" coords="301,56,396,83"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt.html#" title=" " alt="" coords="609,81,680,108"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt#" title=" " alt="" coords="609,81,680,108"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
34627f3d45b36d63738c0142103b0f21
|
||||
831c62b593e89307e2d005d2140c21c0
|
||||
@@ -82,7 +82,7 @@ var sectionId = 'dynsection-5';
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="230.5,-138.12 230.5,-157.12 284.5,-157.12 284.5,-138.12 230.5,-138.12"/>
|
||||
<text text-anchor="middle" x="257.5" y="-145.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
@@ -97,7 +97,7 @@ var sectionId = 'dynsection-5';
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="69,-43.12 69,-62.12 185,-62.12 185,-43.12 69,-43.12"/>
|
||||
<text text-anchor="middle" x="127" y="-50.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
@@ -148,7 +148,7 @@ var sectionId = 'dynsection-5';
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="330,-5.12 330,-24.12 417,-24.12 417,-5.12 330,-5.12"/>
|
||||
<text text-anchor="middle" x="373.5" y="-12.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
@@ -178,7 +178,7 @@ var sectionId = 'dynsection-5';
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="453,-81.12 453,-100.12 506,-100.12 506,-81.12 453,-81.12"/>
|
||||
<text text-anchor="middle" x="479.5" y="-88.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@@ -36,7 +36,7 @@
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="230.5,-138.12 230.5,-157.12 284.5,-157.12 284.5,-138.12 230.5,-138.12"/>
|
||||
<text text-anchor="middle" x="257.5" y="-145.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
@@ -51,7 +51,7 @@
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="69,-43.12 69,-62.12 185,-62.12 185,-43.12 69,-43.12"/>
|
||||
<text text-anchor="middle" x="127" y="-50.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
@@ -102,7 +102,7 @@
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="330,-5.12 330,-24.12 417,-24.12 417,-5.12 330,-5.12"/>
|
||||
<text text-anchor="middle" x="373.5" y="-12.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
@@ -132,7 +132,7 @@
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="453,-81.12 453,-100.12 506,-100.12 506,-81.12 453,-81.12"/>
|
||||
<text text-anchor="middle" x="479.5" y="-88.12" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
@@ -1,14 +1,14 @@
|
||||
<map id="main" name="main">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,91,56,118"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="418,116,490,143"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="418,116,490,143"/>
|
||||
<area shape="rect" id="node3" href="$d0/d01/smallest__circle_8cpp.html#ae1a3968e7947464bee7714f6d43b7002" title=" " alt="" coords="107,116,151,143"/>
|
||||
<area shape="rect" id="node11" href="$d0/d01/smallest__circle_8cpp.html#a0283886819c7c140a023582b7269e2d0" title=" " alt="" coords="104,167,155,194"/>
|
||||
<area shape="rect" id="node12" href="$d0/d01/smallest__circle_8cpp.html#a6d0455dd5c30adda100e95f0423c786e" title=" " alt="" coords="104,66,155,92"/>
|
||||
<area shape="rect" id="node4" href="$d0/d01/smallest__circle_8cpp.html#a0b0676df8e4da7a08c7ccaecea344903" title=" " alt="" coords="253,218,307,244"/>
|
||||
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back.html#" title=" " alt="" coords="203,66,357,92"/>
|
||||
<area shape="rect" id="node10" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/push_back#" title=" " alt="" coords="203,66,357,92"/>
|
||||
<area shape="rect" id="node5" href="$d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a" title=" " alt="" coords="566,218,651,244"/>
|
||||
<area shape="rect" id="node7" href="$d0/d01/smallest__circle_8cpp.html#aee6d48762c1dfb9f14627927f0c16fad" title=" " alt="" coords="405,268,503,295"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="551,294,667,320"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size#" title=" " alt="" coords="551,294,667,320"/>
|
||||
<area shape="rect" id="node9" href="$d0/d01/smallest__circle_8cpp.html#a94682a4a70d5906857ca09de5b9fb2cc" title=" " alt="" coords="407,167,501,194"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt.html#" title=" " alt="" coords="715,192,785,219"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt#" title=" " alt="" coords="715,192,785,219"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
ebacbe7a3e92facfd7329e83b94791fe
|
||||
a36d5b6e135f43dbf617fbf6f84fc5ff
|
||||
@@ -67,7 +67,7 @@ var sectionId = 'dynsection-3';
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="309.5,-133.5 309.5,-152.5 363.5,-152.5 363.5,-133.5 309.5,-133.5"/>
|
||||
<text text-anchor="middle" x="336.5" y="-140.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
@@ -148,7 +148,7 @@ var sectionId = 'dynsection-3';
|
||||
<!-- Node10 -->
|
||||
<g id="node10" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="148,-171.5 148,-190.5 264,-190.5 264,-171.5 148,-171.5"/>
|
||||
<text text-anchor="middle" x="206" y="-178.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
@@ -199,7 +199,7 @@ var sectionId = 'dynsection-3';
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="409,-0.5 409,-19.5 496,-19.5 496,-0.5 409,-0.5"/>
|
||||
<text text-anchor="middle" x="452.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
@@ -229,7 +229,7 @@ var sectionId = 'dynsection-3';
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="532,-76.5 532,-95.5 585,-95.5 585,-76.5 532,-76.5"/>
|
||||
<text text-anchor="middle" x="558.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@@ -21,7 +21,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="309.5,-133.5 309.5,-152.5 363.5,-152.5 363.5,-133.5 309.5,-133.5"/>
|
||||
<text text-anchor="middle" x="336.5" y="-140.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
@@ -102,7 +102,7 @@
|
||||
<!-- Node10 -->
|
||||
<g id="node10" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back.html#" xlink:title=" ">
|
||||
<g id="a_node10"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/push_back#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="148,-171.5 148,-190.5 264,-190.5 264,-171.5 148,-171.5"/>
|
||||
<text text-anchor="middle" x="206" y="-178.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::push_back</text>
|
||||
</a>
|
||||
@@ -153,7 +153,7 @@
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="409,-0.5 409,-19.5 496,-19.5 496,-0.5 409,-0.5"/>
|
||||
<text text-anchor="middle" x="452.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
@@ -183,7 +183,7 @@
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="532,-76.5 532,-95.5 585,-95.5 585,-76.5 532,-76.5"/>
|
||||
<text text-anchor="middle" x="558.5" y="-83.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@@ -1,6 +1,6 @@
|
||||
<map id="PointInCircle" name="PointInCircle">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,31,103,57"/>
|
||||
<area shape="rect" id="node2" href="$d0/d01/smallest__circle_8cpp.html#a3cbebd6f4d2cdf227663c67fe41ba12a" title=" " alt="" coords="166,5,251,32"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size.html#" title=" " alt="" coords="151,56,267,83"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt.html#" title=" " alt="" coords="315,5,385,32"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size#" title=" " alt="" coords="151,56,267,83"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt#" title=" " alt="" coords="315,5,385,32"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
4a8734e6e1815d849a7d7a1393222bc2
|
||||
4a4b4c08ff4074f049b0933fcbae9481
|
||||
@@ -36,7 +36,7 @@
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size.html#" xlink:title=" ">
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="109,-0.5 109,-19.5 196,-19.5 196,-0.5 109,-0.5"/>
|
||||
<text text-anchor="middle" x="152.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
@@ -51,7 +51,7 @@
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="232,-38.5 232,-57.5 285,-57.5 285,-38.5 232,-38.5"/>
|
||||
<text text-anchor="middle" x="258.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: math/realtime_stats.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -160,42 +160,42 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Main function </p>
|
||||
<div class="fragment"><div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> {</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keyword">const</span> <span class="keywordtype">float</span> test_data1[] = {3, 4, 5, -1.4, -3.6, 1.9, 1.};</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <a class="code hl_function" href="../../d0/d08/realtime__stats_8cpp.html#aa54c915581fcc495489175a4386d59fd">test_function</a>(test_data1, <span class="keyword">sizeof</span>(test_data1) / <span class="keyword">sizeof</span>(test_data1[0]));</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> </div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> << <span class="stringliteral">"Enter data. Any non-numeric data will terminate the data input."</span></div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> </div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <a class="code hl_class" href="../../d7/d7c/classstatistics_1_1stats__computer1.html">stats_computer1<float></a> stats1;</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <a class="code hl_class" href="../../d8/dab/classstatistics_1_1stats__computer2.html">stats_computer2<float></a> stats2;</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="keywordflow">while</span> (1) {</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="keywordtype">double</span> val;</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Enter number: "</span>;</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> val;</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> </div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="comment">// check for failure to read input. Happens for</span></div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="comment">// non-numeric data</span></div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <span class="keywordflow">if</span> (<a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a>.fail())</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> </div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> stats1.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#aa13bf7c38de112f71921a5525d71a2f2">new_val</a>(val);</div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> stats2.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#ade6de704deea24fdc88077b3d9a0d534">new_val</a>(val);</div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> </div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\tMethod 1:"</span></div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> << <span class="stringliteral">"\tMean: "</span> << stats1.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#a390697dcee210b91823ceff04b25081b">mean</a>()</div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> << <span class="stringliteral">"\t Variance: "</span> << stats1.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#a27f0a03e2fd2254f1c81fe668226bd92">variance</a>()</div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> << <span class="stringliteral">"\t Std: "</span> << stats1.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#af57e942d49f4fd70f059f224b4ac07e1">std</a>() << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\tMethod 2:"</span></div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> << <span class="stringliteral">"\tMean: "</span> << stats2.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#a8290966ad468f2a8c266d008bc60720e">mean</a>()</div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> << <span class="stringliteral">"\t Variance: "</span> << stats2.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#af6198817084276113b3c064e87ce0555">variance</a>()</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> << <span class="stringliteral">"\t Std: "</span> << stats2.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#acf2e84df4fc386bb3295016ef8fd156e">std</a>() << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> }</div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> </div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 158</span> {</div>
|
||||
<div class="line"><span class="lineno"> 159</span> <span class="keyword">const</span> <span class="keywordtype">float</span> test_data1[] = {3, 4, 5, -1.4, -3.6, 1.9, 1.};</div>
|
||||
<div class="line"><span class="lineno"> 160</span> <a class="code hl_function" href="../../d0/d08/realtime__stats_8cpp.html#aa54c915581fcc495489175a4386d59fd">test_function</a>(test_data1, <span class="keyword">sizeof</span>(test_data1) / <span class="keyword">sizeof</span>(test_data1[0]));</div>
|
||||
<div class="line"><span class="lineno"> 161</span> </div>
|
||||
<div class="line"><span class="lineno"> 162</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div>
|
||||
<div class="line"><span class="lineno"> 163</span> << <span class="stringliteral">"Enter data. Any non-numeric data will terminate the data input."</span></div>
|
||||
<div class="line"><span class="lineno"> 164</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 165</span> </div>
|
||||
<div class="line"><span class="lineno"> 166</span> <a class="code hl_class" href="../../d7/d7c/classstatistics_1_1stats__computer1.html">stats_computer1<float></a> stats1;</div>
|
||||
<div class="line"><span class="lineno"> 167</span> <a class="code hl_class" href="../../d8/dab/classstatistics_1_1stats__computer2.html">stats_computer2<float></a> stats2;</div>
|
||||
<div class="line"><span class="lineno"> 168</span> </div>
|
||||
<div class="line"><span class="lineno"> 169</span> <span class="keywordflow">while</span> (1) {</div>
|
||||
<div class="line"><span class="lineno"> 170</span> <span class="keywordtype">double</span> val;</div>
|
||||
<div class="line"><span class="lineno"> 171</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Enter number: "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 172</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> val;</div>
|
||||
<div class="line"><span class="lineno"> 173</span> </div>
|
||||
<div class="line"><span class="lineno"> 174</span> <span class="comment">// check for failure to read input. Happens for</span></div>
|
||||
<div class="line"><span class="lineno"> 175</span> <span class="comment">// non-numeric data</span></div>
|
||||
<div class="line"><span class="lineno"> 176</span> <span class="keywordflow">if</span> (<a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a>.fail())</div>
|
||||
<div class="line"><span class="lineno"> 177</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><span class="lineno"> 178</span> </div>
|
||||
<div class="line"><span class="lineno"> 179</span> stats1.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#aa13bf7c38de112f71921a5525d71a2f2">new_val</a>(val);</div>
|
||||
<div class="line"><span class="lineno"> 180</span> stats2.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#ade6de704deea24fdc88077b3d9a0d534">new_val</a>(val);</div>
|
||||
<div class="line"><span class="lineno"> 181</span> </div>
|
||||
<div class="line"><span class="lineno"> 182</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\tMethod 1:"</span></div>
|
||||
<div class="line"><span class="lineno"> 183</span> << <span class="stringliteral">"\tMean: "</span> << stats1.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#a390697dcee210b91823ceff04b25081b">mean</a>()</div>
|
||||
<div class="line"><span class="lineno"> 184</span> << <span class="stringliteral">"\t Variance: "</span> << stats1.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#a27f0a03e2fd2254f1c81fe668226bd92">variance</a>()</div>
|
||||
<div class="line"><span class="lineno"> 185</span> << <span class="stringliteral">"\t Std: "</span> << stats1.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#af57e942d49f4fd70f059f224b4ac07e1">std</a>() << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 186</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\tMethod 2:"</span></div>
|
||||
<div class="line"><span class="lineno"> 187</span> << <span class="stringliteral">"\tMean: "</span> << stats2.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#a8290966ad468f2a8c266d008bc60720e">mean</a>()</div>
|
||||
<div class="line"><span class="lineno"> 188</span> << <span class="stringliteral">"\t Variance: "</span> << stats2.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#af6198817084276113b3c064e87ce0555">variance</a>()</div>
|
||||
<div class="line"><span class="lineno"> 189</span> << <span class="stringliteral">"\t Std: "</span> << stats2.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#acf2e84df4fc386bb3295016ef8fd156e">std</a>() << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 190</span> }</div>
|
||||
<div class="line"><span class="lineno"> 191</span> </div>
|
||||
<div class="line"><span class="lineno"> 192</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 193</span>}</div>
|
||||
<div class="ttc" id="abasic_istream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a></div></div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="aclassstatistics_1_1stats__computer1_html"><div class="ttname"><a href="../../d7/d7c/classstatistics_1_1stats__computer1.html">statistics::stats_computer1</a></div><div class="ttdef"><b>Definition:</b> realtime_stats.cpp:27</div></div>
|
||||
@@ -250,44 +250,44 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> {</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordtype">float</span> mean = 0.f, variance = 0.f;</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <a class="code hl_class" href="../../d7/d7c/classstatistics_1_1stats__computer1.html">stats_computer1<float></a> stats01;</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <a class="code hl_class" href="../../d8/dab/classstatistics_1_1stats__computer2.html">stats_computer2<float></a> stats02;</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> </div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < number_of_samples; i++) {</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> stats01.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#aa13bf7c38de112f71921a5525d71a2f2">new_val</a>(test_data[i]);</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> stats02.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#ade6de704deea24fdc88077b3d9a0d534">new_val</a>(test_data[i]);</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> mean += test_data[i];</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> }</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> </div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> mean /= number_of_samples;</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> </div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < number_of_samples; i++) {</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keywordtype">float</span> temp = test_data[i] - mean;</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> variance += temp * temp;</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> }</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> variance /= number_of_samples;</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> </div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"<<<<<<<< Test Function >>>>>>>>"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> << <span class="stringliteral">"Expected: Mean: "</span> << mean << <span class="stringliteral">"\t Variance: "</span> << variance</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\tMethod 1:"</span></div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> << <span class="stringliteral">"\tMean: "</span> << stats01.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#a390697dcee210b91823ceff04b25081b">mean</a>()</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> << <span class="stringliteral">"\t Variance: "</span> << stats01.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#a27f0a03e2fd2254f1c81fe668226bd92">variance</a>()</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> << <span class="stringliteral">"\t Std: "</span> << stats01.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#af57e942d49f4fd70f059f224b4ac07e1">std</a>() << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\tMethod 2:"</span></div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> << <span class="stringliteral">"\tMean: "</span> << stats02.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#a8290966ad468f2a8c266d008bc60720e">mean</a>()</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> << <span class="stringliteral">"\t Variance: "</span> << stats02.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#af6198817084276113b3c064e87ce0555">variance</a>()</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> << <span class="stringliteral">"\t Std: "</span> << stats02.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#acf2e84df4fc386bb3295016ef8fd156e">std</a>() << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> </div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> assert(std::abs(stats01.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#a390697dcee210b91823ceff04b25081b">mean</a>() - mean) < 0.01);</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> assert(std::abs(stats02.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#a8290966ad468f2a8c266d008bc60720e">mean</a>() - mean) < 0.01);</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> assert(std::abs(stats02.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#af6198817084276113b3c064e87ce0555">variance</a>() - variance) < 0.01);</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> </div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"(Tests passed)"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 118</span> {</div>
|
||||
<div class="line"><span class="lineno"> 119</span> <span class="keywordtype">float</span> mean = 0.f, variance = 0.f;</div>
|
||||
<div class="line"><span class="lineno"> 120</span> </div>
|
||||
<div class="line"><span class="lineno"> 121</span> <a class="code hl_class" href="../../d7/d7c/classstatistics_1_1stats__computer1.html">stats_computer1<float></a> stats01;</div>
|
||||
<div class="line"><span class="lineno"> 122</span> <a class="code hl_class" href="../../d8/dab/classstatistics_1_1stats__computer2.html">stats_computer2<float></a> stats02;</div>
|
||||
<div class="line"><span class="lineno"> 123</span> </div>
|
||||
<div class="line"><span class="lineno"> 124</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < number_of_samples; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 125</span> stats01.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#aa13bf7c38de112f71921a5525d71a2f2">new_val</a>(test_data[i]);</div>
|
||||
<div class="line"><span class="lineno"> 126</span> stats02.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#ade6de704deea24fdc88077b3d9a0d534">new_val</a>(test_data[i]);</div>
|
||||
<div class="line"><span class="lineno"> 127</span> mean += test_data[i];</div>
|
||||
<div class="line"><span class="lineno"> 128</span> }</div>
|
||||
<div class="line"><span class="lineno"> 129</span> </div>
|
||||
<div class="line"><span class="lineno"> 130</span> mean /= number_of_samples;</div>
|
||||
<div class="line"><span class="lineno"> 131</span> </div>
|
||||
<div class="line"><span class="lineno"> 132</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < number_of_samples; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 133</span> <span class="keywordtype">float</span> temp = test_data[i] - mean;</div>
|
||||
<div class="line"><span class="lineno"> 134</span> variance += temp * temp;</div>
|
||||
<div class="line"><span class="lineno"> 135</span> }</div>
|
||||
<div class="line"><span class="lineno"> 136</span> variance /= number_of_samples;</div>
|
||||
<div class="line"><span class="lineno"> 137</span> </div>
|
||||
<div class="line"><span class="lineno"> 138</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"<<<<<<<< Test Function >>>>>>>>"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div>
|
||||
<div class="line"><span class="lineno"> 139</span> << <span class="stringliteral">"Expected: Mean: "</span> << mean << <span class="stringliteral">"\t Variance: "</span> << variance</div>
|
||||
<div class="line"><span class="lineno"> 140</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 141</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\tMethod 1:"</span></div>
|
||||
<div class="line"><span class="lineno"> 142</span> << <span class="stringliteral">"\tMean: "</span> << stats01.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#a390697dcee210b91823ceff04b25081b">mean</a>()</div>
|
||||
<div class="line"><span class="lineno"> 143</span> << <span class="stringliteral">"\t Variance: "</span> << stats01.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#a27f0a03e2fd2254f1c81fe668226bd92">variance</a>()</div>
|
||||
<div class="line"><span class="lineno"> 144</span> << <span class="stringliteral">"\t Std: "</span> << stats01.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#af57e942d49f4fd70f059f224b4ac07e1">std</a>() << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 145</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\tMethod 2:"</span></div>
|
||||
<div class="line"><span class="lineno"> 146</span> << <span class="stringliteral">"\tMean: "</span> << stats02.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#a8290966ad468f2a8c266d008bc60720e">mean</a>()</div>
|
||||
<div class="line"><span class="lineno"> 147</span> << <span class="stringliteral">"\t Variance: "</span> << stats02.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#af6198817084276113b3c064e87ce0555">variance</a>()</div>
|
||||
<div class="line"><span class="lineno"> 148</span> << <span class="stringliteral">"\t Std: "</span> << stats02.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#acf2e84df4fc386bb3295016ef8fd156e">std</a>() << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 149</span> </div>
|
||||
<div class="line"><span class="lineno"> 150</span> assert(std::abs(stats01.<a class="code hl_function" href="../../d7/d7c/classstatistics_1_1stats__computer1.html#a390697dcee210b91823ceff04b25081b">mean</a>() - mean) < 0.01);</div>
|
||||
<div class="line"><span class="lineno"> 151</span> assert(std::abs(stats02.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#a8290966ad468f2a8c266d008bc60720e">mean</a>() - mean) < 0.01);</div>
|
||||
<div class="line"><span class="lineno"> 152</span> assert(std::abs(stats02.<a class="code hl_function" href="../../d8/dab/classstatistics_1_1stats__computer2.html#af6198817084276113b3c064e87ce0555">variance</a>() - variance) < 0.01);</div>
|
||||
<div class="line"><span class="lineno"> 153</span> </div>
|
||||
<div class="line"><span class="lineno"> 154</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"(Tests passed)"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 155</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -303,7 +303,7 @@ Here is the call graph for this function:</div>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_296d53ceaeaa7e099814a6def439fe8a.html">math</a></li><li class="navelem"><a class="el" href="../../d0/d08/realtime__stats_8cpp.html">realtime_stats.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<map id="main" name="main">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,277,56,303"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="317,59,389,86"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="317,59,389,86"/>
|
||||
<area shape="rect" id="node3" href="$d7/d7c/classstatistics_1_1stats__computer1.html#a390697dcee210b91823ceff04b25081b" title=" " alt="" coords="263,111,443,152"/>
|
||||
<area shape="rect" id="node4" href="$d8/dab/classstatistics_1_1stats__computer2.html#a8290966ad468f2a8c266d008bc60720e" title=" " alt="" coords="263,176,443,217"/>
|
||||
<area shape="rect" id="node5" href="$d7/d7c/classstatistics_1_1stats__computer1.html#aa13bf7c38de112f71921a5525d71a2f2" title=" " alt="" coords="263,241,443,283"/>
|
||||
@@ -10,5 +10,5 @@
|
||||
<area shape="rect" id="node10" href="$d8/dab/classstatistics_1_1stats__computer2.html#acf2e84df4fc386bb3295016ef8fd156e" title=" " alt="" coords="249,459,456,486"/>
|
||||
<area shape="rect" id="node11" href="$d8/dab/classstatistics_1_1stats__computer2.html#af6198817084276113b3c064e87ce0555" title=" " alt="" coords="504,452,684,493"/>
|
||||
<area shape="rect" id="node12" href="$d0/d08/realtime__stats_8cpp.html#aa54c915581fcc495489175a4386d59fd" title=" " alt="" coords="104,306,201,333"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt.html#" title=" " alt="" coords="559,383,629,410"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt#" title=" " alt="" coords="559,383,629,410"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
38822d3a73635fe9b654e1e2e660f8de
|
||||
20c1830a2a0ebb98af42b0fe7748ad3a
|
||||
@@ -67,7 +67,7 @@ var sectionId = 'dynsection-1';
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="233.5,-372.97 233.5,-391.97 287.5,-391.97 287.5,-372.97 233.5,-372.97"/>
|
||||
<text text-anchor="middle" x="260.5" y="-379.97" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
@@ -223,7 +223,7 @@ var sectionId = 'dynsection-1';
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="415,-129.97 415,-148.97 468,-148.97 468,-129.97 415,-129.97"/>
|
||||
<text text-anchor="middle" x="441.5" y="-136.97" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -21,7 +21,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="233.5,-372.97 233.5,-391.97 287.5,-391.97 287.5,-372.97 233.5,-372.97"/>
|
||||
<text text-anchor="middle" x="260.5" y="-379.97" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
@@ -177,7 +177,7 @@
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="415,-129.97 415,-148.97 468,-148.97 468,-129.97 415,-129.97"/>
|
||||
<text text-anchor="middle" x="441.5" y="-136.97" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -1,6 +1,6 @@
|
||||
<map id="test_function" name="test_function">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,260,103,287"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="218,5,290,32"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="218,5,290,32"/>
|
||||
<area shape="rect" id="node3" href="$d7/d7c/classstatistics_1_1stats__computer1.html#a390697dcee210b91823ceff04b25081b" title=" " alt="" coords="164,57,344,98"/>
|
||||
<area shape="rect" id="node4" href="$d8/dab/classstatistics_1_1stats__computer2.html#a8290966ad468f2a8c266d008bc60720e" title=" " alt="" coords="164,122,344,163"/>
|
||||
<area shape="rect" id="node5" href="$d7/d7c/classstatistics_1_1stats__computer1.html#aa13bf7c38de112f71921a5525d71a2f2" title=" " alt="" coords="164,187,344,229"/>
|
||||
@@ -9,5 +9,5 @@
|
||||
<area shape="rect" id="node9" href="$d7/d7c/classstatistics_1_1stats__computer1.html#a27f0a03e2fd2254f1c81fe668226bd92" title=" " alt="" coords="405,317,585,358"/>
|
||||
<area shape="rect" id="node10" href="$d8/dab/classstatistics_1_1stats__computer2.html#acf2e84df4fc386bb3295016ef8fd156e" title=" " alt="" coords="151,420,357,447"/>
|
||||
<area shape="rect" id="node11" href="$d8/dab/classstatistics_1_1stats__computer2.html#af6198817084276113b3c064e87ce0555" title=" " alt="" coords="405,446,585,487"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt.html#" title=" " alt="" coords="460,387,531,413"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sqrt#" title=" " alt="" coords="460,387,531,413"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
575b513901c1029439a4bb24396816b6
|
||||
ba60d91f25c2a068c5a0ed41aea04117
|
||||
@@ -21,7 +21,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="159.5,-349.5 159.5,-368.5 213.5,-368.5 213.5,-349.5 159.5,-349.5"/>
|
||||
<text text-anchor="middle" x="186.5" y="-356.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
@@ -162,7 +162,7 @@
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html#" xlink:title=" ">
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sqrt#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="341,-63.5 341,-82.5 394,-82.5 394,-63.5 341,-63.5"/>
|
||||
<text text-anchor="middle" x="367.5" y="-70.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::sqrt</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: Member List</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -104,7 +104,7 @@ $(document).ready(function(){initNavTree('d1/d77/structmst.html','../../'); init
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<map id="graph::RootedTree" name="graph::RootedTree">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,80,136,107"/>
|
||||
<area shape="rect" id="node2" href="$dc/d61/classgraph_1_1_graph.html" title=" " alt="" coords="6,5,135,32"/>
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="245,289,375,316"/>
|
||||
<area shape="rect" id="node2" href="$dc/d61/classgraph_1_1_graph.html" title=" " alt="" coords="187,213,316,240"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/map" title=" " alt="" coords="5,95,148,136"/>
|
||||
<area shape="rect" id="node4" title=" " alt="" coords="57,5,96,32"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector" title=" " alt="" coords="172,95,331,136"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector" title=" " alt="" coords="269,5,391,32"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
c3f0587b7ce635ad22cbbaae6da2b585
|
||||
7b77526d31ccbeb8c74c4bd6f88b7505
|
||||
@@ -4,17 +4,17 @@
|
||||
<!-- Generated by graphviz version 2.50.0 (20211204.2007)
|
||||
-->
|
||||
<!-- Title: graph::RootedTree Pages: 1 -->
|
||||
<svg width="106pt" height="84pt"
|
||||
viewBox="0.00 0.00 106.00 84.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 80)">
|
||||
<svg width="298pt" height="241pt"
|
||||
viewBox="0.00 0.00 297.50 241.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 237)">
|
||||
<title>graph::RootedTree</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-80 102,-80 102,4 -4,4"/>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-237 293.5,-237 293.5,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_node1"><a xlink:title=" ">
|
||||
<polygon fill="#bfbfbf" stroke="black" points="0,-0.5 0,-19.5 98,-19.5 98,-0.5 0,-0.5"/>
|
||||
<text text-anchor="middle" x="49" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::RootedTree</text>
|
||||
<polygon fill="#bfbfbf" stroke="black" points="179.5,-0.5 179.5,-19.5 277.5,-19.5 277.5,-0.5 179.5,-0.5"/>
|
||||
<text text-anchor="middle" x="228.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::RootedTree</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
@@ -22,16 +22,90 @@
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a xlink:href="../../dc/d61/classgraph_1_1_graph.html" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="0.5,-56.5 0.5,-75.5 97.5,-75.5 97.5,-56.5 0.5,-56.5"/>
|
||||
<text text-anchor="middle" x="49" y="-63.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::Graph< T ></text>
|
||||
<polygon fill="white" stroke="black" points="136,-57.5 136,-76.5 233,-76.5 233,-57.5 136,-57.5"/>
|
||||
<text text-anchor="middle" x="184.5" y="-64.5" font-family="Helvetica,sans-Serif" font-size="10.00">graph::Graph< T ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2->Node1 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>Node2->Node1</title>
|
||||
<path fill="none" stroke="midnightblue" d="M49,-45.8C49,-36.91 49,-26.78 49,-19.75"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="45.5,-46.08 49,-56.08 52.5,-46.08 45.5,-46.08"/>
|
||||
<path fill="none" stroke="midnightblue" d="M197.67,-49.53C205.51,-39.74 215.14,-27.7 221.53,-19.71"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="194.89,-47.41 191.38,-57.41 200.36,-51.78 194.89,-47.41"/>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/map" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="0,-135.5 0,-165.5 107,-165.5 107,-135.5 0,-135.5"/>
|
||||
<text text-anchor="start" x="8" y="-153.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::map< T, std::list</text>
|
||||
<text text-anchor="middle" x="53.5" y="-142.5" font-family="Helvetica,sans-Serif" font-size="10.00">< T > ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node2 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>Node3->Node2</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M73.58,-128.16C84.81,-117.15 99.54,-104.15 114.5,-95 127.17,-87.26 142.44,-81.05 155.48,-76.56"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="70.96,-125.83 66.4,-135.4 75.93,-130.77 70.96,-125.83"/>
|
||||
<text text-anchor="middle" x="147.5" y="-103.5" font-family="Helvetica,sans-Serif" font-size="10.00"> adjacency_list</text>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a xlink:title=" ">
|
||||
<polygon fill="white" stroke="#bfbfbf" points="39,-213.5 39,-232.5 68,-232.5 68,-213.5 39,-213.5"/>
|
||||
<text text-anchor="middle" x="53.5" y="-220.5" font-family="Helvetica,sans-Serif" font-size="10.00">T</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node3 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>Node4->Node3</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M53.5,-203.24C53.5,-191.41 53.5,-176.38 53.5,-165.58"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="50,-203.36 53.5,-213.36 57,-203.36 50,-203.36"/>
|
||||
<text text-anchor="middle" x="66" y="-187" font-family="Helvetica,sans-Serif" font-size="10.00"> keys</text>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="125,-135.5 125,-165.5 244,-165.5 244,-135.5 125,-135.5"/>
|
||||
<text text-anchor="start" x="133" y="-153.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< std::vector</text>
|
||||
<text text-anchor="middle" x="184.5" y="-142.5" font-family="Helvetica,sans-Serif" font-size="10.00">< int > ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5->Node2 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node5->Node2</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M184.5,-125.25C184.5,-108.78 184.5,-87.99 184.5,-76.54"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="181,-125.3 184.5,-135.3 188,-125.3 181,-125.3"/>
|
||||
<text text-anchor="middle" x="207.5" y="-103.5" font-family="Helvetica,sans-Serif" font-size="10.00"> neighbors</text>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="197.5,-213.5 197.5,-232.5 289.5,-232.5 289.5,-213.5 197.5,-213.5"/>
|
||||
<text text-anchor="middle" x="243.5" y="-220.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector< int ></text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6->Node1 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node6->Node1</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M254.85,-204.53C256.36,-201.46 257.67,-198.22 258.5,-195 259.73,-190.27 258.75,-188.88 258.5,-184 255.61,-127.13 253.6,-112.65 241.5,-57 238.64,-43.86 234.2,-28.93 231.32,-19.74"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="251.65,-203.07 249.71,-213.48 257.72,-206.55 251.65,-203.07"/>
|
||||
<text text-anchor="middle" x="266.5" y="-109" font-family="Helvetica,sans-Serif" font-size="10.00"> level</text>
|
||||
<text text-anchor="middle" x="266.5" y="-98" font-family="Helvetica,sans-Serif" font-size="10.00">parent</text>
|
||||
</g>
|
||||
<!-- Node6->Node5 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node6->Node5</title>
|
||||
<path fill="none" stroke="#9a32cd" stroke-dasharray="5,2" d="M226.41,-206.49C222.68,-202.85 218.85,-198.89 215.5,-195 207.51,-185.73 199.52,-174.45 193.65,-165.7"/>
|
||||
<polygon fill="#9a32cd" stroke="#9a32cd" points="224.06,-209.09 233.73,-213.41 228.87,-204 224.06,-209.09"/>
|
||||
<text text-anchor="middle" x="237" y="-187" font-family="Helvetica,sans-Serif" font-size="10.00"> elements</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 5.9 KiB |
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: neural_network Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -104,7 +104,7 @@ $(document).ready(function(){initNavTree('d0/d2e/namespaceneural__network.html',
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../d0/d2e/namespaceneural__network.html">neural_network</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: data_structures::trie Class Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -177,17 +177,17 @@ static constexpr uint8_t </td><td class="memItemRight" valign="bottom"><b>N
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>unsigned integer index </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> {</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keywordflow">if</span> (ch >= <span class="charliteral">'A'</span> && ch <= <span class="charliteral">'Z'</span>) {</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">return</span> ch - <span class="charliteral">'A'</span>;</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ch >= <span class="charliteral">'a'</span> && ch <= <span class="charliteral">'z'</span>) {</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">return</span> ch - <span class="charliteral">'a'</span> + <a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a4bfac4be6ed1a34c7159eddb42469191">NUM_CHARS</a>;</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> }</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cerr</a> << <span class="stringliteral">"Invalid character present. Exiting..."</span>;</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/program/exit.html">std::exit</a>(EXIT_FAILURE);</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 38</span> {</div>
|
||||
<div class="line"><span class="lineno"> 39</span> <span class="keywordflow">if</span> (ch >= <span class="charliteral">'A'</span> && ch <= <span class="charliteral">'Z'</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 40</span> <span class="keywordflow">return</span> ch - <span class="charliteral">'A'</span>;</div>
|
||||
<div class="line"><span class="lineno"> 41</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ch >= <span class="charliteral">'a'</span> && ch <= <span class="charliteral">'z'</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 42</span> <span class="keywordflow">return</span> ch - <span class="charliteral">'a'</span> + <a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a4bfac4be6ed1a34c7159eddb42469191">NUM_CHARS</a>;</div>
|
||||
<div class="line"><span class="lineno"> 43</span> }</div>
|
||||
<div class="line"><span class="lineno"> 44</span> </div>
|
||||
<div class="line"><span class="lineno"> 45</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cerr</a> << <span class="stringliteral">"Invalid character present. Exiting..."</span>;</div>
|
||||
<div class="line"><span class="lineno"> 46</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/program/exit.html">std::exit</a>(EXIT_FAILURE);</div>
|
||||
<div class="line"><span class="lineno"> 47</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 48</span> }</div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cerr</a></div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie_html_a4bfac4be6ed1a34c7159eddb42469191"><div class="ttname"><a href="../../d0/d3e/classdata__structures_1_1trie.html#a4bfac4be6ed1a34c7159eddb42469191">data_structures::trie::NUM_CHARS</a></div><div class="ttdeci">static constexpr uint8_t NUM_CHARS</div><div class="ttdoc">Number of alphabets.</div><div class="ttdef"><b>Definition:</b> trie_tree.cpp:27</div></div>
|
||||
<div class="ttc" id="aexit_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/program/exit.html">std::exit</a></div><div class="ttdeci">T exit(T... args)</div></div>
|
||||
@@ -245,43 +245,43 @@ Here is the call graph for this function:</div>
|
||||
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if successful </dd>
|
||||
<dd>
|
||||
<code>false</code> if unsuccessful </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> {</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keywordflow">if</span> (index == str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>()) {</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">if</span> (!<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a4cb0f775b5a4bc14a6d39b5c93883eb6">isEndofWord</a>) {</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> }</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a4cb0f775b5a4bc14a6d39b5c93883eb6">isEndofWord</a> = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="comment">// following lines - possible source of error?</span></div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="comment">// for (int i = 0; i < NUM_CHARS; i++)</span></div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="comment">// if (!arr[i])</span></div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="comment">// return false;</span></div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> }</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keywordtype">int</span> j = <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#aab373beb3f618b90922528c68797d988">char_to_int</a>(str[index]);</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordflow">if</span> (!<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[j]) {</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> }</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="keywordtype">bool</span> var = <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#aeac27cfd397d2dd3f2f519efffafeeab">deleteString</a>(str, index + 1);</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keywordflow">if</span> (var) {</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[j].reset();</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a4cb0f775b5a4bc14a6d39b5c93883eb6">isEndofWord</a>) {</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="keywordflow">for</span> (i = 0; i < <a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a4bfac4be6ed1a34c7159eddb42469191">NUM_CHARS</a>; i++) {</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[i]) {</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> }</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> }</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> }</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> }</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> </div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="comment">/* should not return here */</span></div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << __func__ << <span class="stringliteral">":"</span> << __LINE__</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> << <span class="stringliteral">"Should not reach this line\n"</span>;</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 134</span> {</div>
|
||||
<div class="line"><span class="lineno"> 135</span> <span class="keywordflow">if</span> (index == str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>()) {</div>
|
||||
<div class="line"><span class="lineno"> 136</span> <span class="keywordflow">if</span> (!<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a4cb0f775b5a4bc14a6d39b5c93883eb6">isEndofWord</a>) {</div>
|
||||
<div class="line"><span class="lineno"> 137</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 138</span> }</div>
|
||||
<div class="line"><span class="lineno"> 139</span> <a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a4cb0f775b5a4bc14a6d39b5c93883eb6">isEndofWord</a> = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 140</span> <span class="comment">// following lines - possible source of error?</span></div>
|
||||
<div class="line"><span class="lineno"> 141</span> <span class="comment">// for (int i = 0; i < NUM_CHARS; i++)</span></div>
|
||||
<div class="line"><span class="lineno"> 142</span> <span class="comment">// if (!arr[i])</span></div>
|
||||
<div class="line"><span class="lineno"> 143</span> <span class="comment">// return false;</span></div>
|
||||
<div class="line"><span class="lineno"> 144</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 145</span> }</div>
|
||||
<div class="line"><span class="lineno"> 146</span> <span class="keywordtype">int</span> j = <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#aab373beb3f618b90922528c68797d988">char_to_int</a>(str[index]);</div>
|
||||
<div class="line"><span class="lineno"> 147</span> <span class="keywordflow">if</span> (!<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[j]) {</div>
|
||||
<div class="line"><span class="lineno"> 148</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 149</span> }</div>
|
||||
<div class="line"><span class="lineno"> 150</span> <span class="keywordtype">bool</span> var = <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#aeac27cfd397d2dd3f2f519efffafeeab">deleteString</a>(str, index + 1);</div>
|
||||
<div class="line"><span class="lineno"> 151</span> <span class="keywordflow">if</span> (var) {</div>
|
||||
<div class="line"><span class="lineno"> 152</span> <a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[j].reset();</div>
|
||||
<div class="line"><span class="lineno"> 153</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a4cb0f775b5a4bc14a6d39b5c93883eb6">isEndofWord</a>) {</div>
|
||||
<div class="line"><span class="lineno"> 154</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 155</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 156</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><span class="lineno"> 157</span> <span class="keywordflow">for</span> (i = 0; i < <a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a4bfac4be6ed1a34c7159eddb42469191">NUM_CHARS</a>; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 158</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[i]) {</div>
|
||||
<div class="line"><span class="lineno"> 159</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 160</span> }</div>
|
||||
<div class="line"><span class="lineno"> 161</span> }</div>
|
||||
<div class="line"><span class="lineno"> 162</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 163</span> }</div>
|
||||
<div class="line"><span class="lineno"> 164</span> }</div>
|
||||
<div class="line"><span class="lineno"> 165</span> </div>
|
||||
<div class="line"><span class="lineno"> 166</span> <span class="comment">/* should not return here */</span></div>
|
||||
<div class="line"><span class="lineno"> 167</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << __func__ << <span class="stringliteral">":"</span> << __LINE__</div>
|
||||
<div class="line"><span class="lineno"> 168</span> << <span class="stringliteral">"Should not reach this line\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 169</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 170</span> }</div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie_html_a362dd78748a1f01ab019e55fd6098a8b"><div class="ttname"><a href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">data_structures::trie::arr</a></div><div class="ttdeci">std::array< std::shared_ptr< trie >, NUM_CHARS<< 1 > arr</div><div class="ttdoc">Recursive tree nodes as an array of shared-pointers.</div><div class="ttdef"><b>Definition:</b> trie_tree.cpp:29</div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie_html_a4cb0f775b5a4bc14a6d39b5c93883eb6"><div class="ttname"><a href="../../d0/d3e/classdata__structures_1_1trie.html#a4cb0f775b5a4bc14a6d39b5c93883eb6">data_structures::trie::isEndofWord</a></div><div class="ttdeci">bool isEndofWord</div><div class="ttdoc">identifier if a node is terminal node</div><div class="ttdef"><b>Definition:</b> trie_tree.cpp:30</div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie_html_aab373beb3f618b90922528c68797d988"><div class="ttname"><a href="../../d0/d3e/classdata__structures_1_1trie.html#aab373beb3f618b90922528c68797d988">data_structures::trie::char_to_int</a></div><div class="ttdeci">uint8_t char_to_int(const char &ch) const</div><div class="ttdoc">Convert a character to integer for indexing.</div><div class="ttdef"><b>Definition:</b> trie_tree.cpp:38</div></div>
|
||||
@@ -325,29 +325,29 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> {</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<trie></a> root(<span class="keyword">nullptr</span>);</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">char</span>& ch : str) {</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordtype">int</span> j = <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#aab373beb3f618b90922528c68797d988">char_to_int</a>(ch);</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordflow">if</span> (root) {</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">if</span> (root->arr[j]) {</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> root = root->arr[j];</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<trie></a> temp(<span class="keyword">new</span> <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#a87d8bf99aea936f9381141753f1e90a8">trie</a>());</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> root->arr[j] = temp;</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> root = temp;</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> }</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[j]) {</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> root = <a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[j];</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<trie></a> temp(<span class="keyword">new</span> <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#a87d8bf99aea936f9381141753f1e90a8">trie</a>());</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[j] = temp;</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> root = temp;</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> }</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> }</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> root->isEndofWord = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 77</span> {</div>
|
||||
<div class="line"><span class="lineno"> 78</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<trie></a> root(<span class="keyword">nullptr</span>);</div>
|
||||
<div class="line"><span class="lineno"> 79</span> </div>
|
||||
<div class="line"><span class="lineno"> 80</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">char</span>& ch : str) {</div>
|
||||
<div class="line"><span class="lineno"> 81</span> <span class="keywordtype">int</span> j = <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#aab373beb3f618b90922528c68797d988">char_to_int</a>(ch);</div>
|
||||
<div class="line"><span class="lineno"> 82</span> <span class="keywordflow">if</span> (root) {</div>
|
||||
<div class="line"><span class="lineno"> 83</span> <span class="keywordflow">if</span> (root->arr[j]) {</div>
|
||||
<div class="line"><span class="lineno"> 84</span> root = root->arr[j];</div>
|
||||
<div class="line"><span class="lineno"> 85</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 86</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<trie></a> temp(<span class="keyword">new</span> <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#a87d8bf99aea936f9381141753f1e90a8">trie</a>());</div>
|
||||
<div class="line"><span class="lineno"> 87</span> root->arr[j] = temp;</div>
|
||||
<div class="line"><span class="lineno"> 88</span> root = temp;</div>
|
||||
<div class="line"><span class="lineno"> 89</span> }</div>
|
||||
<div class="line"><span class="lineno"> 90</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[j]) {</div>
|
||||
<div class="line"><span class="lineno"> 91</span> root = <a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[j];</div>
|
||||
<div class="line"><span class="lineno"> 92</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 93</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr<trie></a> temp(<span class="keyword">new</span> <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#a87d8bf99aea936f9381141753f1e90a8">trie</a>());</div>
|
||||
<div class="line"><span class="lineno"> 94</span> <a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[j] = temp;</div>
|
||||
<div class="line"><span class="lineno"> 95</span> root = temp;</div>
|
||||
<div class="line"><span class="lineno"> 96</span> }</div>
|
||||
<div class="line"><span class="lineno"> 97</span> }</div>
|
||||
<div class="line"><span class="lineno"> 98</span> root->isEndofWord = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 99</span> }</div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie_html_a87d8bf99aea936f9381141753f1e90a8"><div class="ttname"><a href="../../d0/d3e/classdata__structures_1_1trie.html#a87d8bf99aea936f9381141753f1e90a8">data_structures::trie::trie</a></div><div class="ttdeci">trie()=default</div><div class="ttdoc">Class default constructor.</div></div>
|
||||
<div class="ttc" id="ashared_ptr_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/memory/shared_ptr.html">std::shared_ptr</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
@@ -402,19 +402,19 @@ Here is the call graph for this function:</div>
|
||||
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if found </dd>
|
||||
<dd>
|
||||
<code>false</code> if not found </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> {</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordflow">if</span> (index == str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>()) {</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">if</span> (!root->isEndofWord) {</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> }</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> }</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordtype">int</span> j = <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#aab373beb3f618b90922528c68797d988">char_to_int</a>(str[index]);</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordflow">if</span> (!root->arr[j]) {</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> }</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#a961eb5d576d2420f2036009154397c63">search</a>(root->arr[j], str, index + 1);</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 57</span> {</div>
|
||||
<div class="line"><span class="lineno"> 58</span> <span class="keywordflow">if</span> (index == str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>()) {</div>
|
||||
<div class="line"><span class="lineno"> 59</span> <span class="keywordflow">if</span> (!root->isEndofWord) {</div>
|
||||
<div class="line"><span class="lineno"> 60</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 61</span> }</div>
|
||||
<div class="line"><span class="lineno"> 62</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 63</span> }</div>
|
||||
<div class="line"><span class="lineno"> 64</span> <span class="keywordtype">int</span> j = <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#aab373beb3f618b90922528c68797d988">char_to_int</a>(str[index]);</div>
|
||||
<div class="line"><span class="lineno"> 65</span> <span class="keywordflow">if</span> (!root->arr[j]) {</div>
|
||||
<div class="line"><span class="lineno"> 66</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 67</span> }</div>
|
||||
<div class="line"><span class="lineno"> 68</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#a961eb5d576d2420f2036009154397c63">search</a>(root->arr[j], str, index + 1);</div>
|
||||
<div class="line"><span class="lineno"> 69</span> }</div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1trie_html_a961eb5d576d2420f2036009154397c63"><div class="ttname"><a href="../../d0/d3e/classdata__structures_1_1trie.html#a961eb5d576d2420f2036009154397c63">data_structures::trie::search</a></div><div class="ttdeci">bool search(const std::shared_ptr< trie > &root, const std::string &str, int index)</div><div class="ttdef"><b>Definition:</b> trie_tree.cpp:56</div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
@@ -462,19 +462,19 @@ Here is the call graph for this function:</div>
|
||||
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if found </dd>
|
||||
<dd>
|
||||
<code>false</code> if not found </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> {</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">if</span> (index == str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>()) {</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordflow">if</span> (!<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a4cb0f775b5a4bc14a6d39b5c93883eb6">isEndofWord</a>) {</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> }</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> }</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordtype">int</span> j = <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#aab373beb3f618b90922528c68797d988">char_to_int</a>(str[index]);</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keywordflow">if</span> (!<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[j]) {</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> }</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#a961eb5d576d2420f2036009154397c63">search</a>(<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[j], str, index + 1);</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 107</span> {</div>
|
||||
<div class="line"><span class="lineno"> 108</span> <span class="keywordflow">if</span> (index == str.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">length</a>()) {</div>
|
||||
<div class="line"><span class="lineno"> 109</span> <span class="keywordflow">if</span> (!<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a4cb0f775b5a4bc14a6d39b5c93883eb6">isEndofWord</a>) {</div>
|
||||
<div class="line"><span class="lineno"> 110</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 111</span> }</div>
|
||||
<div class="line"><span class="lineno"> 112</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 113</span> }</div>
|
||||
<div class="line"><span class="lineno"> 114</span> <span class="keywordtype">int</span> j = <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#aab373beb3f618b90922528c68797d988">char_to_int</a>(str[index]);</div>
|
||||
<div class="line"><span class="lineno"> 115</span> <span class="keywordflow">if</span> (!<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[j]) {</div>
|
||||
<div class="line"><span class="lineno"> 116</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 117</span> }</div>
|
||||
<div class="line"><span class="lineno"> 118</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../d0/d3e/classdata__structures_1_1trie.html#a961eb5d576d2420f2036009154397c63">search</a>(<a class="code hl_variable" href="../../d0/d3e/classdata__structures_1_1trie.html#a362dd78748a1f01ab019e55fd6098a8b">arr</a>[j], str, index + 1);</div>
|
||||
<div class="line"><span class="lineno"> 119</span> }</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -493,7 +493,7 @@ Here is the call graph for this function:</div>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../d5/d3c/namespacedata__structures.html">data_structures</a></li><li class="navelem"><a class="el" href="../../d0/d3e/classdata__structures_1_1trie.html">trie</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<map id="data_structures::trie::search" name="data_structures::trie::search">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,64,144,105"/>
|
||||
<area shape="rect" id="node2" href="$d0/d3e/classdata__structures_1_1trie.html#aab373beb3f618b90922528c68797d988" title="Convert a character to integer for indexing." alt="" coords="192,5,331,47"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size.html#" title=" " alt="" coords="200,71,323,98"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size#" title=" " alt="" coords="200,71,323,98"/>
|
||||
<area shape="rect" id="node5" href="$d0/d3e/classdata__structures_1_1trie.html#a961eb5d576d2420f2036009154397c63" title=" " alt="" coords="192,123,331,164"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/program/exit.html#" title=" " alt="" coords="379,13,448,39"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/program/exit#" title=" " alt="" coords="379,13,448,39"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
c3907ea850c83be9392ebdd9bbe1a748
|
||||
139784c0e64637053b9fcf70aaea15b1
|
||||
@@ -38,7 +38,7 @@
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="146,-50 146,-69 238,-69 238,-50 146,-50"/>
|
||||
<text text-anchor="middle" x="192" y="-57" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::length</text>
|
||||
</a>
|
||||
@@ -69,7 +69,7 @@
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/program/exit.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/program/exit#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="280,-94 280,-113 332,-113 332,-94 280,-94"/>
|
||||
<text text-anchor="middle" x="306" y="-101" font-family="Helvetica,sans-Serif" font-size="10.00">std::exit</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@@ -1,4 +1,4 @@
|
||||
<map id="data_structures::trie::char_to_int" name="data_structures::trie::char_to_int">
|
||||
<area shape="rect" id="node1" title="Convert a character to integer for indexing." alt="" coords="5,5,144,47"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/program/exit.html#" title=" " alt="" coords="192,13,261,39"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/program/exit#" title=" " alt="" coords="192,13,261,39"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
aa1699468622a9d6f1b63f2ae18e589e
|
||||
47e0d099b113311b2141acea91dd484b
|
||||
@@ -22,7 +22,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/program/exit.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/program/exit#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="140,-6 140,-25 192,-25 192,-6 140,-6"/>
|
||||
<text text-anchor="middle" x="166" y="-13" font-family="Helvetica,sans-Serif" font-size="10.00">std::exit</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -1,6 +1,6 @@
|
||||
<map id="data_structures::trie::deleteString" name="data_structures::trie::deleteString">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,35,144,76"/>
|
||||
<area shape="rect" id="node2" href="$d0/d3e/classdata__structures_1_1trie.html#aab373beb3f618b90922528c68797d988" title="Convert a character to integer for indexing." alt="" coords="192,5,331,47"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size.html#" title=" " alt="" coords="200,71,323,98"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/program/exit.html#" title=" " alt="" coords="379,13,448,39"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size#" title=" " alt="" coords="200,71,323,98"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/program/exit#" title=" " alt="" coords="379,13,448,39"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8aae321f05ae2d913badcc57904f4eea
|
||||
7e09dc1dc31f7524d5d6854294d765a8
|
||||
@@ -44,7 +44,7 @@
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="146,-0.5 146,-19.5 238,-19.5 238,-0.5 146,-0.5"/>
|
||||
<text text-anchor="middle" x="192" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::length</text>
|
||||
</a>
|
||||
@@ -59,7 +59,7 @@
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/program/exit.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/program/exit#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="280,-44.5 280,-63.5 332,-63.5 332,-44.5 280,-44.5"/>
|
||||
<text text-anchor="middle" x="306" y="-51.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::exit</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: math/finding_number_of_digits_in_a_number.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -151,21 +151,21 @@ the number of digits in a number.md" target="_blank">Algorithms-Explanation</a>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>the digits count </dd></dl>
|
||||
<p >< the variable used for the digits count</p>
|
||||
<div class="fragment"><div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> {</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> uint64_t count = 0; <span class="comment">///< the variable used for the digits count</span></div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="comment">// iterate until `n` becomes 0</span></div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="comment">// remove last digit from `n` in each iteration</span></div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="comment">// increase `count` by 1 in each iteration</span></div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">while</span> (n != 0) {</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="comment">// we can also use `n = n / 10`</span></div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> n /= 10;</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="comment">// each time the loop is running, `count` will be incremented by 1.</span></div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> ++count;</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> }</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">return</span> count;</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 27</span> {</div>
|
||||
<div class="line"><span class="lineno"> 28</span> uint64_t count = 0; <span class="comment">///< the variable used for the digits count</span></div>
|
||||
<div class="line"><span class="lineno"> 29</span> </div>
|
||||
<div class="line"><span class="lineno"> 30</span> <span class="comment">// iterate until `n` becomes 0</span></div>
|
||||
<div class="line"><span class="lineno"> 31</span> <span class="comment">// remove last digit from `n` in each iteration</span></div>
|
||||
<div class="line"><span class="lineno"> 32</span> <span class="comment">// increase `count` by 1 in each iteration</span></div>
|
||||
<div class="line"><span class="lineno"> 33</span> <span class="keywordflow">while</span> (n != 0) {</div>
|
||||
<div class="line"><span class="lineno"> 34</span> <span class="comment">// we can also use `n = n / 10`</span></div>
|
||||
<div class="line"><span class="lineno"> 35</span> n /= 10;</div>
|
||||
<div class="line"><span class="lineno"> 36</span> <span class="comment">// each time the loop is running, `count` will be incremented by 1.</span></div>
|
||||
<div class="line"><span class="lineno"> 37</span> ++count;</div>
|
||||
<div class="line"><span class="lineno"> 38</span> }</div>
|
||||
<div class="line"><span class="lineno"> 39</span> </div>
|
||||
<div class="line"><span class="lineno"> 40</span> <span class="keywordflow">return</span> count;</div>
|
||||
<div class="line"><span class="lineno"> 41</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -187,10 +187,10 @@ the number of digits in a number.md" target="_blank">Algorithms-Explanation</a>
|
||||
|
||||
<p>Main function. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> {</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 63</span> {</div>
|
||||
<div class="line"><span class="lineno"> 64</span> <a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
|
||||
<div class="line"><span class="lineno"> 65</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 66</span>}</div>
|
||||
<div class="ttc" id="afinding__number__of__digits__in__a__number_8cpp_html_aa8dca7b867074164d5f45b0f3851269d"><div class="ttname"><a href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a></div><div class="ttdeci">static void test()</div><div class="ttdoc">Self-test implementations.</div><div class="ttdef"><b>Definition:</b> finding_number_of_digits_in_a_number.cpp:47</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -226,17 +226,17 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<p>Self-test implementations. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> {</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> assert(<a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#a8a3b522a675ab4cdec2d275f6f7798a1">finding_number_of_digits_in_a_number</a>(5492) == 4);</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> assert(<a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#a8a3b522a675ab4cdec2d275f6f7798a1">finding_number_of_digits_in_a_number</a>(-0) == 0);</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> assert(<a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#a8a3b522a675ab4cdec2d275f6f7798a1">finding_number_of_digits_in_a_number</a>(10000) == 5);</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> assert(<a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#a8a3b522a675ab4cdec2d275f6f7798a1">finding_number_of_digits_in_a_number</a>(9) == 1);</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> assert(<a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#a8a3b522a675ab4cdec2d275f6f7798a1">finding_number_of_digits_in_a_number</a>(100000) == 6);</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> assert(<a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#a8a3b522a675ab4cdec2d275f6f7798a1">finding_number_of_digits_in_a_number</a>(13) == 2);</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> assert(<a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#a8a3b522a675ab4cdec2d275f6f7798a1">finding_number_of_digits_in_a_number</a>(564) == 3);</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> </div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"All tests have successfully passed!\n"</span>;</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 47</span> {</div>
|
||||
<div class="line"><span class="lineno"> 48</span> assert(<a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#a8a3b522a675ab4cdec2d275f6f7798a1">finding_number_of_digits_in_a_number</a>(5492) == 4);</div>
|
||||
<div class="line"><span class="lineno"> 49</span> assert(<a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#a8a3b522a675ab4cdec2d275f6f7798a1">finding_number_of_digits_in_a_number</a>(-0) == 0);</div>
|
||||
<div class="line"><span class="lineno"> 50</span> assert(<a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#a8a3b522a675ab4cdec2d275f6f7798a1">finding_number_of_digits_in_a_number</a>(10000) == 5);</div>
|
||||
<div class="line"><span class="lineno"> 51</span> assert(<a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#a8a3b522a675ab4cdec2d275f6f7798a1">finding_number_of_digits_in_a_number</a>(9) == 1);</div>
|
||||
<div class="line"><span class="lineno"> 52</span> assert(<a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#a8a3b522a675ab4cdec2d275f6f7798a1">finding_number_of_digits_in_a_number</a>(100000) == 6);</div>
|
||||
<div class="line"><span class="lineno"> 53</span> assert(<a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#a8a3b522a675ab4cdec2d275f6f7798a1">finding_number_of_digits_in_a_number</a>(13) == 2);</div>
|
||||
<div class="line"><span class="lineno"> 54</span> assert(<a class="code hl_function" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#a8a3b522a675ab4cdec2d275f6f7798a1">finding_number_of_digits_in_a_number</a>(564) == 3);</div>
|
||||
<div class="line"><span class="lineno"> 55</span> </div>
|
||||
<div class="line"><span class="lineno"> 56</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"All tests have successfully passed!\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 57</span>}</div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="afinding__number__of__digits__in__a__number_8cpp_html_a8a3b522a675ab4cdec2d275f6f7798a1"><div class="ttname"><a href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html#a8a3b522a675ab4cdec2d275f6f7798a1">finding_number_of_digits_in_a_number</a></div><div class="ttdeci">uint64_t finding_number_of_digits_in_a_number(uint64_t n)</div><div class="ttdoc">for IO operations</div><div class="ttdef"><b>Definition:</b> finding_number_of_digits_in_a_number.cpp:27</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
@@ -254,7 +254,7 @@ Here is the call graph for this function:</div>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_296d53ceaeaa7e099814a6def439fe8a.html">math</a></li><li class="navelem"><a class="el" href="../../d0/d46/finding__number__of__digits__in__a__number_8cpp.html">finding_number_of_digits_in_a_number.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: wiggle_sort Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -104,7 +104,7 @@ $(document).ready(function(){initNavTree('d0/d52/namespacewiggle__sort.html','..
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../d0/d52/namespacewiggle__sort.html">wiggle_sort</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: Member List</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -112,7 +112,7 @@ $(document).ready(function(){initNavTree('d5/d15/classcll.html','../../'); initR
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: graph::RootedTree Class Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -107,7 +107,7 @@ Inheritance diagram for graph::RootedTree:</div>
|
||||
<div class="dynheader">
|
||||
Collaboration diagram for graph::RootedTree:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d0/d24/classgraph_1_1_rooted_tree__coll__graph.svg" width="142" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d0/d24/classgraph_1_1_rooted_tree__coll__graph.svg" width="398" height="322"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
|
||||
<table class="memberdecls">
|
||||
@@ -198,9 +198,9 @@ Protected Member Functions</h2></td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> : <a class="code hl_class" href="../../da/d9a/class_graph.html">Graph</a>(undirected_edges.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() + 1, undirected_edges), <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#ab22a97bf6209a085fc2d788c3c0dacbe">root</a>(root_) {</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <a class="code hl_function" href="../../d0/d58/classgraph_1_1_rooted_tree.html#ae6928f3ebd491541e9570e746b877c1e">populate_parents</a>();</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 95</span> : <a class="code hl_class" href="../../da/d9a/class_graph.html">Graph</a>(undirected_edges.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector/size.html">size</a>() + 1, undirected_edges), <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#ab22a97bf6209a085fc2d788c3c0dacbe">root</a>(root_) {</div>
|
||||
<div class="line"><span class="lineno"> 96</span> <a class="code hl_function" href="../../d0/d58/classgraph_1_1_rooted_tree.html#ae6928f3ebd491541e9570e746b877c1e">populate_parents</a>();</div>
|
||||
<div class="line"><span class="lineno"> 97</span> }</div>
|
||||
<div class="ttc" id="aclass_graph_html"><div class="ttname"><a href="../../da/d9a/class_graph.html">Graph</a></div><div class="ttdef"><b>Definition:</b> bellman_ford.cpp:13</div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_rooted_tree_html_ab22a97bf6209a085fc2d788c3c0dacbe"><div class="ttname"><a href="../../d0/d58/classgraph_1_1_rooted_tree.html#ab22a97bf6209a085fc2d788c3c0dacbe">graph::RootedTree::root</a></div><div class="ttdeci">int root</div><div class="ttdoc">Index of the root vertex.</div><div class="ttdef"><b>Definition:</b> lowest_common_ancestor.cpp:108</div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_rooted_tree_html_ae6928f3ebd491541e9570e746b877c1e"><div class="ttname"><a href="../../d0/d58/classgraph_1_1_rooted_tree.html#ae6928f3ebd491541e9570e746b877c1e">graph::RootedTree::populate_parents</a></div><div class="ttdeci">void populate_parents()</div><div class="ttdoc">Calculate the parents for all the vertices in the tree. Implements the breadth first search algorithm...</div><div class="ttdef"><b>Definition:</b> lowest_common_ancestor.cpp:117</div></div>
|
||||
@@ -234,28 +234,28 @@ Protected Member Functions</h2></td></tr>
|
||||
|
||||
<p>Calculate the parents for all the vertices in the tree. Implements the breadth first search algorithm starting from the root vertex searching the entire tree and labeling parents for all vertices. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>none </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> {</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="comment">// Initialize the vector with -1 which indicates the vertex</span></div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="comment">// wasn't yet visited.</span></div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a3831583a91914988897a4cc8748fda43">parent</a> = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a>(<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a8930d1470d132b19e430d1c71f94c904">number_of_vertices</a>(), -1);</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a2ee3ad1161ac2532da30c3e22c265ad3">level</a> = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a>(<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a8930d1470d132b19e430d1c71f94c904">number_of_vertices</a>());</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a3831583a91914988897a4cc8748fda43">parent</a>[<a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#ab22a97bf6209a085fc2d788c3c0dacbe">root</a>] = <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#ab22a97bf6209a085fc2d788c3c0dacbe">root</a>;</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a2ee3ad1161ac2532da30c3e22c265ad3">level</a>[<a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#ab22a97bf6209a085fc2d788c3c0dacbe">root</a>] = 0;</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue<int></a> queue_of_vertices;</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> queue_of_vertices.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/push.html">push</a>(<a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#ab22a97bf6209a085fc2d788c3c0dacbe">root</a>);</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordflow">while</span> (!queue_of_vertices.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/empty.html">empty</a>()) {</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordtype">int</span> vertex = queue_of_vertices.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/front.html">front</a>();</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> queue_of_vertices.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/pop.html">pop</a>();</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> neighbor : <a class="code hl_variable" href="../../dc/d61/classgraph_1_1_graph.html#a59940c462861f2fcf4951d1b6c084e6a">neighbors</a>[vertex]) {</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="comment">// As long as the vertex was not yet visited.</span></div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a3831583a91914988897a4cc8748fda43">parent</a>[neighbor] == -1) {</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a3831583a91914988897a4cc8748fda43">parent</a>[neighbor] = vertex;</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a2ee3ad1161ac2532da30c3e22c265ad3">level</a>[neighbor] = <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a2ee3ad1161ac2532da30c3e22c265ad3">level</a>[vertex] + 1;</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> queue_of_vertices.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/push.html">push</a>(neighbor);</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> }</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> }</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> }</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 117</span> {</div>
|
||||
<div class="line"><span class="lineno"> 118</span> <span class="comment">// Initialize the vector with -1 which indicates the vertex</span></div>
|
||||
<div class="line"><span class="lineno"> 119</span> <span class="comment">// wasn't yet visited.</span></div>
|
||||
<div class="line"><span class="lineno"> 120</span> <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a3831583a91914988897a4cc8748fda43">parent</a> = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a>(<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a8930d1470d132b19e430d1c71f94c904">number_of_vertices</a>(), -1);</div>
|
||||
<div class="line"><span class="lineno"> 121</span> <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a2ee3ad1161ac2532da30c3e22c265ad3">level</a> = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<int></a>(<a class="code hl_function" href="../../dc/d61/classgraph_1_1_graph.html#a8930d1470d132b19e430d1c71f94c904">number_of_vertices</a>());</div>
|
||||
<div class="line"><span class="lineno"> 122</span> <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a3831583a91914988897a4cc8748fda43">parent</a>[<a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#ab22a97bf6209a085fc2d788c3c0dacbe">root</a>] = <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#ab22a97bf6209a085fc2d788c3c0dacbe">root</a>;</div>
|
||||
<div class="line"><span class="lineno"> 123</span> <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a2ee3ad1161ac2532da30c3e22c265ad3">level</a>[<a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#ab22a97bf6209a085fc2d788c3c0dacbe">root</a>] = 0;</div>
|
||||
<div class="line"><span class="lineno"> 124</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue<int></a> queue_of_vertices;</div>
|
||||
<div class="line"><span class="lineno"> 125</span> queue_of_vertices.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/push.html">push</a>(<a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#ab22a97bf6209a085fc2d788c3c0dacbe">root</a>);</div>
|
||||
<div class="line"><span class="lineno"> 126</span> <span class="keywordflow">while</span> (!queue_of_vertices.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/empty.html">empty</a>()) {</div>
|
||||
<div class="line"><span class="lineno"> 127</span> <span class="keywordtype">int</span> vertex = queue_of_vertices.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/front.html">front</a>();</div>
|
||||
<div class="line"><span class="lineno"> 128</span> queue_of_vertices.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/pop.html">pop</a>();</div>
|
||||
<div class="line"><span class="lineno"> 129</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> neighbor : <a class="code hl_variable" href="../../dc/d61/classgraph_1_1_graph.html#a59940c462861f2fcf4951d1b6c084e6a">neighbors</a>[vertex]) {</div>
|
||||
<div class="line"><span class="lineno"> 130</span> <span class="comment">// As long as the vertex was not yet visited.</span></div>
|
||||
<div class="line"><span class="lineno"> 131</span> <span class="keywordflow">if</span> (<a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a3831583a91914988897a4cc8748fda43">parent</a>[neighbor] == -1) {</div>
|
||||
<div class="line"><span class="lineno"> 132</span> <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a3831583a91914988897a4cc8748fda43">parent</a>[neighbor] = vertex;</div>
|
||||
<div class="line"><span class="lineno"> 133</span> <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a2ee3ad1161ac2532da30c3e22c265ad3">level</a>[neighbor] = <a class="code hl_variable" href="../../d0/d58/classgraph_1_1_rooted_tree.html#a2ee3ad1161ac2532da30c3e22c265ad3">level</a>[vertex] + 1;</div>
|
||||
<div class="line"><span class="lineno"> 134</span> queue_of_vertices.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/queue/push.html">push</a>(neighbor);</div>
|
||||
<div class="line"><span class="lineno"> 135</span> }</div>
|
||||
<div class="line"><span class="lineno"> 136</span> }</div>
|
||||
<div class="line"><span class="lineno"> 137</span> }</div>
|
||||
<div class="line"><span class="lineno"> 138</span> }</div>
|
||||
<div class="ttc" id="aclassgraph_1_1_graph_html_a59940c462861f2fcf4951d1b6c084e6a"><div class="ttname"><a href="../../dc/d61/classgraph_1_1_graph.html#a59940c462861f2fcf4951d1b6c084e6a">graph::Graph::neighbors</a></div><div class="ttdeci">std::vector< std::vector< int > > neighbors</div><div class="ttdoc">for each vertex it stores a list indicies of its neighbors</div><div class="ttdef"><b>Definition:</b> lowest_common_ancestor.cpp:77</div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_graph_html_a8930d1470d132b19e430d1c71f94c904"><div class="ttname"><a href="../../dc/d61/classgraph_1_1_graph.html#a8930d1470d132b19e430d1c71f94c904">graph::Graph::number_of_vertices</a></div><div class="ttdeci">int number_of_vertices() const</div><div class="ttdef"><b>Definition:</b> lowest_common_ancestor.cpp:74</div></div>
|
||||
<div class="ttc" id="aclassgraph_1_1_rooted_tree_html_a2ee3ad1161ac2532da30c3e22c265ad3"><div class="ttname"><a href="../../d0/d58/classgraph_1_1_rooted_tree.html#a2ee3ad1161ac2532da30c3e22c265ad3">graph::RootedTree::level</a></div><div class="ttdeci">std::vector< int > level</div><div class="ttdoc">Stores the distance from the root.</div><div class="ttdef"><b>Definition:</b> lowest_common_ancestor.cpp:106</div></div>
|
||||
@@ -265,11 +265,11 @@ Protected Member Functions</h2></td></tr>
|
||||
<div class="ttc" id="apop_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue/pop.html">std::queue::pop</a></div><div class="ttdeci">T pop(T... args)</div></div>
|
||||
<div class="ttc" id="apush_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue/push.html">std::queue::push</a></div><div class="ttdeci">T push(T... args)</div></div>
|
||||
<div class="ttc" id="aqueue_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/queue.html">std::queue</a></div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div></div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector< int ></a></div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d0/d58/classgraph_1_1_rooted_tree_ae6928f3ebd491541e9570e746b877c1e_cgraph.svg" width="346" height="256"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d0/d58/classgraph_1_1_rooted_tree_ae6928f3ebd491541e9570e746b877c1e_cgraph.svg" width="510" height="256"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -284,7 +284,7 @@ Here is the call graph for this function:</div>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../df/dce/namespacegraph.html">graph</a></li><li class="navelem"><a class="el" href="../../d0/d58/classgraph_1_1_rooted_tree.html">RootedTree</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<map id="graph::RootedTree::populate_parents" name="graph::RootedTree::populate_parents">
|
||||
<area shape="rect" id="node1" title="Calculate the parents for all the vertices in the tree. Implements the breadth first search algorithm..." alt="" coords="5,107,144,149"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/empty.html#" title=" " alt="" coords="203,5,329,32"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/front.html#" title=" " alt="" coords="207,56,325,83"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/empty#" title=" " alt="" coords="203,5,329,32"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/front#" title=" " alt="" coords="207,56,325,83"/>
|
||||
<area shape="rect" id="node4" href="$dc/d61/classgraph_1_1_graph.html#a8930d1470d132b19e430d1c71f94c904" title=" " alt="" coords="192,107,340,149"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/pop.html#" title=" " alt="" coords="210,173,322,200"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/push.html#" title=" " alt="" coords="207,224,325,251"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/pop#" title=" " alt="" coords="210,173,322,200"/>
|
||||
<area shape="rect" id="node7" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/queue/push#" title=" " alt="" coords="207,224,325,251"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/container/vector/size#" title=" " alt="" coords="388,115,504,141"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
5140188bde807e8ce6c880ee55e7f442
|
||||
80a1dfdbbc308c105dae66fac7fda5bc
|
||||
@@ -4,11 +4,11 @@
|
||||
<!-- Generated by graphviz version 2.50.0 (20211204.2007)
|
||||
-->
|
||||
<!-- Title: graph::RootedTree::populate_parents Pages: 1 -->
|
||||
<svg width="259pt" height="192pt"
|
||||
viewBox="0.00 0.00 259.00 192.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="382pt" height="192pt"
|
||||
viewBox="0.00 0.00 382.00 192.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 188)">
|
||||
<title>graph::RootedTree::populate_parents</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-188 255,-188 255,4 -4,4"/>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-188 378,-188 378,4 -4,4"/>
|
||||
<!-- Node1 -->
|
||||
<g id="node1" class="node">
|
||||
<title>Node1</title>
|
||||
@@ -22,7 +22,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/empty.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/empty#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="148,-164.5 148,-183.5 243,-183.5 243,-164.5 148,-164.5"/>
|
||||
<text text-anchor="middle" x="195.5" y="-171.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::empty</text>
|
||||
</a>
|
||||
@@ -37,7 +37,7 @@
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/front.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/front#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="151.5,-126.5 151.5,-145.5 239.5,-145.5 239.5,-126.5 151.5,-126.5"/>
|
||||
<text text-anchor="middle" x="195.5" y="-133.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::front</text>
|
||||
</a>
|
||||
@@ -65,35 +65,50 @@
|
||||
<path fill="none" stroke="midnightblue" d="M104.08,-92C112.3,-92 120.9,-92 129.39,-92"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="129.67,-95.5 139.67,-92 129.67,-88.5 129.67,-95.5"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/pop.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="153.5,-38.5 153.5,-57.5 237.5,-57.5 237.5,-38.5 153.5,-38.5"/>
|
||||
<text text-anchor="middle" x="195.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::pop</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node1->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M101.3,-76.98C118.41,-71.66 137.46,-65.74 153.87,-60.63"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="155.19,-63.89 163.7,-57.58 153.11,-57.21 155.19,-63.89"/>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/push.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="151,-0.5 151,-19.5 240,-19.5 240,-0.5 151,-0.5"/>
|
||||
<text text-anchor="middle" x="195.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::push</text>
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/pop#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="153.5,-38.5 153.5,-57.5 237.5,-57.5 237.5,-38.5 153.5,-38.5"/>
|
||||
<text text-anchor="middle" x="195.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::pop</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node6 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>Node1->Node6</title>
|
||||
<path fill="none" stroke="midnightblue" d="M101.3,-76.98C118.41,-71.66 137.46,-65.74 153.87,-60.63"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="155.19,-63.89 163.7,-57.58 153.11,-57.21 155.19,-63.89"/>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="node7" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_node7"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/queue/push#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="151,-0.5 151,-19.5 240,-19.5 240,-0.5 151,-0.5"/>
|
||||
<text text-anchor="middle" x="195.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::queue::push</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node7 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>Node1->Node7</title>
|
||||
<path fill="none" stroke="midnightblue" d="M70.65,-76.83C87.55,-62.91 114.21,-42.46 140,-29 144.01,-26.91 148.29,-24.97 152.63,-23.18"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="154.06,-26.38 162.14,-19.54 151.55,-19.85 154.06,-26.38"/>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/container/vector/size#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="287,-82.5 287,-101.5 374,-101.5 374,-82.5 287,-82.5"/>
|
||||
<text text-anchor="middle" x="330.5" y="-89.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::vector::size</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<path fill="none" stroke="midnightblue" d="M251.36,-92C259.81,-92 268.51,-92 276.91,-92"/>
|
||||
<polygon fill="midnightblue" stroke="midnightblue" points="276.95,-95.5 286.95,-92 276.95,-88.5 276.95,-95.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.7 KiB |
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: data_structures/skip_list.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -166,20 +166,20 @@ constexpr float </td><td class="memItemRight" valign="bottom"><b>data_struc
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Main function: Creates and inserts random 2^[number of levels] elements into the skip lists and than displays it </p>
|
||||
<div class="fragment"><div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> {</div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a>(<span class="keyword">nullptr</span>));</div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> </div>
|
||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> <a class="code hl_class" href="../../d4/d90/classdata__structures_1_1_skip_list.html">data_structures::SkipList</a> lst;</div>
|
||||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> </div>
|
||||
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j < (1 << (<a class="code hl_variable" href="../../d5/d3c/namespacedata__structures.html#ac0d7e0be24da9f41bcb19745873c436a">data_structures::MAX_LEVEL</a> + 1)); j++) {</div>
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> <span class="keywordtype">int</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a> = (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % (1 << (<a class="code hl_variable" href="../../d5/d3c/namespacedata__structures.html#ac0d7e0be24da9f41bcb19745873c436a">data_structures::MAX_LEVEL</a> + 2)) + 1);</div>
|
||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> lst.<a class="code hl_function" href="../../d4/d90/classdata__structures_1_1_skip_list.html#a40a4042bdf0b6683b5f21ae7854de8a9">insertElement</a>(k, &j);</div>
|
||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> }</div>
|
||||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> </div>
|
||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> lst.<a class="code hl_function" href="../../d4/d90/classdata__structures_1_1_skip_list.html#a812611f80b8079268dbb19cc4e9bee5c">displayList</a>();</div>
|
||||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> </div>
|
||||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 212</span> {</div>
|
||||
<div class="line"><span class="lineno"> 213</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/srand.html">std::srand</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/time.html">std::time</a>(<span class="keyword">nullptr</span>));</div>
|
||||
<div class="line"><span class="lineno"> 214</span> </div>
|
||||
<div class="line"><span class="lineno"> 215</span> <a class="code hl_class" href="../../d4/d90/classdata__structures_1_1_skip_list.html">data_structures::SkipList</a> lst;</div>
|
||||
<div class="line"><span class="lineno"> 216</span> </div>
|
||||
<div class="line"><span class="lineno"> 217</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j < (1 << (<a class="code hl_variable" href="../../d5/d3c/namespacedata__structures.html#ac0d7e0be24da9f41bcb19745873c436a">data_structures::MAX_LEVEL</a> + 1)); j++) {</div>
|
||||
<div class="line"><span class="lineno"> 218</span> <span class="keywordtype">int</span> <a class="code hl_function" href="../../d4/d18/composite__simpson__rule_8cpp.html#a1b74d828b33760094906797042b89442">k</a> = (<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/random/rand.html">std::rand</a>() % (1 << (<a class="code hl_variable" href="../../d5/d3c/namespacedata__structures.html#ac0d7e0be24da9f41bcb19745873c436a">data_structures::MAX_LEVEL</a> + 2)) + 1);</div>
|
||||
<div class="line"><span class="lineno"> 219</span> lst.<a class="code hl_function" href="../../d4/d90/classdata__structures_1_1_skip_list.html#a40a4042bdf0b6683b5f21ae7854de8a9">insertElement</a>(k, &j);</div>
|
||||
<div class="line"><span class="lineno"> 220</span> }</div>
|
||||
<div class="line"><span class="lineno"> 221</span> </div>
|
||||
<div class="line"><span class="lineno"> 222</span> lst.<a class="code hl_function" href="../../d4/d90/classdata__structures_1_1_skip_list.html#a812611f80b8079268dbb19cc4e9bee5c">displayList</a>();</div>
|
||||
<div class="line"><span class="lineno"> 223</span> </div>
|
||||
<div class="line"><span class="lineno"> 224</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 225</span>}</div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1_skip_list_html"><div class="ttname"><a href="../../d4/d90/classdata__structures_1_1_skip_list.html">data_structures::SkipList</a></div><div class="ttdef"><b>Definition:</b> skip_list.cpp:55</div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1_skip_list_html_a40a4042bdf0b6683b5f21ae7854de8a9"><div class="ttname"><a href="../../d4/d90/classdata__structures_1_1_skip_list.html#a40a4042bdf0b6683b5f21ae7854de8a9">data_structures::SkipList::insertElement</a></div><div class="ttdeci">void insertElement(int key, void *value)</div><div class="ttdef"><b>Definition:</b> skip_list.cpp:90</div></div>
|
||||
<div class="ttc" id="aclassdata__structures_1_1_skip_list_html_a812611f80b8079268dbb19cc4e9bee5c"><div class="ttname"><a href="../../d4/d90/classdata__structures_1_1_skip_list.html#a812611f80b8079268dbb19cc4e9bee5c">data_structures::SkipList::displayList</a></div><div class="ttdeci">void displayList()</div><div class="ttdef"><b>Definition:</b> skip_list.cpp:191</div></div>
|
||||
@@ -203,7 +203,7 @@ Here is the call graph for this function:</div>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_2e746e9d06bf2d8ff842208bcc6ebcfc.html">data_structures</a></li><li class="navelem"><a class="el" href="../../d0/d5a/skip__list_8cpp.html">skip_list.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,197,56,224"/>
|
||||
<area shape="rect" id="node2" href="$d4/d90/classdata__structures_1_1_skip_list.html#a812611f80b8079268dbb19cc4e9bee5c" title=" " alt="" coords="104,15,271,57"/>
|
||||
<area shape="rect" id="node4" href="$d4/d90/classdata__structures_1_1_skip_list.html#a40a4042bdf0b6683b5f21ae7854de8a9" title=" " alt="" coords="104,98,271,139"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/rand.html#" title=" " alt="" coords="533,131,607,157"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/srand.html#" title=" " alt="" coords="147,248,227,275"/>
|
||||
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/chrono/c/time.html#" title=" " alt="" coords="151,299,224,325"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="366,5,438,32"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/rand#" title=" " alt="" coords="533,131,607,157"/>
|
||||
<area shape="rect" id="node8" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/random/srand#" title=" " alt="" coords="147,248,227,275"/>
|
||||
<area shape="rect" id="node9" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/chrono/c/time#" title=" " alt="" coords="151,299,224,325"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="366,5,438,32"/>
|
||||
<area shape="rect" id="node5" href="$d4/d90/classdata__structures_1_1_skip_list.html#aa3f3813e9896792fc86b296547689ba4" title=" " alt="" coords="319,57,485,98"/>
|
||||
<area shape="rect" id="node7" href="$d2/d45/segtree_8cpp.html#abd3e818681fb2e29cf08f4f60f82c8e0" title="Updates a range of the segment tree." alt="" coords="371,147,433,173"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
c520674ae7f7b7ad4a360d4c1159ef43
|
||||
e8731fda1baee9fdd6a8995c7e9e6702
|
||||
@@ -53,7 +53,7 @@
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand.html#" xlink:title=" ">
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/rand#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="396,-126.5 396,-145.5 451,-145.5 451,-126.5 396,-126.5"/>
|
||||
<text text-anchor="middle" x="423.5" y="-133.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::rand</text>
|
||||
</a>
|
||||
@@ -68,7 +68,7 @@
|
||||
<!-- Node8 -->
|
||||
<g id="node8" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/srand.html#" xlink:title=" ">
|
||||
<g id="a_node8"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/random/srand#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="106.5,-38.5 106.5,-57.5 166.5,-57.5 166.5,-38.5 106.5,-38.5"/>
|
||||
<text text-anchor="middle" x="136.5" y="-45.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::srand</text>
|
||||
</a>
|
||||
@@ -83,7 +83,7 @@
|
||||
<!-- Node9 -->
|
||||
<g id="node9" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/chrono/c/time.html#" xlink:title=" ">
|
||||
<g id="a_node9"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/chrono/c/time#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="109,-0.5 109,-19.5 164,-19.5 164,-0.5 109,-0.5"/>
|
||||
<text text-anchor="middle" x="136.5" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::time</text>
|
||||
</a>
|
||||
@@ -98,7 +98,7 @@
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="270.5,-220.5 270.5,-239.5 324.5,-239.5 324.5,-220.5 270.5,-220.5"/>
|
||||
<text text-anchor="middle" x="297.5" y="-227.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: operations_on_datastructures::trie_operations::Tnode Class Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -101,6 +101,12 @@ $(document).ready(function(){initNavTree('d0/d5f/classoperations__on__datastruct
|
||||
|
||||
<p>Class defining the structure of trie node and containing the methods to perform operations on them.
|
||||
<a href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#details">More...</a></p>
|
||||
<div class="dynheader">
|
||||
Collaboration diagram for operations_on_datastructures::trie_operations::Tnode:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../dc/df6/classoperations__on__datastructures_1_1trie__operations_1_1_tnode__coll__graph.svg" width="204" height="171"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
<center><span class="legend">[<a target="top" href="../../graph_legend.html">legend</a>]</span></center></div>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
@@ -189,11 +195,11 @@ static constexpr uint8_t </td><td class="memItemRight" valign="bottom"><b>E
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<div class="fragment"><div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> {</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> english.resize(ENGLISH_ALPHABET_SIZE, <span class="keyword">nullptr</span>);</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> endOfWord = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> frequency = 0;</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 47</span> {</div>
|
||||
<div class="line"><span class="lineno"> 48</span> english.resize(ENGLISH_ALPHABET_SIZE, <span class="keyword">nullptr</span>);</div>
|
||||
<div class="line"><span class="lineno"> 49</span> endOfWord = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 50</span> frequency = 0;</div>
|
||||
<div class="line"><span class="lineno"> 51</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -220,11 +226,11 @@ static constexpr uint8_t </td><td class="memItemRight" valign="bottom"><b>E
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<div class="fragment"><div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> {</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> english = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>.english;</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> endOfWord = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>.endOfWord;</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> frequency = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>.frequency;</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 53</span> {</div>
|
||||
<div class="line"><span class="lineno"> 54</span> english = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>.english;</div>
|
||||
<div class="line"><span class="lineno"> 55</span> endOfWord = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>.endOfWord;</div>
|
||||
<div class="line"><span class="lineno"> 56</span> frequency = <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>.frequency;</div>
|
||||
<div class="line"><span class="lineno"> 57</span> }</div>
|
||||
<div class="ttc" id="astructnode_html"><div class="ttname"><a href="../../d5/da1/structnode.html">node</a></div><div class="ttdef"><b>Definition:</b> avltree.cpp:13</div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
@@ -251,14 +257,14 @@ static constexpr uint8_t </td><td class="memItemRight" valign="bottom"><b>E
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<div class="fragment"><div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> {</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordflow">for</span> (i = 0; i < ENGLISH_ALPHABET_SIZE; i++) {</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordflow">if</span> (english[i]) {</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keyword">delete</span> english[i];</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> }</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> }</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 90</span> {</div>
|
||||
<div class="line"><span class="lineno"> 91</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><span class="lineno"> 92</span> <span class="keywordflow">for</span> (i = 0; i < ENGLISH_ALPHABET_SIZE; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 93</span> <span class="keywordflow">if</span> (english[i]) {</div>
|
||||
<div class="line"><span class="lineno"> 94</span> <span class="keyword">delete</span> english[i];</div>
|
||||
<div class="line"><span class="lineno"> 95</span> }</div>
|
||||
<div class="line"><span class="lineno"> 96</span> }</div>
|
||||
<div class="line"><span class="lineno"> 97</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -286,66 +292,66 @@ static constexpr uint8_t </td><td class="memItemRight" valign="bottom"><b>E
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> {</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> Tnode *cur_pos = <span class="keyword">this</span>,</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> *delete_from = <span class="keyword">this</span>; <span class="comment">// Current pointer pointing to root</span></div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordtype">int</span> letter_index = 0, delete_from_index = 0, i = 0, n = entry.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>();</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> </div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keywordflow">for</span> (i = 0; i < n; i++) {</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="comment">// To ignore case</span></div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(entry[i]) - 97;</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> </div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="comment">// Display error message when given entry is not present in the tree</span></div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Entry not Found"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> }</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <span class="comment">// If the current node is end of word for the current prefix or if it</span></div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="comment">// has 2 or more branches It cannot be deleted while deleting the</span></div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="comment">// required entry.</span></div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#afca808362c13273ca8c8ae7d58e8eee0">numberOfChildren</a>(cur_pos) > 1 || cur_pos->endOfWord) {</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> delete_from = cur_pos; <span class="comment">// denotes the beginning of the shortest</span></div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="comment">// suffix that is allowed to be deleted</span></div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> delete_from_index = i - 1; <span class="comment">// Beginning index of the suffix</span></div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="comment">// corresponding to the 'entry'</span></div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> }</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> </div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="comment">// Traversing through the entry</span></div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> }</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> </div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> <span class="comment">// cur_pos now points to the last char of entry. Display message if that</span></div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <span class="comment">// entry does not exist</span></div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keywordflow">if</span> (!cur_pos->endOfWord) {</div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Entry not Found"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> }</div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> </div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <span class="comment">// If cur_pos is not a leaf node, unmark end of word and assign 0 to it's</span></div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="comment">// frequency for deletion</span></div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#afca808362c13273ca8c8ae7d58e8eee0">numberOfChildren</a>(cur_pos)) {</div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> cur_pos->endOfWord = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> cur_pos->frequency = 0;</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> }</div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> </div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="comment">// The first character of the suffix to be deleted</span></div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(entry[delete_from_index + 1]) - 97;</div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <span class="comment">// Point cur_pos to the next node</span></div>
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> cur_pos = delete_from->english[letter_index];</div>
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <span class="comment">// Sever the connection from the main trie</span></div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> delete_from->english[letter_index] = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> </div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <span class="comment">// If number of characters in the suffix are more than 1, recursively delete</span></div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="comment">// each character starting from cur_pos using the helper function</span></div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <span class="keywordflow">if</span> (n > delete_from_index + 2) {</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#adef6940391f981ab86767775176b7169">DeleteFrom</a>(cur_pos, entry, delete_from_index + 2);</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> }</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="comment">// If the suffix is only 1 char in length</span></div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <span class="keyword">delete</span> cur_pos;</div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> }</div>
|
||||
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 150</span> {</div>
|
||||
<div class="line"><span class="lineno"> 151</span> Tnode *cur_pos = <span class="keyword">this</span>,</div>
|
||||
<div class="line"><span class="lineno"> 152</span> *delete_from = <span class="keyword">this</span>; <span class="comment">// Current pointer pointing to root</span></div>
|
||||
<div class="line"><span class="lineno"> 153</span> <span class="keywordtype">int</span> letter_index = 0, delete_from_index = 0, i = 0, n = entry.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>();</div>
|
||||
<div class="line"><span class="lineno"> 154</span> </div>
|
||||
<div class="line"><span class="lineno"> 155</span> <span class="keywordflow">for</span> (i = 0; i < n; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 156</span> <span class="comment">// To ignore case</span></div>
|
||||
<div class="line"><span class="lineno"> 157</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(entry[i]) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 158</span> </div>
|
||||
<div class="line"><span class="lineno"> 159</span> <span class="comment">// Display error message when given entry is not present in the tree</span></div>
|
||||
<div class="line"><span class="lineno"> 160</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 161</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Entry not Found"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 162</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 163</span> }</div>
|
||||
<div class="line"><span class="lineno"> 164</span> <span class="comment">// If the current node is end of word for the current prefix or if it</span></div>
|
||||
<div class="line"><span class="lineno"> 165</span> <span class="comment">// has 2 or more branches It cannot be deleted while deleting the</span></div>
|
||||
<div class="line"><span class="lineno"> 166</span> <span class="comment">// required entry.</span></div>
|
||||
<div class="line"><span class="lineno"> 167</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#afca808362c13273ca8c8ae7d58e8eee0">numberOfChildren</a>(cur_pos) > 1 || cur_pos->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 168</span> delete_from = cur_pos; <span class="comment">// denotes the beginning of the shortest</span></div>
|
||||
<div class="line"><span class="lineno"> 169</span> <span class="comment">// suffix that is allowed to be deleted</span></div>
|
||||
<div class="line"><span class="lineno"> 170</span> delete_from_index = i - 1; <span class="comment">// Beginning index of the suffix</span></div>
|
||||
<div class="line"><span class="lineno"> 171</span> <span class="comment">// corresponding to the 'entry'</span></div>
|
||||
<div class="line"><span class="lineno"> 172</span> }</div>
|
||||
<div class="line"><span class="lineno"> 173</span> </div>
|
||||
<div class="line"><span class="lineno"> 174</span> <span class="comment">// Traversing through the entry</span></div>
|
||||
<div class="line"><span class="lineno"> 175</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 176</span> }</div>
|
||||
<div class="line"><span class="lineno"> 177</span> </div>
|
||||
<div class="line"><span class="lineno"> 178</span> <span class="comment">// cur_pos now points to the last char of entry. Display message if that</span></div>
|
||||
<div class="line"><span class="lineno"> 179</span> <span class="comment">// entry does not exist</span></div>
|
||||
<div class="line"><span class="lineno"> 180</span> <span class="keywordflow">if</span> (!cur_pos->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 181</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Entry not Found"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 182</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 183</span> }</div>
|
||||
<div class="line"><span class="lineno"> 184</span> </div>
|
||||
<div class="line"><span class="lineno"> 185</span> <span class="comment">// If cur_pos is not a leaf node, unmark end of word and assign 0 to it's</span></div>
|
||||
<div class="line"><span class="lineno"> 186</span> <span class="comment">// frequency for deletion</span></div>
|
||||
<div class="line"><span class="lineno"> 187</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#afca808362c13273ca8c8ae7d58e8eee0">numberOfChildren</a>(cur_pos)) {</div>
|
||||
<div class="line"><span class="lineno"> 188</span> cur_pos->endOfWord = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 189</span> cur_pos->frequency = 0;</div>
|
||||
<div class="line"><span class="lineno"> 190</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 191</span> }</div>
|
||||
<div class="line"><span class="lineno"> 192</span> </div>
|
||||
<div class="line"><span class="lineno"> 193</span> <span class="comment">// The first character of the suffix to be deleted</span></div>
|
||||
<div class="line"><span class="lineno"> 194</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(entry[delete_from_index + 1]) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 195</span> <span class="comment">// Point cur_pos to the next node</span></div>
|
||||
<div class="line"><span class="lineno"> 196</span> cur_pos = delete_from->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 197</span> <span class="comment">// Sever the connection from the main trie</span></div>
|
||||
<div class="line"><span class="lineno"> 198</span> delete_from->english[letter_index] = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 199</span> </div>
|
||||
<div class="line"><span class="lineno"> 200</span> <span class="comment">// If number of characters in the suffix are more than 1, recursively delete</span></div>
|
||||
<div class="line"><span class="lineno"> 201</span> <span class="comment">// each character starting from cur_pos using the helper function</span></div>
|
||||
<div class="line"><span class="lineno"> 202</span> <span class="keywordflow">if</span> (n > delete_from_index + 2) {</div>
|
||||
<div class="line"><span class="lineno"> 203</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#adef6940391f981ab86767775176b7169">DeleteFrom</a>(cur_pos, entry, delete_from_index + 2);</div>
|
||||
<div class="line"><span class="lineno"> 204</span> }</div>
|
||||
<div class="line"><span class="lineno"> 205</span> <span class="comment">// If the suffix is only 1 char in length</span></div>
|
||||
<div class="line"><span class="lineno"> 206</span> <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 207</span> <span class="keyword">delete</span> cur_pos;</div>
|
||||
<div class="line"><span class="lineno"> 208</span> }</div>
|
||||
<div class="line"><span class="lineno"> 209</span>}</div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html_adef6940391f981ab86767775176b7169"><div class="ttname"><a href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#adef6940391f981ab86767775176b7169">operations_on_datastructures::trie_operations::Tnode::DeleteFrom</a></div><div class="ttdeci">void DeleteFrom(Tnode *delete_from, std::string delete_string, int remove_index)</div><div class="ttdoc">Function recursively deletes the substring character by character iterating through the string to be ...</div><div class="ttdef"><b>Definition:</b> trie_multiple_search.cpp:134</div></div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html_afca808362c13273ca8c8ae7d58e8eee0"><div class="ttname"><a href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#afca808362c13273ca8c8ae7d58e8eee0">operations_on_datastructures::trie_operations::Tnode::numberOfChildren</a></div><div class="ttdeci">uint8_t numberOfChildren(Tnode *node)</div><div class="ttdoc">Function to count the number of children a node in the trie has.</div><div class="ttdef"><b>Definition:</b> trie_multiple_search.cpp:69</div></div>
|
||||
@@ -402,16 +408,16 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> {</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">if</span> (delete_string.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() == remove_index) {</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keywordtype">int</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(delete_string[remove_index]) - 97;</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> </div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#adef6940391f981ab86767775176b7169">DeleteFrom</a>(delete_from->english[letter_index], delete_string,</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> remove_index + 1);</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> </div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keyword">delete</span> delete_from;</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> }</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 135</span> {</div>
|
||||
<div class="line"><span class="lineno"> 136</span> <span class="keywordflow">if</span> (delete_string.<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string/size.html">size</a>() == remove_index) {</div>
|
||||
<div class="line"><span class="lineno"> 137</span> <span class="keywordtype">int</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(delete_string[remove_index]) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 138</span> </div>
|
||||
<div class="line"><span class="lineno"> 139</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#adef6940391f981ab86767775176b7169">DeleteFrom</a>(delete_from->english[letter_index], delete_string,</div>
|
||||
<div class="line"><span class="lineno"> 140</span> remove_index + 1);</div>
|
||||
<div class="line"><span class="lineno"> 141</span> </div>
|
||||
<div class="line"><span class="lineno"> 142</span> <span class="keyword">delete</span> delete_from;</div>
|
||||
<div class="line"><span class="lineno"> 143</span> }</div>
|
||||
<div class="line"><span class="lineno"> 144</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -444,25 +450,25 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> {</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> Tnode *cur_pos = <span class="keyword">this</span>;</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : entry) {</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="comment">// To ignore case</span></div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> </div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="comment">// Allocate a node for each character of entry if not present in the</span></div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="comment">// trie</span></div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> cur_pos->english[letter_index] = <span class="keyword">new</span> Tnode();</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> }</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> </div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> }</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="comment">// cur_pos points to the last char, mark it as end of word</span></div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> cur_pos->endOfWord = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 104</span> {</div>
|
||||
<div class="line"><span class="lineno"> 105</span> Tnode *cur_pos = <span class="keyword">this</span>;</div>
|
||||
<div class="line"><span class="lineno"> 106</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><span class="lineno"> 107</span> </div>
|
||||
<div class="line"><span class="lineno"> 108</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : entry) {</div>
|
||||
<div class="line"><span class="lineno"> 109</span> <span class="comment">// To ignore case</span></div>
|
||||
<div class="line"><span class="lineno"> 110</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 111</span> </div>
|
||||
<div class="line"><span class="lineno"> 112</span> <span class="comment">// Allocate a node for each character of entry if not present in the</span></div>
|
||||
<div class="line"><span class="lineno"> 113</span> <span class="comment">// trie</span></div>
|
||||
<div class="line"><span class="lineno"> 114</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 115</span> cur_pos->english[letter_index] = <span class="keyword">new</span> Tnode();</div>
|
||||
<div class="line"><span class="lineno"> 116</span> }</div>
|
||||
<div class="line"><span class="lineno"> 117</span> </div>
|
||||
<div class="line"><span class="lineno"> 118</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 119</span> }</div>
|
||||
<div class="line"><span class="lineno"> 120</span> <span class="comment">// cur_pos points to the last char, mark it as end of word</span></div>
|
||||
<div class="line"><span class="lineno"> 121</span> cur_pos->endOfWord = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 122</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -498,10 +504,10 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>count of the number of children of the given node (max 26) </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> {</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">return</span> ENGLISH_ALPHABET_SIZE -</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/count.html">std::count</a>(<a class="code hl_class" href="../../d5/da1/structnode.html">node</a>->english.begin(), <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>->english.end(), <span class="keyword">nullptr</span>);</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> }</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 69</span> {</div>
|
||||
<div class="line"><span class="lineno"> 70</span> <span class="keywordflow">return</span> ENGLISH_ALPHABET_SIZE -</div>
|
||||
<div class="line"><span class="lineno"> 71</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/algorithm/count.html">std::count</a>(<a class="code hl_class" href="../../d5/da1/structnode.html">node</a>->english.begin(), <a class="code hl_class" href="../../d5/da1/structnode.html">node</a>->english.end(), <span class="keyword">nullptr</span>);</div>
|
||||
<div class="line"><span class="lineno"> 72</span> }</div>
|
||||
<div class="ttc" id="acount_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/count.html">std::count</a></div><div class="ttdeci">T count(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -535,56 +541,56 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00365" name="l00365"></a><span class="lineno"> 365</span> {</div>
|
||||
<div class="line"><a id="l00366" name="l00366"></a><span class="lineno"> 366</span> Tnode *cur_pos = <span class="keyword">nullptr</span>, *prev_pos = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> cur_pos = prev_pos = <span class="keyword">this</span>; <span class="comment">// maintaining 2 pointers, initialized to root</span></div>
|
||||
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno"> 368</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><a id="l00369" name="l00369"></a><span class="lineno"> 369</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> prefix =</div>
|
||||
<div class="line"><a id="l00370" name="l00370"></a><span class="lineno"> 370</span> <span class="stringliteral">""</span>; <span class="comment">// variable storing the updated value of longest common prefix</span></div>
|
||||
<div class="line"><a id="l00371" name="l00371"></a><span class="lineno"> 371</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue.html">std::priority_queue<std::pair<int, std::string></a> ></div>
|
||||
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno"> 372</span> suggestions; <span class="comment">// max heap to store (frequency, word) in descending order</span></div>
|
||||
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno"> 373</span> <span class="comment">// of freq</span></div>
|
||||
<div class="line"><a id="l00374" name="l00374"></a><span class="lineno"> 374</span> </div>
|
||||
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue.html">std::priority_queue<std::pair<int, std::string></a> > *Suggestions =</div>
|
||||
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"> 376</span> &suggestions;</div>
|
||||
<div class="line"><a id="l00377" name="l00377"></a><span class="lineno"> 377</span> </div>
|
||||
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"> 378</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : key) {</div>
|
||||
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"> 379</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><a id="l00380" name="l00380"></a><span class="lineno"> 380</span> prev_pos = cur_pos; <span class="comment">// Previous pointer updated to point to the last</span></div>
|
||||
<div class="line"><a id="l00381" name="l00381"></a><span class="lineno"> 381</span> <span class="comment">// char of the longest common prefix</span></div>
|
||||
<div class="line"><a id="l00382" name="l00382"></a><span class="lineno"> 382</span> </div>
|
||||
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"> 383</span> <span class="comment">// When the node for the character does not exist, longest prefix has</span></div>
|
||||
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno"> 384</span> <span class="comment">// been determined and SuggestFreqAutocomplete is called</span></div>
|
||||
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno"> 385</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00386" name="l00386"></a><span class="lineno"> 386</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a9e556f52c837190ecf4265b1f05cfe9c">SuggestFreqAutocomplete</a>(prev_pos, prefix, Suggestions);</div>
|
||||
<div class="line"><a id="l00387" name="l00387"></a><span class="lineno"> 387</span> <span class="comment">// To display the top 3 results</span></div>
|
||||
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno"> 388</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#aacafb8c9f3ebac7ac6c01d9645bb67b6">SelectionTop_3</a>(Suggestions);</div>
|
||||
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno"> 389</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"> 390</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00391" name="l00391"></a><span class="lineno"> 391</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno"> 392</span> }</div>
|
||||
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"> 393</span> <span class="comment">// Updating the longest common prefix</span></div>
|
||||
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno"> 394</span> prefix += char(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i));</div>
|
||||
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno"> 395</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><a id="l00396" name="l00396"></a><span class="lineno"> 396</span> }</div>
|
||||
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno"> 397</span> <span class="comment">// If the key is a valid entry of trie, display it @ top of the suggestions</span></div>
|
||||
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno"> 398</span> <span class="keywordflow">if</span> (cur_pos->endOfWord) {</div>
|
||||
<div class="line"><a id="l00399" name="l00399"></a><span class="lineno"> 399</span> (cur_pos->frequency)++;</div>
|
||||
<div class="line"><a id="l00400" name="l00400"></a><span class="lineno"> 400</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << key << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00401" name="l00401"></a><span class="lineno"> 401</span> }</div>
|
||||
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno"> 402</span> </div>
|
||||
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno"> 403</span> (void)prev_pos; <span class="comment">// Idiom to ignore previous pointer</span></div>
|
||||
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno"> 404</span> </div>
|
||||
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno"> 405</span> <span class="comment">// Call for Suggestions when the search key is present as an entry/a prefix</span></div>
|
||||
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno"> 406</span> <span class="comment">// in the trie</span></div>
|
||||
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno"> 407</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a9e556f52c837190ecf4265b1f05cfe9c">SuggestFreqAutocomplete</a>(cur_pos, prefix, Suggestions);</div>
|
||||
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno"> 408</span> <span class="comment">// Display the top 3 results</span></div>
|
||||
<div class="line"><a id="l00409" name="l00409"></a><span class="lineno"> 409</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#aacafb8c9f3ebac7ac6c01d9645bb67b6">SelectionTop_3</a>(Suggestions);</div>
|
||||
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno"> 410</span> </div>
|
||||
<div class="line"><a id="l00411" name="l00411"></a><span class="lineno"> 411</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno"> 412</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"> 413</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"> 414</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 365</span> {</div>
|
||||
<div class="line"><span class="lineno"> 366</span> Tnode *cur_pos = <span class="keyword">nullptr</span>, *prev_pos = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 367</span> cur_pos = prev_pos = <span class="keyword">this</span>; <span class="comment">// maintaining 2 pointers, initialized to root</span></div>
|
||||
<div class="line"><span class="lineno"> 368</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><span class="lineno"> 369</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> prefix =</div>
|
||||
<div class="line"><span class="lineno"> 370</span> <span class="stringliteral">""</span>; <span class="comment">// variable storing the updated value of longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 371</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue.html">std::priority_queue<std::pair<int, std::string></a> ></div>
|
||||
<div class="line"><span class="lineno"> 372</span> suggestions; <span class="comment">// max heap to store (frequency, word) in descending order</span></div>
|
||||
<div class="line"><span class="lineno"> 373</span> <span class="comment">// of freq</span></div>
|
||||
<div class="line"><span class="lineno"> 374</span> </div>
|
||||
<div class="line"><span class="lineno"> 375</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue.html">std::priority_queue<std::pair<int, std::string></a> > *Suggestions =</div>
|
||||
<div class="line"><span class="lineno"> 376</span> &suggestions;</div>
|
||||
<div class="line"><span class="lineno"> 377</span> </div>
|
||||
<div class="line"><span class="lineno"> 378</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : key) {</div>
|
||||
<div class="line"><span class="lineno"> 379</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 380</span> prev_pos = cur_pos; <span class="comment">// Previous pointer updated to point to the last</span></div>
|
||||
<div class="line"><span class="lineno"> 381</span> <span class="comment">// char of the longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 382</span> </div>
|
||||
<div class="line"><span class="lineno"> 383</span> <span class="comment">// When the node for the character does not exist, longest prefix has</span></div>
|
||||
<div class="line"><span class="lineno"> 384</span> <span class="comment">// been determined and SuggestFreqAutocomplete is called</span></div>
|
||||
<div class="line"><span class="lineno"> 385</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 386</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a9e556f52c837190ecf4265b1f05cfe9c">SuggestFreqAutocomplete</a>(prev_pos, prefix, Suggestions);</div>
|
||||
<div class="line"><span class="lineno"> 387</span> <span class="comment">// To display the top 3 results</span></div>
|
||||
<div class="line"><span class="lineno"> 388</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#aacafb8c9f3ebac7ac6c01d9645bb67b6">SelectionTop_3</a>(Suggestions);</div>
|
||||
<div class="line"><span class="lineno"> 389</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><span class="lineno"> 390</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 391</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 392</span> }</div>
|
||||
<div class="line"><span class="lineno"> 393</span> <span class="comment">// Updating the longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 394</span> prefix += char(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i));</div>
|
||||
<div class="line"><span class="lineno"> 395</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 396</span> }</div>
|
||||
<div class="line"><span class="lineno"> 397</span> <span class="comment">// If the key is a valid entry of trie, display it @ top of the suggestions</span></div>
|
||||
<div class="line"><span class="lineno"> 398</span> <span class="keywordflow">if</span> (cur_pos->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 399</span> (cur_pos->frequency)++;</div>
|
||||
<div class="line"><span class="lineno"> 400</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << key << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 401</span> }</div>
|
||||
<div class="line"><span class="lineno"> 402</span> </div>
|
||||
<div class="line"><span class="lineno"> 403</span> (void)prev_pos; <span class="comment">// Idiom to ignore previous pointer</span></div>
|
||||
<div class="line"><span class="lineno"> 404</span> </div>
|
||||
<div class="line"><span class="lineno"> 405</span> <span class="comment">// Call for Suggestions when the search key is present as an entry/a prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 406</span> <span class="comment">// in the trie</span></div>
|
||||
<div class="line"><span class="lineno"> 407</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a9e556f52c837190ecf4265b1f05cfe9c">SuggestFreqAutocomplete</a>(cur_pos, prefix, Suggestions);</div>
|
||||
<div class="line"><span class="lineno"> 408</span> <span class="comment">// Display the top 3 results</span></div>
|
||||
<div class="line"><span class="lineno"> 409</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#aacafb8c9f3ebac7ac6c01d9645bb67b6">SelectionTop_3</a>(Suggestions);</div>
|
||||
<div class="line"><span class="lineno"> 410</span> </div>
|
||||
<div class="line"><span class="lineno"> 411</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><span class="lineno"> 412</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 413</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 414</span>}</div>
|
||||
<div class="ttc" id="abasic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html_a9e556f52c837190ecf4265b1f05cfe9c"><div class="ttname"><a href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a9e556f52c837190ecf4265b1f05cfe9c">operations_on_datastructures::trie_operations::Tnode::SuggestFreqAutocomplete</a></div><div class="ttdeci">void SuggestFreqAutocomplete(Tnode *new_root, const std::string &prefix, std::priority_queue< std::pair< int, std::string > > *suggestions)</div><div class="ttdoc">Recursive function to suggest most frequently searched entries of trie which have a given common pref...</div><div class="ttdef"><b>Definition:</b> trie_multiple_search.cpp:337</div></div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html_aacafb8c9f3ebac7ac6c01d9645bb67b6"><div class="ttname"><a href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#aacafb8c9f3ebac7ac6c01d9645bb67b6">operations_on_datastructures::trie_operations::Tnode::SelectionTop_3</a></div><div class="ttdeci">void SelectionTop_3(std::priority_queue< std::pair< int, std::string > > *suggestions)</div><div class="ttdoc">Function to display the 3 suggestions with highest frequency of search hits.</div><div class="ttdef"><b>Definition:</b> trie_multiple_search.cpp:317</div></div>
|
||||
@@ -624,27 +630,27 @@ Here is the call graph for this function:</div>
|
||||
<dl class="section return"><dt>Returns</dt><dd>true if the key is found </dd>
|
||||
<dd>
|
||||
false if the key is not found </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> {</div>
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> Tnode *cur_pos = <span class="keyword">this</span>;</div>
|
||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> </div>
|
||||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : key) {</div>
|
||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> <span class="comment">// If any character in the order of the key is absent, word not found!</span></div>
|
||||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> }</div>
|
||||
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> }</div>
|
||||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="comment">// Word is only present in the trie if the key is a valid complete entry and</span></div>
|
||||
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> <span class="comment">// not just a prefix.</span></div>
|
||||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> <span class="keywordflow">if</span> (cur_pos->endOfWord) {</div>
|
||||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> (cur_pos->frequency)++;</div>
|
||||
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> }</div>
|
||||
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 217</span> {</div>
|
||||
<div class="line"><span class="lineno"> 218</span> Tnode *cur_pos = <span class="keyword">this</span>;</div>
|
||||
<div class="line"><span class="lineno"> 219</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><span class="lineno"> 220</span> </div>
|
||||
<div class="line"><span class="lineno"> 221</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : key) {</div>
|
||||
<div class="line"><span class="lineno"> 222</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 223</span> <span class="comment">// If any character in the order of the key is absent, word not found!</span></div>
|
||||
<div class="line"><span class="lineno"> 224</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 225</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 226</span> }</div>
|
||||
<div class="line"><span class="lineno"> 227</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 228</span> }</div>
|
||||
<div class="line"><span class="lineno"> 229</span> <span class="comment">// Word is only present in the trie if the key is a valid complete entry and</span></div>
|
||||
<div class="line"><span class="lineno"> 230</span> <span class="comment">// not just a prefix.</span></div>
|
||||
<div class="line"><span class="lineno"> 231</span> <span class="keywordflow">if</span> (cur_pos->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 232</span> (cur_pos->frequency)++;</div>
|
||||
<div class="line"><span class="lineno"> 233</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 234</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 235</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 236</span> }</div>
|
||||
<div class="line"><span class="lineno"> 237</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -671,45 +677,45 @@ false if the key is not found </dd></dl>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span> {</div>
|
||||
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"> 272</span> Tnode *cur_pos = <span class="keyword">nullptr</span>, *prev_pos = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno"> 273</span> cur_pos = prev_pos = <span class="keyword">this</span>; <span class="comment">// maintaining 2 pointers, initialized to root</span></div>
|
||||
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno"> 274</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"> 275</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> prefix =</div>
|
||||
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno"> 276</span> <span class="stringliteral">""</span>; <span class="comment">// variable storing the updated value of longest common prefix</span></div>
|
||||
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> </div>
|
||||
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : key) {</div>
|
||||
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> prev_pos = cur_pos; <span class="comment">// Previous pointer updated to point to the last</span></div>
|
||||
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span> <span class="comment">// char of the longest common prefix</span></div>
|
||||
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno"> 282</span> </div>
|
||||
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span> <span class="comment">// When the node for the character does not exist, longest prefix has</span></div>
|
||||
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> <span class="comment">// been determined and SuggestAutocomplete is called</span></div>
|
||||
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a097913c4badec2b60d50a171ecc299fe">SuggestAutocomplete</a>(prev_pos, prefix);</div>
|
||||
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"> 287</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"> 288</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"> 289</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"> 290</span> }</div>
|
||||
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"> 291</span> <span class="comment">// Updating the longest common prefix</span></div>
|
||||
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"> 292</span> prefix += char(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i));</div>
|
||||
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"> 293</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span> }</div>
|
||||
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"> 295</span> <span class="comment">// If the key is a valid entry of trie, display it @ top of the suggestions</span></div>
|
||||
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"> 296</span> <span class="keywordflow">if</span> (cur_pos->endOfWord) {</div>
|
||||
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << key << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> (cur_pos->frequency)++;</div>
|
||||
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> }</div>
|
||||
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> </div>
|
||||
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> (void)prev_pos; <span class="comment">// Idiom to ignore previous pointer</span></div>
|
||||
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> </div>
|
||||
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> <span class="comment">// Call for suggestions when the search key is present as an entry/a prefix</span></div>
|
||||
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> <span class="comment">// in the trie</span></div>
|
||||
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a097913c4badec2b60d50a171ecc299fe">SuggestAutocomplete</a>(cur_pos, prefix);</div>
|
||||
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 271</span> {</div>
|
||||
<div class="line"><span class="lineno"> 272</span> Tnode *cur_pos = <span class="keyword">nullptr</span>, *prev_pos = <span class="keyword">nullptr</span>;</div>
|
||||
<div class="line"><span class="lineno"> 273</span> cur_pos = prev_pos = <span class="keyword">this</span>; <span class="comment">// maintaining 2 pointers, initialized to root</span></div>
|
||||
<div class="line"><span class="lineno"> 274</span> <span class="keywordtype">int</span> letter_index = 0;</div>
|
||||
<div class="line"><span class="lineno"> 275</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> prefix =</div>
|
||||
<div class="line"><span class="lineno"> 276</span> <span class="stringliteral">""</span>; <span class="comment">// variable storing the updated value of longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 277</span> </div>
|
||||
<div class="line"><span class="lineno"> 278</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> &i : key) {</div>
|
||||
<div class="line"><span class="lineno"> 279</span> letter_index = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i) - 97;</div>
|
||||
<div class="line"><span class="lineno"> 280</span> prev_pos = cur_pos; <span class="comment">// Previous pointer updated to point to the last</span></div>
|
||||
<div class="line"><span class="lineno"> 281</span> <span class="comment">// char of the longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 282</span> </div>
|
||||
<div class="line"><span class="lineno"> 283</span> <span class="comment">// When the node for the character does not exist, longest prefix has</span></div>
|
||||
<div class="line"><span class="lineno"> 284</span> <span class="comment">// been determined and SuggestAutocomplete is called</span></div>
|
||||
<div class="line"><span class="lineno"> 285</span> <span class="keywordflow">if</span> (cur_pos->english[letter_index] == <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 286</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a097913c4badec2b60d50a171ecc299fe">SuggestAutocomplete</a>(prev_pos, prefix);</div>
|
||||
<div class="line"><span class="lineno"> 287</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><span class="lineno"> 288</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 289</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 290</span> }</div>
|
||||
<div class="line"><span class="lineno"> 291</span> <span class="comment">// Updating the longest common prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 292</span> prefix += char(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/tolower.html">tolower</a>(i));</div>
|
||||
<div class="line"><span class="lineno"> 293</span> cur_pos = cur_pos->english[letter_index];</div>
|
||||
<div class="line"><span class="lineno"> 294</span> }</div>
|
||||
<div class="line"><span class="lineno"> 295</span> <span class="comment">// If the key is a valid entry of trie, display it @ top of the suggestions</span></div>
|
||||
<div class="line"><span class="lineno"> 296</span> <span class="keywordflow">if</span> (cur_pos->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 297</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << key << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 298</span> (cur_pos->frequency)++;</div>
|
||||
<div class="line"><span class="lineno"> 299</span> }</div>
|
||||
<div class="line"><span class="lineno"> 300</span> </div>
|
||||
<div class="line"><span class="lineno"> 301</span> (void)prev_pos; <span class="comment">// Idiom to ignore previous pointer</span></div>
|
||||
<div class="line"><span class="lineno"> 302</span> </div>
|
||||
<div class="line"><span class="lineno"> 303</span> <span class="comment">// Call for suggestions when the search key is present as an entry/a prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 304</span> <span class="comment">// in the trie</span></div>
|
||||
<div class="line"><span class="lineno"> 305</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a097913c4badec2b60d50a171ecc299fe">SuggestAutocomplete</a>(cur_pos, prefix);</div>
|
||||
<div class="line"><span class="lineno"> 306</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"- - - - - - - - - - - - - - - - - - - - - - - - - - "</span></div>
|
||||
<div class="line"><span class="lineno"> 307</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 308</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 309</span>}</div>
|
||||
<div class="ttc" id="aclassoperations__on__datastructures_1_1trie__operations_1_1_tnode_html_a097913c4badec2b60d50a171ecc299fe"><div class="ttname"><a href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a097913c4badec2b60d50a171ecc299fe">operations_on_datastructures::trie_operations::Tnode::SuggestAutocomplete</a></div><div class="ttdeci">void SuggestAutocomplete(Tnode *new_root, const std::string &prefix)</div><div class="ttdoc">Recursive function to suggest all the entries of trie which have a given common prefix.</div><div class="ttdef"><b>Definition:</b> trie_multiple_search.cpp:246</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -743,15 +749,15 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> {</div>
|
||||
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> <span class="comment">// Display Either top 3 or total number of suggestions, whichever is smaller</span></div>
|
||||
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span> <span class="keywordtype">int</span> n = suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/size.html">size</a>(), Top = 0;</div>
|
||||
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> Top = n < 3 ? n : 3;</div>
|
||||
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span> <span class="keywordflow">while</span> (Top--) {</div>
|
||||
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/top.html">top</a>().second << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/pop.html">pop</a>();</div>
|
||||
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> }</div>
|
||||
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 318</span> {</div>
|
||||
<div class="line"><span class="lineno"> 319</span> <span class="comment">// Display Either top 3 or total number of suggestions, whichever is smaller</span></div>
|
||||
<div class="line"><span class="lineno"> 320</span> <span class="keywordtype">int</span> n = suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/size.html">size</a>(), Top = 0;</div>
|
||||
<div class="line"><span class="lineno"> 321</span> Top = n < 3 ? n : 3;</div>
|
||||
<div class="line"><span class="lineno"> 322</span> <span class="keywordflow">while</span> (Top--) {</div>
|
||||
<div class="line"><span class="lineno"> 323</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/top.html">top</a>().second << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 324</span> suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/pop.html">pop</a>();</div>
|
||||
<div class="line"><span class="lineno"> 325</span> }</div>
|
||||
<div class="line"><span class="lineno"> 326</span>}</div>
|
||||
<div class="ttc" id="apop_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/priority_queue/pop.html">std::priority_queue::pop</a></div><div class="ttdeci">T pop(T... args)</div></div>
|
||||
<div class="ttc" id="atop_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/priority_queue/top.html">std::priority_queue::top</a></div><div class="ttdeci">T top(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
@@ -797,22 +803,22 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> {</div>
|
||||
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> <span class="comment">// Iterate through all 26 nodes as we have to print all strings with the</span></div>
|
||||
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> <span class="comment">// given prefix</span></div>
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <span class="keywordflow">for</span> (i = 0; i < ENGLISH_ALPHABET_SIZE; i++) {</div>
|
||||
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> <span class="keywordflow">if</span> (new_root->english[i] != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> <span class="comment">// Print the sugestion only if it's a valid complete entry and not</span></div>
|
||||
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> <span class="comment">// just a prefix</span></div>
|
||||
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> <span class="keywordflow">if</span> (new_root->english[i]->endOfWord) {</div>
|
||||
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << prefix + char(i + 97) << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> }</div>
|
||||
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> </div>
|
||||
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a097913c4badec2b60d50a171ecc299fe">SuggestAutocomplete</a>(new_root->english[i], prefix + <span class="keywordtype">char</span>(i + 97));</div>
|
||||
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> }</div>
|
||||
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> }</div>
|
||||
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 246</span> {</div>
|
||||
<div class="line"><span class="lineno"> 247</span> <span class="comment">// Iterate through all 26 nodes as we have to print all strings with the</span></div>
|
||||
<div class="line"><span class="lineno"> 248</span> <span class="comment">// given prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 249</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><span class="lineno"> 250</span> <span class="keywordflow">for</span> (i = 0; i < ENGLISH_ALPHABET_SIZE; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 251</span> <span class="keywordflow">if</span> (new_root->english[i] != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 252</span> <span class="comment">// Print the sugestion only if it's a valid complete entry and not</span></div>
|
||||
<div class="line"><span class="lineno"> 253</span> <span class="comment">// just a prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 254</span> <span class="keywordflow">if</span> (new_root->english[i]->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 255</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << prefix + char(i + 97) << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 256</span> }</div>
|
||||
<div class="line"><span class="lineno"> 257</span> </div>
|
||||
<div class="line"><span class="lineno"> 258</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a097913c4badec2b60d50a171ecc299fe">SuggestAutocomplete</a>(new_root->english[i], prefix + <span class="keywordtype">char</span>(i + 97));</div>
|
||||
<div class="line"><span class="lineno"> 259</span> }</div>
|
||||
<div class="line"><span class="lineno"> 260</span> }</div>
|
||||
<div class="line"><span class="lineno"> 261</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -863,22 +869,22 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00339" name="l00339"></a><span class="lineno"> 339</span> {</div>
|
||||
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"> 340</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> <span class="keywordflow">for</span> (i = 0; i < ENGLISH_ALPHABET_SIZE; i++) {</div>
|
||||
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> <span class="keywordflow">if</span> (new_root->english[i] != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> <span class="comment">// Add to sugestions only if it's a valid complete entry and not</span></div>
|
||||
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"> 344</span> <span class="comment">// just a prefix</span></div>
|
||||
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"> 345</span> <span class="keywordflow">if</span> (new_root->english[i]->endOfWord) {</div>
|
||||
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/push.html">push</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair/make_pair.html">std::make_pair</a>(</div>
|
||||
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> new_root->english[i]->frequency, prefix + <span class="keywordtype">char</span>(i + 97)));</div>
|
||||
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span> }</div>
|
||||
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"> 349</span> </div>
|
||||
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a9e556f52c837190ecf4265b1f05cfe9c">SuggestFreqAutocomplete</a>(new_root->english[i], prefix + <span class="keywordtype">char</span>(i + 97),</div>
|
||||
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span> suggestions);</div>
|
||||
<div class="line"><a id="l00352" name="l00352"></a><span class="lineno"> 352</span> }</div>
|
||||
<div class="line"><a id="l00353" name="l00353"></a><span class="lineno"> 353</span> }</div>
|
||||
<div class="line"><a id="l00354" name="l00354"></a><span class="lineno"> 354</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 339</span> {</div>
|
||||
<div class="line"><span class="lineno"> 340</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><span class="lineno"> 341</span> <span class="keywordflow">for</span> (i = 0; i < ENGLISH_ALPHABET_SIZE; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 342</span> <span class="keywordflow">if</span> (new_root->english[i] != <span class="keyword">nullptr</span>) {</div>
|
||||
<div class="line"><span class="lineno"> 343</span> <span class="comment">// Add to sugestions only if it's a valid complete entry and not</span></div>
|
||||
<div class="line"><span class="lineno"> 344</span> <span class="comment">// just a prefix</span></div>
|
||||
<div class="line"><span class="lineno"> 345</span> <span class="keywordflow">if</span> (new_root->english[i]->endOfWord) {</div>
|
||||
<div class="line"><span class="lineno"> 346</span> suggestions-><a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/priority_queue/push.html">push</a>(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/pair/make_pair.html">std::make_pair</a>(</div>
|
||||
<div class="line"><span class="lineno"> 347</span> new_root->english[i]->frequency, prefix + <span class="keywordtype">char</span>(i + 97)));</div>
|
||||
<div class="line"><span class="lineno"> 348</span> }</div>
|
||||
<div class="line"><span class="lineno"> 349</span> </div>
|
||||
<div class="line"><span class="lineno"> 350</span> <a class="code hl_function" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a9e556f52c837190ecf4265b1f05cfe9c">SuggestFreqAutocomplete</a>(new_root->english[i], prefix + <span class="keywordtype">char</span>(i + 97),</div>
|
||||
<div class="line"><span class="lineno"> 351</span> suggestions);</div>
|
||||
<div class="line"><span class="lineno"> 352</span> }</div>
|
||||
<div class="line"><span class="lineno"> 353</span> }</div>
|
||||
<div class="line"><span class="lineno"> 354</span>}</div>
|
||||
<div class="ttc" id="amake_pair_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/pair/make_pair.html">std::make_pair</a></div><div class="ttdeci">T make_pair(T... args)</div></div>
|
||||
<div class="ttc" id="apush_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/priority_queue/push.html">std::priority_queue::push</a></div><div class="ttdeci">T push(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
@@ -899,7 +905,7 @@ Here is the call graph for this function:</div>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../da/d6d/namespaceoperations__on__datastructures.html">operations_on_datastructures</a></li><li class="navelem"><b>trie_operations</b></li><li class="navelem"><a class="el" href="../../d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html">Tnode</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<map id="operations_on_datastructures::trie_operations::Tnode::SuggestAutocomplete" name="operations_on_datastructures::trie_operations::Tnode::SuggestAutocomplete">
|
||||
<area shape="rect" id="node1" title="Recursive function to suggest all the entries of trie which have a given common prefix." alt="" coords="5,29,199,85"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="247,44,319,71"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="247,44,319,71"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
270bc1db15b7a22c08b636bad4651395
|
||||
1133d81cf3f12bef523eba7696a8c968
|
||||
@@ -29,7 +29,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="181,-11.5 181,-30.5 235,-30.5 235,-11.5 181,-11.5"/>
|
||||
<text text-anchor="middle" x="208" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -1,5 +1,5 @@
|
||||
<map id="operations_on_datastructures::trie_operations::Tnode::SearchSuggestions" name="operations_on_datastructures::trie_operations::Tnode::SearchSuggestions">
|
||||
<area shape="rect" id="node1" title="Lists out all the words in trie with the longest prefix of the search key that is present in the trie..." alt="" coords="5,5,199,61"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="488,20,560,47"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="488,20,560,47"/>
|
||||
<area shape="rect" id="node3" href="$d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a097913c4badec2b60d50a171ecc299fe" title="Recursive function to suggest all the entries of trie which have a given common prefix." alt="" coords="247,49,440,105"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
c2b800c820352a7d9889647592d0345d
|
||||
e1572ef3f27f60d65f72a4e03999ee0d
|
||||
@@ -23,7 +23,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="362,-44.5 362,-63.5 416,-63.5 416,-44.5 362,-44.5"/>
|
||||
<text text-anchor="middle" x="389" y="-51.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
@@ -1,7 +1,7 @@
|
||||
<map id="operations_on_datastructures::trie_operations::Tnode::SearchFreqSuggestions" name="operations_on_datastructures::trie_operations::Tnode::SearchFreqSuggestions">
|
||||
<area shape="rect" id="node1" title="Lists out the most frequent words in trie with the longest prefix of the search key that is present i..." alt="" coords="5,24,199,80"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="506,6,578,33"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="506,6,578,33"/>
|
||||
<area shape="rect" id="node3" href="$d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#aacafb8c9f3ebac7ac6c01d9645bb67b6" title="Function to display the 3 suggestions with highest frequency of search hits." alt="" coords="247,24,440,80"/>
|
||||
<area shape="rect" id="node4" href="$d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#a9e556f52c837190ecf4265b1f05cfe9c" title="Recursive function to suggest most frequently searched entries of trie which have a given common pref..." alt="" coords="247,128,440,184"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/pair/make_pair.html#" title=" " alt="" coords="488,142,596,169"/>
|
||||
<area shape="rect" id="node5" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/pair/make_pair#" title=" " alt="" coords="488,142,596,169"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
84ab290794e554d0cab82e3e564daaa0
|
||||
8eba025ec118e3cdf46c35238c92b561
|
||||
@@ -23,7 +23,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="375.5,-113.5 375.5,-132.5 429.5,-132.5 429.5,-113.5 375.5,-113.5"/>
|
||||
<text text-anchor="middle" x="402.5" y="-120.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
@@ -84,7 +84,7 @@
|
||||
<!-- Node5 -->
|
||||
<g id="node5" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/pair/make_pair.html#" xlink:title=" ">
|
||||
<g id="a_node5"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/pair/make_pair#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="362,-11.5 362,-30.5 443,-30.5 443,-11.5 362,-11.5"/>
|
||||
<text text-anchor="middle" x="402.5" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::make_pair</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
@@ -1,4 +1,4 @@
|
||||
<map id="operations_on_datastructures::trie_operations::Tnode::SuggestFreqAutocomplete" name="operations_on_datastructures::trie_operations::Tnode::SuggestFreqAutocomplete">
|
||||
<area shape="rect" id="node1" title="Recursive function to suggest most frequently searched entries of trie which have a given common pref..." alt="" coords="5,29,199,85"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/pair/make_pair.html#" title=" " alt="" coords="247,44,355,71"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/utility/pair/make_pair#" title=" " alt="" coords="247,44,355,71"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
896cfcadabf7afb2d9202c9550110287
|
||||
659671bde04a4d26367b6b80ed1633ce
|
||||
@@ -29,7 +29,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/pair/make_pair.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/utility/pair/make_pair#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="181,-11.5 181,-30.5 262,-30.5 262,-11.5 181,-11.5"/>
|
||||
<text text-anchor="middle" x="221.5" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::make_pair</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -1,4 +1,4 @@
|
||||
<map id="operations_on_datastructures::trie_operations::Tnode::SelectionTop_3" name="operations_on_datastructures::trie_operations::Tnode::SelectionTop_3">
|
||||
<area shape="rect" id="node1" title="Function to display the 3 suggestions with highest frequency of search hits." alt="" coords="5,5,199,61"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="247,20,319,47"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="247,20,319,47"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
9d73370c008ac76b3642249572aaa60d
|
||||
b5fab7de2d481ac9e7480a6b1c22cd39
|
||||
@@ -23,7 +23,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="181,-11.5 181,-30.5 235,-30.5 235,-11.5 181,-11.5"/>
|
||||
<text text-anchor="middle" x="208" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -1,4 +1,4 @@
|
||||
<map id="operations_on_datastructures::trie_operations::Tnode::DeleteFrom" name="operations_on_datastructures::trie_operations::Tnode::DeleteFrom">
|
||||
<area shape="rect" id="node1" title="Function recursively deletes the substring character by character iterating through the string to be ..." alt="" coords="5,29,199,85"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size.html#" title=" " alt="" coords="247,44,359,71"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size#" title=" " alt="" coords="247,44,359,71"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
ab250400f33229485d9c85b5013a1515
|
||||
684a5b15e1a76577bbf8f43adba5b8f2
|
||||
@@ -29,7 +29,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="181,-11.5 181,-30.5 265,-30.5 265,-11.5 181,-11.5"/>
|
||||
<text text-anchor="middle" x="223" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::size</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -1,8 +1,8 @@
|
||||
<map id="operations_on_datastructures::trie_operations::Tnode::Delete" name="operations_on_datastructures::trie_operations::Tnode::Delete">
|
||||
<area shape="rect" id="node1" title="Function to verify presence and hence delete an entry from the trie." alt="" coords="5,120,199,176"/>
|
||||
<area shape="rect" id="node2" href="$d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#adef6940391f981ab86767775176b7169" title="Function recursively deletes the substring character by character iterating through the string to be ..." alt="" coords="247,29,440,85"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size.html#" title=" " alt="" coords="488,77,600,104"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="307,160,379,187"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/basic_string/size#" title=" " alt="" coords="488,77,600,104"/>
|
||||
<area shape="rect" id="node4" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="307,160,379,187"/>
|
||||
<area shape="rect" id="node5" href="$d0/d5f/classoperations__on__datastructures_1_1trie__operations_1_1_tnode.html#afca808362c13273ca8c8ae7d58e8eee0" title="Function to count the number of children a node in the trie has." alt="" coords="247,211,440,267"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/count.html#" title=" " alt="" coords="504,225,584,252"/>
|
||||
<area shape="rect" id="node6" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/count#" title=" " alt="" coords="504,225,584,252"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
826521cf28b67c6d7ee998ab138e9f2a
|
||||
328374e83023a0298a2bb15cebddef8d
|
||||
@@ -40,7 +40,7 @@
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/basic_string/size#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="362,-122.5 362,-141.5 446,-141.5 446,-122.5 362,-122.5"/>
|
||||
<text text-anchor="middle" x="404" y="-129.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::string::size</text>
|
||||
</a>
|
||||
@@ -55,7 +55,7 @@
|
||||
<!-- Node4 -->
|
||||
<g id="node4" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node4"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="226.5,-60.5 226.5,-79.5 280.5,-79.5 280.5,-60.5 226.5,-60.5"/>
|
||||
<text text-anchor="middle" x="253.5" y="-67.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
@@ -99,7 +99,7 @@
|
||||
<!-- Node6 -->
|
||||
<g id="node6" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/count.html#" xlink:title=" ">
|
||||
<g id="a_node6"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/count#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="374,-11.5 374,-30.5 434,-30.5 434,-11.5 374,-11.5"/>
|
||||
<text text-anchor="middle" x="404" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::count</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
@@ -1,4 +1,4 @@
|
||||
<map id="operations_on_datastructures::trie_operations::Tnode::numberOfChildren" name="operations_on_datastructures::trie_operations::Tnode::numberOfChildren">
|
||||
<area shape="rect" id="node1" title="Function to count the number of children a node in the trie has." alt="" coords="5,5,199,61"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/count.html#" title=" " alt="" coords="247,20,327,47"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/algorithm/count#" title=" " alt="" coords="247,20,327,47"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
57a020cdc38538a010092672403ed334
|
||||
799504ab3cf4632306c1ada5032a5512
|
||||
@@ -23,7 +23,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/count.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/algorithm/count#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="181,-11.5 181,-30.5 241,-30.5 241,-11.5 181,-11.5"/>
|
||||
<text text-anchor="middle" x="211" y="-18.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::count</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: Member List</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -111,7 +111,7 @@ $(document).ready(function(){initNavTree('dc/db5/struct_queue.html','../../'); i
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<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.2"/>
|
||||
<meta name="generator" content="Doxygen 1.9.3"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: double_hashing Namespace Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<!-- Generated by Doxygen 1.9.3 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
@@ -186,16 +186,16 @@ bool </td><td class="memItemRight" valign="bottom"><b>rehashing</b></td></t
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> {</div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> <span class="comment">// auto* entry = new Entry();</span></div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> <span class="comment">// entry->key = key;</span></div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <span class="keywordtype">int</span> index = <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a8f8ff4fb018e1bb32d67d8a1885d3200">doubleHash</a>(key, <span class="keyword">false</span>);</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> table[index].key = key;</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="comment">// Load factor greater than 0.5 causes resizing</span></div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> <span class="keywordflow">if</span> (++size / <span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(totalSize) >= 0.5) {</div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#af4981819aae8bc7e7beeaef02615e30d">rehash</a>();</div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> }</div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 185</span> {</div>
|
||||
<div class="line"><span class="lineno"> 186</span> <span class="comment">// auto* entry = new Entry();</span></div>
|
||||
<div class="line"><span class="lineno"> 187</span> <span class="comment">// entry->key = key;</span></div>
|
||||
<div class="line"><span class="lineno"> 188</span> <span class="keywordtype">int</span> index = <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a8f8ff4fb018e1bb32d67d8a1885d3200">doubleHash</a>(key, <span class="keyword">false</span>);</div>
|
||||
<div class="line"><span class="lineno"> 189</span> table[index].key = key;</div>
|
||||
<div class="line"><span class="lineno"> 190</span> <span class="comment">// Load factor greater than 0.5 causes resizing</span></div>
|
||||
<div class="line"><span class="lineno"> 191</span> <span class="keywordflow">if</span> (++size / <span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(totalSize) >= 0.5) {</div>
|
||||
<div class="line"><span class="lineno"> 192</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#af4981819aae8bc7e7beeaef02615e30d">rehash</a>();</div>
|
||||
<div class="line"><span class="lineno"> 193</span> }</div>
|
||||
<div class="line"><span class="lineno"> 194</span>}</div>
|
||||
<div class="ttc" id="anamespacedouble__hashing_html_a8f8ff4fb018e1bb32d67d8a1885d3200"><div class="ttname"><a href="../../d0/d65/namespacedouble__hashing.html#a8f8ff4fb018e1bb32d67d8a1885d3200">double_hashing::doubleHash</a></div><div class="ttdeci">int doubleHash(int key, bool searching)</div><div class="ttdoc">Performs double hashing to resolve collisions.</div><div class="ttdef"><b>Definition:</b> double_hash_hash_table.cpp:71</div></div>
|
||||
<div class="ttc" id="anamespacedouble__hashing_html_af4981819aae8bc7e7beeaef02615e30d"><div class="ttname"><a href="../../d0/d65/namespacedouble__hashing.html#af4981819aae8bc7e7beeaef02615e30d">double_hashing::rehash</a></div><div class="ttdeci">void rehash()</div><div class="ttdef"><b>Definition:</b> double_hash_hash_table.cpp:161</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
@@ -228,17 +228,17 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> {</div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Initial table: "</span>;</div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a1e901418c759627557eff359b8db38cd">display</a>();</div>
|
||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"hash of "</span> << key << <span class="stringliteral">" is "</span> << <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a0d90726ed1de7b3d2ae261baed048003">hashFxn</a>(key) << <span class="stringliteral">" % "</span></div>
|
||||
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> << totalSize << <span class="stringliteral">" == "</span> << <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a0d90726ed1de7b3d2ae261baed048003">hashFxn</a>(key) % totalSize;</div>
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a79a9c914a6c68275b3640303d7faad8a">add</a>(key);</div>
|
||||
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"New table: "</span>;</div>
|
||||
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a1e901418c759627557eff359b8db38cd">display</a>();</div>
|
||||
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 212</span> {</div>
|
||||
<div class="line"><span class="lineno"> 213</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Initial table: "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 214</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a1e901418c759627557eff359b8db38cd">display</a>();</div>
|
||||
<div class="line"><span class="lineno"> 215</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 216</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"hash of "</span> << key << <span class="stringliteral">" is "</span> << <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a0d90726ed1de7b3d2ae261baed048003">hashFxn</a>(key) << <span class="stringliteral">" % "</span></div>
|
||||
<div class="line"><span class="lineno"> 217</span> << totalSize << <span class="stringliteral">" == "</span> << <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a0d90726ed1de7b3d2ae261baed048003">hashFxn</a>(key) % totalSize;</div>
|
||||
<div class="line"><span class="lineno"> 218</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 219</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a79a9c914a6c68275b3640303d7faad8a">add</a>(key);</div>
|
||||
<div class="line"><span class="lineno"> 220</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"New table: "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 221</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a1e901418c759627557eff359b8db38cd">display</a>();</div>
|
||||
<div class="line"><span class="lineno"> 222</span>}</div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
|
||||
<div class="ttc" id="anamespacedouble__hashing_html_a0d90726ed1de7b3d2ae261baed048003"><div class="ttname"><a href="../../d0/d65/namespacedouble__hashing.html#a0d90726ed1de7b3d2ae261baed048003">double_hashing::hashFxn</a></div><div class="ttdeci">size_t hashFxn(int key)</div><div class="ttdoc">Hash a key. Uses the STL library's std::hash() function.</div><div class="ttdef"><b>Definition:</b> double_hash_hash_table.cpp:47</div></div>
|
||||
@@ -268,20 +268,20 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Displays the table </p><dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> {</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < totalSize; i++) {</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="keywordflow">if</span> (table[i].key == notPresent) {</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" Empty "</span>;</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (table[i].key == tomb) {</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" Tomb "</span>;</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << table[i].key;</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> }</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> }</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 143</span> {</div>
|
||||
<div class="line"><span class="lineno"> 144</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < totalSize; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 145</span> <span class="keywordflow">if</span> (table[i].key == notPresent) {</div>
|
||||
<div class="line"><span class="lineno"> 146</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" Empty "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 147</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (table[i].key == tomb) {</div>
|
||||
<div class="line"><span class="lineno"> 148</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" Tomb "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 149</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 150</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 151</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << table[i].key;</div>
|
||||
<div class="line"><span class="lineno"> 152</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">" "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 153</span> }</div>
|
||||
<div class="line"><span class="lineno"> 154</span> }</div>
|
||||
<div class="line"><span class="lineno"> 155</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 156</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -328,48 +328,48 @@ Here is the call graph for this function:</div>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Index of key when found </dd>
|
||||
<dd>
|
||||
new hash if no conflicts present </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> {</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordtype">int</span> hash = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(<a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a0d90726ed1de7b3d2ae261baed048003">hashFxn</a>(key));</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_struct" href="../../d9/dde/structdouble__hashing_1_1_entry.html">Entry</a> entry;</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordflow">do</span> {</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordtype">int</span> index =</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(hash + (i * <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a33968a1178289ab61445dd4000df7082">otherHashFxn</a>(key))) % totalSize;</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> entry = table[index];</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordflow">if</span> (searching) {</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">if</span> (entry.<a class="code hl_variable" href="../../d9/dde/structdouble__hashing_1_1_entry.html#ae114967c89dbba3b754dc4976bba3248">key</a> == notPresent) {</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordflow">return</span> notPresent;</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> }</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a29f543e2626bad58907661e1e45028a6">searchingProber</a>(entry, key)) {</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Found key!"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordflow">return</span> index;</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> }</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Found tombstone or equal hash, checking next"</span></div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> i++;</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#ac2adfce49ac57f6dbd1778d2c1ce0d2b">putProber</a>(entry, key)) {</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordflow">if</span> (!rehashing) {</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Spot found!"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> }</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">return</span> index;</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> }</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">if</span> (!rehashing) {</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Spot taken, looking at next (next index:"</span></div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> << <span class="stringliteral">" "</span></div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> << <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(<a class="code hl_function" href="../../d5/d96/md5_8cpp.html#a88705fab5f92adf3427b4cf76ff33edb">hash</a> + (i * <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a33968a1178289ab61445dd4000df7082">otherHashFxn</a>(key))) %</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> totalSize</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> << <span class="stringliteral">")"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> }</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> i++;</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> }</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordflow">if</span> (i == totalSize * 100) {</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"DoubleHash probe failed"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">return</span> notPresent;</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> }</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> } <span class="keywordflow">while</span> (entry.<a class="code hl_variable" href="../../d9/dde/structdouble__hashing_1_1_entry.html#ae114967c89dbba3b754dc4976bba3248">key</a> != notPresent);</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordflow">return</span> notPresent;</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 71</span> {</div>
|
||||
<div class="line"><span class="lineno"> 72</span> <span class="keywordtype">int</span> hash = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(<a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a0d90726ed1de7b3d2ae261baed048003">hashFxn</a>(key));</div>
|
||||
<div class="line"><span class="lineno"> 73</span> <span class="keywordtype">int</span> i = 0;</div>
|
||||
<div class="line"><span class="lineno"> 74</span> <a class="code hl_struct" href="../../d9/dde/structdouble__hashing_1_1_entry.html">Entry</a> entry;</div>
|
||||
<div class="line"><span class="lineno"> 75</span> <span class="keywordflow">do</span> {</div>
|
||||
<div class="line"><span class="lineno"> 76</span> <span class="keywordtype">int</span> index =</div>
|
||||
<div class="line"><span class="lineno"> 77</span> <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(hash + (i * <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a33968a1178289ab61445dd4000df7082">otherHashFxn</a>(key))) % totalSize;</div>
|
||||
<div class="line"><span class="lineno"> 78</span> entry = table[index];</div>
|
||||
<div class="line"><span class="lineno"> 79</span> <span class="keywordflow">if</span> (searching) {</div>
|
||||
<div class="line"><span class="lineno"> 80</span> <span class="keywordflow">if</span> (entry.<a class="code hl_variable" href="../../d9/dde/structdouble__hashing_1_1_entry.html#ae114967c89dbba3b754dc4976bba3248">key</a> == notPresent) {</div>
|
||||
<div class="line"><span class="lineno"> 81</span> <span class="keywordflow">return</span> notPresent;</div>
|
||||
<div class="line"><span class="lineno"> 82</span> }</div>
|
||||
<div class="line"><span class="lineno"> 83</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a29f543e2626bad58907661e1e45028a6">searchingProber</a>(entry, key)) {</div>
|
||||
<div class="line"><span class="lineno"> 84</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Found key!"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 85</span> <span class="keywordflow">return</span> index;</div>
|
||||
<div class="line"><span class="lineno"> 86</span> }</div>
|
||||
<div class="line"><span class="lineno"> 87</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Found tombstone or equal hash, checking next"</span></div>
|
||||
<div class="line"><span class="lineno"> 88</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 89</span> i++;</div>
|
||||
<div class="line"><span class="lineno"> 90</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 91</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#ac2adfce49ac57f6dbd1778d2c1ce0d2b">putProber</a>(entry, key)) {</div>
|
||||
<div class="line"><span class="lineno"> 92</span> <span class="keywordflow">if</span> (!rehashing) {</div>
|
||||
<div class="line"><span class="lineno"> 93</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Spot found!"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 94</span> }</div>
|
||||
<div class="line"><span class="lineno"> 95</span> <span class="keywordflow">return</span> index;</div>
|
||||
<div class="line"><span class="lineno"> 96</span> }</div>
|
||||
<div class="line"><span class="lineno"> 97</span> <span class="keywordflow">if</span> (!rehashing) {</div>
|
||||
<div class="line"><span class="lineno"> 98</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Spot taken, looking at next (next index:"</span></div>
|
||||
<div class="line"><span class="lineno"> 99</span> << <span class="stringliteral">" "</span></div>
|
||||
<div class="line"><span class="lineno"> 100</span> << <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(<a class="code hl_function" href="../../d5/d96/md5_8cpp.html#a88705fab5f92adf3427b4cf76ff33edb">hash</a> + (i * <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a33968a1178289ab61445dd4000df7082">otherHashFxn</a>(key))) %</div>
|
||||
<div class="line"><span class="lineno"> 101</span> totalSize</div>
|
||||
<div class="line"><span class="lineno"> 102</span> << <span class="stringliteral">")"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 103</span> }</div>
|
||||
<div class="line"><span class="lineno"> 104</span> i++;</div>
|
||||
<div class="line"><span class="lineno"> 105</span> }</div>
|
||||
<div class="line"><span class="lineno"> 106</span> <span class="keywordflow">if</span> (i == totalSize * 100) {</div>
|
||||
<div class="line"><span class="lineno"> 107</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"DoubleHash probe failed"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 108</span> <span class="keywordflow">return</span> notPresent;</div>
|
||||
<div class="line"><span class="lineno"> 109</span> }</div>
|
||||
<div class="line"><span class="lineno"> 110</span> } <span class="keywordflow">while</span> (entry.<a class="code hl_variable" href="../../d9/dde/structdouble__hashing_1_1_entry.html#ae114967c89dbba3b754dc4976bba3248">key</a> != notPresent);</div>
|
||||
<div class="line"><span class="lineno"> 111</span> <span class="keywordflow">return</span> notPresent;</div>
|
||||
<div class="line"><span class="lineno"> 112</span>}</div>
|
||||
<div class="ttc" id="amd5_8cpp_html_a88705fab5f92adf3427b4cf76ff33edb"><div class="ttname"><a href="../../d5/d96/md5_8cpp.html#a88705fab5f92adf3427b4cf76ff33edb">hashing::md5::hash</a></div><div class="ttdeci">void * hash(const std::string &message)</div><div class="ttdoc">Converts the string to bytestring and calls the main algorithm.</div><div class="ttdef"><b>Definition:</b> md5.cpp:287</div></div>
|
||||
<div class="ttc" id="anamespacedouble__hashing_html_a29f543e2626bad58907661e1e45028a6"><div class="ttname"><a href="../../d0/d65/namespacedouble__hashing.html#a29f543e2626bad58907661e1e45028a6">double_hashing::searchingProber</a></div><div class="ttdeci">bool searchingProber(const Entry &entry, int key)</div><div class="ttdef"><b>Definition:</b> double_hash_hash_table.cpp:133</div></div>
|
||||
<div class="ttc" id="anamespacedouble__hashing_html_a33968a1178289ab61445dd4000df7082"><div class="ttname"><a href="../../d0/d65/namespacedouble__hashing.html#a33968a1178289ab61445dd4000df7082">double_hashing::otherHashFxn</a></div><div class="ttdeci">size_t otherHashFxn(int key)</div><div class="ttdoc">Used for second hash function.</div><div class="ttdef"><b>Definition:</b> double_hash_hash_table.cpp:58</div></div>
|
||||
@@ -409,10 +409,10 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>hash value of the key </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> {</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/hash.html">std::hash<int></a> hash;</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">return</span> hash(key);</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 47</span> {</div>
|
||||
<div class="line"><span class="lineno"> 48</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/hash.html">std::hash<int></a> hash;</div>
|
||||
<div class="line"><span class="lineno"> 49</span> <span class="keywordflow">return</span> hash(key);</div>
|
||||
<div class="line"><span class="lineno"> 50</span>}</div>
|
||||
<div class="ttc" id="ahash_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/utility/hash.html">std::hash</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
@@ -441,10 +441,10 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>hash value of the key </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> {</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/hash.html">std::hash<int></a> hash;</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordflow">return</span> 1 + (7 - (hash(key) % 7));</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 58</span> {</div>
|
||||
<div class="line"><span class="lineno"> 59</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/utility/hash.html">std::hash<int></a> hash;</div>
|
||||
<div class="line"><span class="lineno"> 60</span> <span class="keywordflow">return</span> 1 + (7 - (hash(key) % 7));</div>
|
||||
<div class="line"><span class="lineno"> 61</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -483,12 +483,12 @@ Here is the call graph for this function:</div>
|
||||
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if key is not present or is a <code>toumb</code> </dd>
|
||||
<dd>
|
||||
<code>false</code> is already occupied </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> {</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keywordflow">if</span> (entry.<a class="code hl_variable" href="../../d9/dde/structdouble__hashing_1_1_entry.html#ae114967c89dbba3b754dc4976bba3248">key</a> == notPresent || entry.<a class="code hl_variable" href="../../d9/dde/structdouble__hashing_1_1_entry.html#ae114967c89dbba3b754dc4976bba3248">key</a> == tomb) {</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> }</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 120</span> {</div>
|
||||
<div class="line"><span class="lineno"> 121</span> <span class="keywordflow">if</span> (entry.<a class="code hl_variable" href="../../d9/dde/structdouble__hashing_1_1_entry.html#ae114967c89dbba3b754dc4976bba3248">key</a> == notPresent || entry.<a class="code hl_variable" href="../../d9/dde/structdouble__hashing_1_1_entry.html#ae114967c89dbba3b754dc4976bba3248">key</a> == tomb) {</div>
|
||||
<div class="line"><span class="lineno"> 122</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 123</span> }</div>
|
||||
<div class="line"><span class="lineno"> 124</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 125</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -507,26 +507,26 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Rehashes the table into a bigger table </p><dl class="section return"><dt>Returns</dt><dd>None </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> {</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="comment">// Necessary so wall of add info isn't printed all at once</span></div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> rehashing = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <span class="keywordtype">int</span> oldSize = totalSize;</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Entry></a> oldTable(table);</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="comment">// Really this should use the next prime number greater than totalSize * 2</span></div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> table = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Entry></a>(totalSize * 2);</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> totalSize *= 2;</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < oldSize; i++) {</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="keywordflow">if</span> (oldTable[i].key != -1 && oldTable[i].key != notPresent) {</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> size--; <span class="comment">// Size stays the same (add increments size)</span></div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a79a9c914a6c68275b3640303d7faad8a">add</a>(oldTable[i].key);</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> }</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> }</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="comment">// delete[] oldTable;</span></div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <span class="comment">// oldTable.reset();</span></div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> </div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> rehashing = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Table was rehashed, new size is: "</span> << totalSize << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 161</span> {</div>
|
||||
<div class="line"><span class="lineno"> 162</span> <span class="comment">// Necessary so wall of add info isn't printed all at once</span></div>
|
||||
<div class="line"><span class="lineno"> 163</span> rehashing = <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 164</span> <span class="keywordtype">int</span> oldSize = totalSize;</div>
|
||||
<div class="line"><span class="lineno"> 165</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Entry></a> oldTable(table);</div>
|
||||
<div class="line"><span class="lineno"> 166</span> <span class="comment">// Really this should use the next prime number greater than totalSize * 2</span></div>
|
||||
<div class="line"><span class="lineno"> 167</span> table = <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector<Entry></a>(totalSize * 2);</div>
|
||||
<div class="line"><span class="lineno"> 168</span> totalSize *= 2;</div>
|
||||
<div class="line"><span class="lineno"> 169</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < oldSize; i++) {</div>
|
||||
<div class="line"><span class="lineno"> 170</span> <span class="keywordflow">if</span> (oldTable[i].key != -1 && oldTable[i].key != notPresent) {</div>
|
||||
<div class="line"><span class="lineno"> 171</span> size--; <span class="comment">// Size stays the same (add increments size)</span></div>
|
||||
<div class="line"><span class="lineno"> 172</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a79a9c914a6c68275b3640303d7faad8a">add</a>(oldTable[i].key);</div>
|
||||
<div class="line"><span class="lineno"> 173</span> }</div>
|
||||
<div class="line"><span class="lineno"> 174</span> }</div>
|
||||
<div class="line"><span class="lineno"> 175</span> <span class="comment">// delete[] oldTable;</span></div>
|
||||
<div class="line"><span class="lineno"> 176</span> <span class="comment">// oldTable.reset();</span></div>
|
||||
<div class="line"><span class="lineno"> 177</span> </div>
|
||||
<div class="line"><span class="lineno"> 178</span> rehashing = <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 179</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Table was rehashed, new size is: "</span> << totalSize << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 180</span>}</div>
|
||||
<div class="ttc" id="avector_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/vector.html">std::vector</a></div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -558,17 +558,17 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> {</div>
|
||||
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Initial table: "</span>;</div>
|
||||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a1e901418c759627557eff359b8db38cd">display</a>();</div>
|
||||
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"hash of "</span> << key << <span class="stringliteral">" is "</span> << <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a0d90726ed1de7b3d2ae261baed048003">hashFxn</a>(key) << <span class="stringliteral">" % "</span></div>
|
||||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> << totalSize << <span class="stringliteral">" == "</span> << <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a0d90726ed1de7b3d2ae261baed048003">hashFxn</a>(key) % totalSize;</div>
|
||||
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a28083ecac6eb94b643281875c8665931">remove</a>(key);</div>
|
||||
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"New table: "</span>;</div>
|
||||
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a1e901418c759627557eff359b8db38cd">display</a>();</div>
|
||||
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 227</span> {</div>
|
||||
<div class="line"><span class="lineno"> 228</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Initial table: "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 229</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a1e901418c759627557eff359b8db38cd">display</a>();</div>
|
||||
<div class="line"><span class="lineno"> 230</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 231</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"hash of "</span> << key << <span class="stringliteral">" is "</span> << <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a0d90726ed1de7b3d2ae261baed048003">hashFxn</a>(key) << <span class="stringliteral">" % "</span></div>
|
||||
<div class="line"><span class="lineno"> 232</span> << totalSize << <span class="stringliteral">" == "</span> << <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a0d90726ed1de7b3d2ae261baed048003">hashFxn</a>(key) % totalSize;</div>
|
||||
<div class="line"><span class="lineno"> 233</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 234</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a28083ecac6eb94b643281875c8665931">remove</a>(key);</div>
|
||||
<div class="line"><span class="lineno"> 235</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"New table: "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 236</span> <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a1e901418c759627557eff359b8db38cd">display</a>();</div>
|
||||
<div class="line"><span class="lineno"> 237</span>}</div>
|
||||
<div class="ttc" id="anamespacedouble__hashing_html_a28083ecac6eb94b643281875c8665931"><div class="ttname"><a href="../../d0/d65/namespacedouble__hashing.html#a28083ecac6eb94b643281875c8665931">double_hashing::remove</a></div><div class="ttdeci">void remove(int key)</div><div class="ttdef"><b>Definition:</b> double_hash_hash_table.cpp:199</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -600,15 +600,15 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> {</div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> <span class="keywordtype">int</span> index = <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a8f8ff4fb018e1bb32d67d8a1885d3200">doubleHash</a>(key, <span class="keyword">true</span>);</div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> <span class="keywordflow">if</span> (index == notPresent) {</div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"key not found"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> }</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> table[index].key = tomb;</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Removal successful, leaving tombstone"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> size--;</div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 199</span> {</div>
|
||||
<div class="line"><span class="lineno"> 200</span> <span class="keywordtype">int</span> index = <a class="code hl_function" href="../../d0/d65/namespacedouble__hashing.html#a8f8ff4fb018e1bb32d67d8a1885d3200">doubleHash</a>(key, <span class="keyword">true</span>);</div>
|
||||
<div class="line"><span class="lineno"> 201</span> <span class="keywordflow">if</span> (index == notPresent) {</div>
|
||||
<div class="line"><span class="lineno"> 202</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"key not found"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 203</span> }</div>
|
||||
<div class="line"><span class="lineno"> 204</span> table[index].key = tomb;</div>
|
||||
<div class="line"><span class="lineno"> 205</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Removal successful, leaving tombstone"</span> << <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
|
||||
<div class="line"><span class="lineno"> 206</span> size--;</div>
|
||||
<div class="line"><span class="lineno"> 207</span>}</div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
@@ -653,12 +653,12 @@ Here is the call graph for this function:</div>
|
||||
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if found </dd>
|
||||
<dd>
|
||||
<code>false</code> if not found </dd></dl>
|
||||
<div class="fragment"><div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> {</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keywordflow">if</span> (entry.<a class="code hl_variable" href="../../d9/dde/structdouble__hashing_1_1_entry.html#ae114967c89dbba3b754dc4976bba3248">key</a> == key) {</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> }</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span>}</div>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 133</span> {</div>
|
||||
<div class="line"><span class="lineno"> 134</span> <span class="keywordflow">if</span> (entry.<a class="code hl_variable" href="../../d9/dde/structdouble__hashing_1_1_entry.html#ae114967c89dbba3b754dc4976bba3248">key</a> == key) {</div>
|
||||
<div class="line"><span class="lineno"> 135</span> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line"><span class="lineno"> 136</span> }</div>
|
||||
<div class="line"><span class="lineno"> 137</span> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"><span class="lineno"> 138</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -668,7 +668,7 @@ Here is the call graph for this function:</div>
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../d0/d65/namespacedouble__hashing.html">double_hashing</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<map id="double_hashing::display" name="double_hashing::display">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,5,167,32"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="215,5,287,32"/>
|
||||
<area shape="rect" id="node2" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="215,5,287,32"/>
|
||||
</map>
|
||||
|
||||
@@ -1 +1 @@
|
||||
cab5710760fa96f48aaf390ee8bbad1a
|
||||
6bd7e2f5f0dd409995f1bfa23e98f229
|
||||
@@ -21,7 +21,7 @@
|
||||
<!-- Node2 -->
|
||||
<g id="node2" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node2"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="157,-0.5 157,-19.5 211,-19.5 211,-0.5 157,-0.5"/>
|
||||
<text text-anchor="middle" x="184" y="-7.5" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -1,7 +1,7 @@
|
||||
<map id="double_hashing::remove" name="double_hashing::remove">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,56,168,83"/>
|
||||
<area shape="rect" id="node2" href="$d0/d65/namespacedouble__hashing.html#a8f8ff4fb018e1bb32d67d8a1885d3200" title="Performs double hashing to resolve collisions." alt="" coords="216,81,405,108"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="519,5,591,32"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="519,5,591,32"/>
|
||||
<area shape="rect" id="node4" href="$d0/d65/namespacedouble__hashing.html#a0d90726ed1de7b3d2ae261baed048003" title="Hash a key. Uses the STL library's std::hash() function." alt="" coords="469,56,640,83"/>
|
||||
<area shape="rect" id="node5" href="$d0/d65/namespacedouble__hashing.html#a33968a1178289ab61445dd4000df7082" title="Used for second hash function." alt="" coords="453,107,656,133"/>
|
||||
<area shape="rect" id="node6" href="$d0/d65/namespacedouble__hashing.html#ac2adfce49ac57f6dbd1778d2c1ce0d2b" title=" " alt="" coords="467,157,643,184"/>
|
||||
|
||||
@@ -1 +1 @@
|
||||
fb4767eea81b3f03911226bb3a2fe9b7
|
||||
5163996df12bac3bf703c0dbbd8a85b4
|
||||
@@ -36,7 +36,7 @@
|
||||
<!-- Node3 -->
|
||||
<g id="node3" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl.html#" xlink:title=" ">
|
||||
<g id="a_node3"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/manip/endl#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="black" points="385,-164 385,-183 439,-183 439,-164 385,-164"/>
|
||||
<text text-anchor="middle" x="412" y="-171" font-family="Helvetica,sans-Serif" font-size="10.00">std::endl</text>
|
||||
</a>
|
||||
|
||||
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
@@ -1,7 +1,7 @@
|
||||
<map id="double_hashing::removalInfo" name="double_hashing::removalInfo">
|
||||
<area shape="rect" id="node1" title=" " alt="" coords="5,49,193,75"/>
|
||||
<area shape="rect" id="node2" href="$d0/d65/namespacedouble__hashing.html#a1e901418c759627557eff359b8db38cd" title=" " alt="" coords="466,23,627,50"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl.html#" title=" " alt="" coords="755,15,827,42"/>
|
||||
<area shape="rect" id="node3" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/manip/endl#" title=" " alt="" coords="755,15,827,42"/>
|
||||
<area shape="rect" id="node4" href="$d0/d65/namespacedouble__hashing.html#a0d90726ed1de7b3d2ae261baed048003" title="Hash a key. Uses the STL library's std::hash() function." alt="" coords="705,234,876,261"/>
|
||||
<area shape="rect" id="node5" href="$d0/d65/namespacedouble__hashing.html#a28083ecac6eb94b643281875c8665931" title=" " alt="" coords="241,74,404,101"/>
|
||||
<area shape="rect" id="node6" href="$d0/d65/namespacedouble__hashing.html#a8f8ff4fb018e1bb32d67d8a1885d3200" title="Performs double hashing to resolve collisions." alt="" coords="452,125,641,151"/>
|
||||
|
||||