Documentation for db149bf3b7

This commit is contained in:
github-actions
2022-09-02 14:36:25 +00:00
parent ca6acdc719
commit 766f10286e
5464 changed files with 92674 additions and 78796 deletions

View File

@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: dynamic_programming/longest_palindromic_subsequence.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -41,10 +41,10 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
@@ -84,9 +84,16 @@ $(document).ready(function(){initNavTree('d0/d77/longest__palindromic__subsequen
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
@@ -105,7 +112,7 @@ $(document).ready(function(){initNavTree('d0/d77/longest__palindromic__subsequen
</div><div class="textblock"><div class="dynheader">
Include dependency graph for longest_palindromic_subsequence.cpp:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="../../da/dc1/longest__palindromic__subsequence_8cpp__incl.svg" width="355" height="142"><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="../../da/dc1/longest__palindromic__subsequence_8cpp__incl.svg" width="355" height="139"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div><table class="memberdecls">
@@ -124,7 +131,7 @@ Functions</h2></td></tr>
<dl class="section author"><dt>Author</dt><dd><a href="https://github.com/anjali1903" target="_blank">Anjali Jha</a> </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a6f73ddd8cd83d784036f131dfc6540c4" name="a6f73ddd8cd83d784036f131dfc6540c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f73ddd8cd83d784036f131dfc6540c4">&#9670;&nbsp;</a></span>lps()</h2>
<h2 class="memtitle"><span class="permalink"><a href="#a6f73ddd8cd83d784036f131dfc6540c4">&#9670;&#160;</a></span>lps()</h2>
<div class="memitem">
<div class="memproto">
@@ -162,7 +169,7 @@ Functions</h2></td></tr>
<div class="line"><span class="lineno"> 45</span> <span class="comment">// Length of longest palindromic subsequence</span></div>
<div class="line"><span class="lineno"> 46</span> <span class="keywordtype">int</span> idx = res[m][m];</div>
<div class="line"><span class="lineno"> 47</span> <span class="comment">// Creating string of index+1 length</span></div>
<div class="line"><span class="lineno"> 48</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <a class="code hl_function" href="../../d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa">ans</a>(idx + 1, <span class="charliteral">&#39;\0&#39;</span>);</div>
<div class="line"><span class="lineno"> 48</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> ans(idx + 1, <span class="charliteral">&#39;\0&#39;</span>);</div>
<div class="line"><span class="lineno"> 49</span> <span class="keywordtype">int</span> i = m, j = m;</div>
<div class="line"><span class="lineno"> 50</span> </div>
<div class="line"><span class="lineno"> 51</span> <span class="comment">// starting from right-most bottom-most corner</span></div>
@@ -171,7 +178,7 @@ Functions</h2></td></tr>
<div class="line"><span class="lineno"> 54</span> <span class="comment">// if current characters in a and b are same</span></div>
<div class="line"><span class="lineno"> 55</span> <span class="comment">// then it is a part of the ans</span></div>
<div class="line"><span class="lineno"> 56</span> <span class="keywordflow">if</span> (a[i - 1] == b[j - 1]) {</div>
<div class="line"><span class="lineno"> 57</span> <a class="code hl_function" href="../../d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa">ans</a>[idx - 1] = a[i - 1];</div>
<div class="line"><span class="lineno"> 57</span> ans[idx - 1] = a[i - 1];</div>
<div class="line"><span class="lineno"> 58</span> i--;</div>
<div class="line"><span class="lineno"> 59</span> j--;</div>
<div class="line"><span class="lineno"> 60</span> idx--;</div>
@@ -185,26 +192,25 @@ Functions</h2></td></tr>
<div class="line"><span class="lineno"> 68</span> }</div>
<div class="line"><span class="lineno"> 69</span> }</div>
<div class="line"><span class="lineno"> 70</span> </div>
<div class="line"><span class="lineno"> 71</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa">ans</a>;</div>
<div class="line"><span class="lineno"> 71</span> <span class="keywordflow">return</span> ans;</div>
<div class="line"><span class="lineno"> 72</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="abegin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/begin.html">std::string::begin</a></div><div class="ttdeci">T begin(T... args)</div></div>
<div class="ttc" id="aend_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string/end.html">std::string::end</a></div><div class="ttdeci">T end(T... args)</div></div>
<div class="ttc" id="amatrix__exponentiation_8cpp_html_ad8389ed58fd0ec66df248014775ad1fa"><div class="ttname"><a href="../../d7/d35/matrix__exponentiation_8cpp.html#ad8389ed58fd0ec66df248014775ad1fa">ans</a></div><div class="ttdeci">ll ans(ll n)</div><div class="ttdef"><b>Definition:</b> matrix_exponentiation.cpp:91</div></div>
<div class="ttc" id="amax_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/max.html">std::max</a></div><div class="ttdeci">T max(T... args)</div></div>
<div class="ttc" id="areverse_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/algorithm/reverse.html">std::reverse</a></div><div class="ttdeci">T reverse(T... args)</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><!-- 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/d77/longest__palindromic__subsequence_8cpp_a6f73ddd8cd83d784036f131dfc6540c4_cgraph.svg" width="216" height="190"><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/d77/longest__palindromic__subsequence_8cpp_a6f73ddd8cd83d784036f131dfc6540c4_cgraph.svg" width="216" height="135"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
<a id="ae66f6b31b5ad750f1fe042a706a4e3d4" name="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&nbsp;</a></span>main()</h2>
<h2 class="memtitle"><span class="permalink"><a href="#ae66f6b31b5ad750f1fe042a706a4e3d4">&#9670;&#160;</a></span>main()</h2>
<div class="memitem">
<div class="memproto">
@@ -227,14 +233,14 @@ Here is the call graph for this function:</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/d77/longest__palindromic__subsequence_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="407" height="190"><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/d77/longest__palindromic__subsequence_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg" width="407" height="135"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div>
</div>
<a id="ae1a3968e7947464bee7714f6d43b7002" name="ae1a3968e7947464bee7714f6d43b7002"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1a3968e7947464bee7714f6d43b7002">&#9670;&nbsp;</a></span>test()</h2>
<h2 class="memtitle"><span class="permalink"><a href="#ae1a3968e7947464bee7714f6d43b7002">&#9670;&#160;</a></span>test()</h2>
<div class="memitem">
<div class="memproto">
@@ -260,7 +266,7 @@ Here is the call graph for this function:</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/d77/longest__palindromic__subsequence_8cpp_ae1a3968e7947464bee7714f6d43b7002_cgraph.svg" width="308" height="190"><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/d77/longest__palindromic__subsequence_8cpp_ae1a3968e7947464bee7714f6d43b7002_cgraph.svg" width="308" height="135"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
@@ -272,7 +278,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_8a20dd5bfd5341a725342bf72b6b686f.html">dynamic_programming</a></li><li class="navelem"><a class="el" href="../../d0/d77/longest__palindromic__subsequence_8cpp.html">longest_palindromic_subsequence.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.4 </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.5 </li>
</ul>
</div>
</body>