Skip to content

Commit

Permalink
Documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
spirosmaggioros committed Jul 6, 2024
1 parent c27f8fd commit 7120d56
Show file tree
Hide file tree
Showing 95 changed files with 3,419 additions and 2,088 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ You can see more [examples](/examples) or follow the [Tutorials](/tutorial).
- [X] [Splay Tree](https://en.wikipedia.org/wiki/Splay_tree)
- [X] [Trie](https://en.wikipedia.org/wiki/Trie)
- [X] [Interval Tree](https://en.wikipedia.org/wiki/Interval_tree)
- [X] [234 Tree](https://en.wikipedia.org/wiki/2%E2%80%933%E2%80%934_tree)
- [X] [Min/Max Heap](https://en.wikipedia.org/wiki/Min-max_heap)

**Lists**
Expand Down
357 changes: 357 additions & 0 deletions docs/html/234__tree_8h_source.html

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion docs/html/annotated.html
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@
<tr id="row_37_" class="odd"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_37_" class="arrow" onclick="dynsection.toggleFolder('37_')">&#9658;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtree.html" target="_self">tree</a></td><td class="desc">Tree class </td></tr>
<tr id="row_37_0_" class="even" style="display:none;"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtree_1_1_iterator.html" target="_self">Iterator</a></td><td class="desc"></td></tr>
<tr id="row_38_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classtrie.html" target="_self">trie</a></td><td class="desc">Trie class </td></tr>
<tr id="row_39_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classweighted__graph.html" target="_self">weighted_graph</a></td><td class="desc">Class for weighted graph </td></tr>
<tr id="row_39_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classttf__tree.html" target="_self">ttf_tree</a></td><td class="desc">234-tree class </td></tr>
<tr id="row_40_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="classweighted__graph.html" target="_self">weighted_graph</a></td><td class="desc">Class for weighted graph </td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
Expand Down
502 changes: 250 additions & 252 deletions docs/html/avl__tree_8h_source.html

Large diffs are not rendered by default.

40 changes: 39 additions & 1 deletion docs/html/binary__search_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,45 @@
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordflow">return</span> -1; <span class="comment">// element not found</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span>}</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span>int64_t lower_bound(std::vector&lt;T&gt; arr, int64_t left, int64_t right, T x) {</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> int64_t result = right, mid =0;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> --right;</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordflow">while</span> (left &lt;= right) {</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> mid = left + (right - left) / 2;</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">if</span> (arr[mid] &gt;= x) {</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> result = mid;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="comment">//look for smaller index on the left</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> right = mid - 1;</div>
<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">else</span> {</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> left = mid + 1; <span class="comment">// look on the right</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</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> result;</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> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span>int64_t upper_bound(std::vector&lt;T&gt; arr, int64_t left, int64_t right, T x) {</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> int64_t result = right,mid =0;</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> --right;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordflow">while</span> (left &lt;= right) {</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> mid = left + (right-left) / 2;</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordflow">if</span> (arr[mid] &gt; x) {</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> result = mid;</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="comment">//look for smaller index on the left</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> right = mid - 1;</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> }</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> left = mid + 1; <span class="comment">// look on the right</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> }</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">return</span> result;</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span>}</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="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Expand Down
Loading

0 comments on commit 7120d56

Please sign in to comment.