Files
C-Plus-Plus/d5/d67/complex__numbers_8cpp_source.html
2025-05-19 11:38:33 +00:00

342 lines
45 KiB
HTML

<!-- HTML header for doxygen 1.12.0-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TheAlgorithms/C++: math/complex_numbers.cpp Source File</title>
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
window.MathJax = {
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
},
loader: {
load: ['[tex]/ams']
},
tex: {
macros: {},
packages: ['base','configmacros','ams']
}
};
</script>
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
<td id="projectalign">
<div id="projectname">TheAlgorithms/C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">All the algorithms implemented in C++</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('../../',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('d5/d67/complex__numbers_8cpp_source.html','../../'); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="headertitle"><div class="title">complex_numbers.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d5/d67/complex__numbers_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include &lt;cassert&gt;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#include &lt;cmath&gt;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include &lt;complex&gt;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include &lt;ctime&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include &lt;stdexcept&gt;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span></div>
<div class="foldopen" id="foldopen00020" data-start="{" data-end="};">
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="../../da/d5a/class_complex.html"> 20</a></span><span class="keyword">class </span><a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> {</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="comment">// The real value of the complex number</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="keywordtype">double</span> re;</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="comment">// The imaginary value of the complex number</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keywordtype">double</span> im;</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keyword">public</span>:</div>
<div class="foldopen" id="foldopen00043" data-start="{" data-end="}">
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867"> 43</a></span> <span class="keyword">explicit</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a>(<span class="keywordtype">double</span> x = 0.f, <span class="keywordtype">double</span> y = 0.f, <span class="keywordtype">bool</span> is_polar = <span class="keyword">false</span>) {</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">if</span> (!is_polar) {</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> re = x;</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> im = y;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">return</span>;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> }</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> re = x * std::cos(y);</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> im = x * std::sin(y);</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> }</div>
</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="../../da/d5a/class_complex.html#a466cd7b664cc6a864937ceb3dead1323"> 58</a></span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a466cd7b664cc6a864937ceb3dead1323">Complex</a>(<span class="keyword">const</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> &amp;other) : re(other.<a class="code hl_function" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a>()), im(other.<a class="code hl_function" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>()) {}</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6"> 64</a></span> <span class="keywordtype">double</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;re; }</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"><a class="line" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974"> 70</a></span> <span class="keywordtype">double</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;im; }</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span></div>
<div class="foldopen" id="foldopen00079" data-start="{" data-end="}">
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="../../da/d5a/class_complex.html#ae5b51b749ea4964104b9527af9d8f556"> 79</a></span> <span class="keywordtype">double</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#ae5b51b749ea4964104b9527af9d8f556">abs</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordflow">return</span> std::sqrt(this-&gt;re * this-&gt;re + this-&gt;im * this-&gt;im);</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> }</div>
</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"><a class="line" href="../../da/d5a/class_complex.html#ae1e03712837450549e0c9b4017533a41"> 87</a></span> <span class="keywordtype">double</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#ae1e03712837450549e0c9b4017533a41">arg</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> std::atan2(this-&gt;im, this-&gt;re); }</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span></div>
<div class="foldopen" id="foldopen00095" data-start="{" data-end="}">
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="../../da/d5a/class_complex.html#a820afcbb330df716577459d7a3aa3a1c"> 95</a></span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> <a class="code hl_function" href="../../da/d5a/class_complex.html#a820afcbb330df716577459d7a3aa3a1c">operator+</a>(<span class="keyword">const</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> &amp;other) {</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> result(this-&gt;re + other.re, this-&gt;im + other.im);</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> }</div>
</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span></div>
<div class="foldopen" id="foldopen00106" data-start="{" data-end="}">
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"><a class="line" href="../../da/d5a/class_complex.html#a36739619a07b5478bcd8a28ad2f8b7da"> 106</a></span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> <a class="code hl_function" href="../../da/d5a/class_complex.html#a36739619a07b5478bcd8a28ad2f8b7da">operator-</a>(<span class="keyword">const</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> &amp;other) {</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> result(this-&gt;re - other.re, this-&gt;im - other.im);</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> }</div>
</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span></div>
<div class="foldopen" id="foldopen00117" data-start="{" data-end="}">
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"><a class="line" href="../../da/d5a/class_complex.html#aa9b4a7d6083ca7040ddd4fe93db5c19d"> 117</a></span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> <a class="code hl_function" href="../../da/d5a/class_complex.html#aa9b4a7d6083ca7040ddd4fe93db5c19d">operator*</a>(<span class="keyword">const</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> &amp;other) {</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> result(this-&gt;re * other.re - this-&gt;im * other.im,</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> this-&gt;re * other.im + this-&gt;im * other.re);</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> }</div>
</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span></div>
<div class="foldopen" id="foldopen00130" data-start="{" data-end="}">
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"><a class="line" href="../../da/d5a/class_complex.html#a8d5427f6c42c15283031d73e1418c59d"> 130</a></span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> <a class="code hl_function" href="../../da/d5a/class_complex.html#a8d5427f6c42c15283031d73e1418c59d">operator~</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> result(this-&gt;re, -(this-&gt;im));</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> }</div>
</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span></div>
<div class="foldopen" id="foldopen00142" data-start="{" data-end="}">
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"><a class="line" href="../../da/d5a/class_complex.html#ac38437c10eb798f176c384a695171b90"> 142</a></span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> <a class="code hl_function" href="../../da/d5a/class_complex.html#ac38437c10eb798f176c384a695171b90">operator/</a>(<span class="keyword">const</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> &amp;other) {</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> result = *<span class="keyword">this</span> * ~other;</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordtype">double</span> denominator =</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> other.<a class="code hl_function" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a>() * other.<a class="code hl_function" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a>() + other.<a class="code hl_function" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>() * other.<a class="code hl_function" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>();</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keywordflow">if</span> (denominator != 0) {</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> result = <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a>(result.real() / denominator,</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> result.imag() / denominator);</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keywordflow">throw</span> std::invalid_argument(<span class="stringliteral">&quot;Undefined Value&quot;</span>);</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> }</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> }</div>
</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span></div>
<div class="foldopen" id="foldopen00160" data-start="{" data-end="}">
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"><a class="line" href="../../da/d5a/class_complex.html#a4ac9f529d54cacf2969f2c7179b4c4ac"> 160</a></span> <span class="keyword">const</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> &amp;<a class="code hl_function" href="../../da/d5a/class_complex.html#a4ac9f529d54cacf2969f2c7179b4c4ac">operator=</a>(<span class="keyword">const</span> <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> &amp;other) {</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> this-&gt;re = other.<a class="code hl_function" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a>();</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> this-&gt;im = other.<a class="code hl_function" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>();</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> }</div>
</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span>};</div>
</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span></div>
<div class="foldopen" id="foldopen00175" data-start="{" data-end="}">
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"><a class="line" href="../../d5/d67/complex__numbers_8cpp.html#a5a73e9d4e68af8cedb95bd0864054b89"> 175</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="../../d5/d67/complex__numbers_8cpp.html#a5a73e9d4e68af8cedb95bd0864054b89">operator==</a>(<span class="keyword">const</span> <a class="code hl_class" href="../../da/d5a/class_complex.html">Complex</a> &amp;a, <span class="keyword">const</span> <a class="code hl_class" href="../../da/d5a/class_complex.html">Complex</a> &amp;b) {</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <span class="keywordflow">return</span> a.real() == b.<a class="code hl_function" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a>() &amp;&amp; a.imag() == b.<a class="code hl_function" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>();</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span>}</div>
</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span></div>
<div class="foldopen" id="foldopen00186" data-start="{" data-end="}">
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"><a class="line" href="../../d5/d67/complex__numbers_8cpp.html#a44d5f25b573e870accdf26fd32b8484d"> 186</a></span>std::ostream &amp;<a class="code hl_function" href="../../d5/d67/complex__numbers_8cpp.html#a44d5f25b573e870accdf26fd32b8484d">operator&lt;&lt;</a>(std::ostream &amp;os, <span class="keyword">const</span> <a class="code hl_class" href="../../da/d5a/class_complex.html">Complex</a> &amp;num) {</div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> os &lt;&lt; <span class="stringliteral">&quot;(&quot;</span> &lt;&lt; num.<a class="code hl_function" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a>();</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> <span class="keywordflow">if</span> (num.<a class="code hl_function" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>() &lt; 0) {</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> os &lt;&lt; <span class="stringliteral">&quot; - &quot;</span> &lt;&lt; -num.<a class="code hl_function" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>();</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> os &lt;&lt; <span class="stringliteral">&quot; + &quot;</span> &lt;&lt; num.<a class="code hl_function" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>();</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> os &lt;&lt; <span class="stringliteral">&quot;i)&quot;</span>;</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> <span class="keywordflow">return</span> os;</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span>}</div>
</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span></div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"><a class="line" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0"> 201</a></span><span class="keywordtype">double</span> <a class="code hl_function" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a>() { <span class="keywordflow">return</span> (std::rand() % 100 - 50) / 100.f; }</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span></div>
<div class="foldopen" id="foldopen00206" data-start="{" data-end="}">
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"><a class="line" href="../../d5/d67/complex__numbers_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9"> 206</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d5/d67/complex__numbers_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9">tests</a>() {</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> std::srand(std::time(<span class="keyword">nullptr</span>));</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <span class="keywordtype">double</span> x1 = <a class="code hl_function" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a>(), y1 = <a class="code hl_function" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a>(), x2 = <a class="code hl_function" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a>(), y2 = <a class="code hl_function" href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a>();</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <a class="code hl_class" href="../../da/d5a/class_complex.html">Complex</a> num1(x1, y1), num2(x2, y2);</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> std::complex&lt;double&gt; cnum1(x1, y1), cnum2(x2, y2);</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> <a class="code hl_class" href="../../da/d5a/class_complex.html">Complex</a> result;</div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> std::complex&lt;double&gt; expected;</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="comment">// Test for addition</span></div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> result = num1 + num2;</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> expected = cnum1 + cnum2;</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;1 + 1i + 1 + 1i is equal to 2 + 2i but the addition doesn&#39;t &quot;</span></div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> <span class="stringliteral">&quot;add up \n&quot;</span>,</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> (result.real() == expected.real() &amp;&amp;</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> result.imag() == expected.imag())));</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> std::cout &lt;&lt; <span class="stringliteral">&quot;First test passes.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="comment">// Test for subtraction</span></div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> result = num1 - num2;</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> expected = cnum1 - cnum2;</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;1 + 1i - 1 - 1i is equal to 0 but the program says &quot;</span></div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="stringliteral">&quot;otherwise. \n&quot;</span>,</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> (result.real() == expected.real() &amp;&amp;</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> result.imag() == expected.imag())));</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Second test passes.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="comment">// Test for multiplication</span></div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> result = num1 * num2;</div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> expected = cnum1 * cnum2;</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;(1 + 1i) * (1 + 1i) is equal to 2i but the program says &quot;</span></div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> <span class="stringliteral">&quot;otherwise. \n&quot;</span>,</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> (result.real() == expected.real() &amp;&amp;</div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span> result.imag() == expected.imag())));</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Third test passes.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> <span class="comment">// Test for division</span></div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> result = num1 / num2;</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span> expected = cnum1 / cnum2;</div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;(1 + 1i) / (1 + 1i) is equal to 1 but the program says &quot;</span></div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"> 241</span> <span class="stringliteral">&quot;otherwise.\n&quot;</span>,</div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"> 242</span> (result.real() == expected.real() &amp;&amp;</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> result.imag() == expected.imag())));</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Fourth test passes.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> <span class="comment">// Test for conjugates</span></div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> result = ~num1;</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> expected = std::conj(cnum1);</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;(1 + 1i) has a conjugate which is equal to (1 - 1i) but the &quot;</span></div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="stringliteral">&quot;program says otherwise.\n&quot;</span>,</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> (result.real() == expected.real() &amp;&amp;</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span> result.imag() == expected.imag())));</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno"> 252</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Fifth test passes.\n&quot;</span>;</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"> 253</span> <span class="comment">// Test for Argument of our complex number</span></div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno"> 254</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;(1 + 1i) has argument PI / 4 but the program differs from &quot;</span></div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"> 255</span> <span class="stringliteral">&quot;the std::complex result.\n&quot;</span>,</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"> 256</span> (num1.arg() == std::arg(cnum1))));</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Sixth test passes.\n&quot;</span>;</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> <span class="comment">// Test for absolute value of our complex number</span></div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> assert(((<span class="keywordtype">void</span>)<span class="stringliteral">&quot;(1 + 1i) has absolute value sqrt(2) but the program differs &quot;</span></div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> <span class="stringliteral">&quot;from the std::complex result. \n&quot;</span>,</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span> (num1.abs() == std::abs(cnum1))));</div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> std::cout &lt;&lt; <span class="stringliteral">&quot;Seventh test passes.\n&quot;</span>;</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno"> 263</span>}</div>
</div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno"> 264</span></div>
<div class="foldopen" id="foldopen00268" data-start="{" data-end="}">
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"><a class="line" href="../../d5/d67/complex__numbers_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 268</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../d5/d67/complex__numbers_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> <a class="code hl_function" href="../../d5/d67/complex__numbers_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9">tests</a>();</div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"> 270</span> <span class="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"> 271</span>}</div>
</div>
<div class="ttc" id="aclass_complex_html"><div class="ttname"><a href="../../da/d5a/class_complex.html">Complex</a></div><div class="ttdoc">Class Complex to represent complex numbers as a field.</div><div class="ttdef"><b>Definition</b> <a href="#l00020">complex_numbers.cpp:20</a></div></div>
<div class="ttc" id="aclass_complex_html_a312e4b19146128408fb06e0150b0faf6"><div class="ttname"><a href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">Complex::real</a></div><div class="ttdeci">double real() const</div><div class="ttdoc">Member function to get real value of our complex number. Member function (getter) to access the class...</div><div class="ttdef"><b>Definition</b> <a href="#l00064">complex_numbers.cpp:64</a></div></div>
<div class="ttc" id="aclass_complex_html_a36739619a07b5478bcd8a28ad2f8b7da"><div class="ttname"><a href="../../da/d5a/class_complex.html#a36739619a07b5478bcd8a28ad2f8b7da">Complex::operator-</a></div><div class="ttdeci">Complex operator-(const Complex &amp;other)</div><div class="ttdoc">Operator overload of &#39;-&#39; on Complex class. Operator overload to be able to subtract two complex numbe...</div><div class="ttdef"><b>Definition</b> <a href="#l00106">complex_numbers.cpp:106</a></div></div>
<div class="ttc" id="aclass_complex_html_a3cfc522c782726f49ee20af17b77f867"><div class="ttname"><a href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex::Complex</a></div><div class="ttdeci">Complex(double x=0.f, double y=0.f, bool is_polar=false)</div><div class="ttdoc">Complex Constructor which initialises our complex number.</div><div class="ttdef"><b>Definition</b> <a href="#l00043">complex_numbers.cpp:43</a></div></div>
<div class="ttc" id="aclass_complex_html_a466cd7b664cc6a864937ceb3dead1323"><div class="ttname"><a href="../../da/d5a/class_complex.html#a466cd7b664cc6a864937ceb3dead1323">Complex::Complex</a></div><div class="ttdeci">Complex(const Complex &amp;other)</div><div class="ttdoc">Copy Constructor.</div><div class="ttdef"><b>Definition</b> <a href="#l00058">complex_numbers.cpp:58</a></div></div>
<div class="ttc" id="aclass_complex_html_a4ac9f529d54cacf2969f2c7179b4c4ac"><div class="ttname"><a href="../../da/d5a/class_complex.html#a4ac9f529d54cacf2969f2c7179b4c4ac">Complex::operator=</a></div><div class="ttdeci">const Complex &amp; operator=(const Complex &amp;other)</div><div class="ttdoc">Operator overload of &#39;=&#39; on Complex class. Operator overload to be able to copy RHS instance of Compl...</div><div class="ttdef"><b>Definition</b> <a href="#l00160">complex_numbers.cpp:160</a></div></div>
<div class="ttc" id="aclass_complex_html_a820afcbb330df716577459d7a3aa3a1c"><div class="ttname"><a href="../../da/d5a/class_complex.html#a820afcbb330df716577459d7a3aa3a1c">Complex::operator+</a></div><div class="ttdeci">Complex operator+(const Complex &amp;other)</div><div class="ttdoc">Operator overload of &#39;+&#39; on Complex class. Operator overload to be able to add two complex numbers.</div><div class="ttdef"><b>Definition</b> <a href="#l00095">complex_numbers.cpp:95</a></div></div>
<div class="ttc" id="aclass_complex_html_a8d5427f6c42c15283031d73e1418c59d"><div class="ttname"><a href="../../da/d5a/class_complex.html#a8d5427f6c42c15283031d73e1418c59d">Complex::operator~</a></div><div class="ttdeci">Complex operator~() const</div><div class="ttdoc">Operator overload of &#39;~&#39; on Complex class. Operator overload of the BITWISE NOT which gives us the co...</div><div class="ttdef"><b>Definition</b> <a href="#l00130">complex_numbers.cpp:130</a></div></div>
<div class="ttc" id="aclass_complex_html_aa9b4a7d6083ca7040ddd4fe93db5c19d"><div class="ttname"><a href="../../da/d5a/class_complex.html#aa9b4a7d6083ca7040ddd4fe93db5c19d">Complex::operator*</a></div><div class="ttdeci">Complex operator*(const Complex &amp;other)</div><div class="ttdoc">Operator overload of &#39;*&#39; on Complex class. Operator overload to be able to multiple two complex numbe...</div><div class="ttdef"><b>Definition</b> <a href="#l00117">complex_numbers.cpp:117</a></div></div>
<div class="ttc" id="aclass_complex_html_ac38437c10eb798f176c384a695171b90"><div class="ttname"><a href="../../da/d5a/class_complex.html#ac38437c10eb798f176c384a695171b90">Complex::operator/</a></div><div class="ttdeci">Complex operator/(const Complex &amp;other)</div><div class="ttdoc">Operator overload of &#39;/&#39; on Complex class. Operator overload to be able to divide two complex numbers...</div><div class="ttdef"><b>Definition</b> <a href="#l00142">complex_numbers.cpp:142</a></div></div>
<div class="ttc" id="aclass_complex_html_ae1e03712837450549e0c9b4017533a41"><div class="ttname"><a href="../../da/d5a/class_complex.html#ae1e03712837450549e0c9b4017533a41">Complex::arg</a></div><div class="ttdeci">double arg() const</div><div class="ttdoc">Member function to give the argument of our complex number.</div><div class="ttdef"><b>Definition</b> <a href="#l00087">complex_numbers.cpp:87</a></div></div>
<div class="ttc" id="aclass_complex_html_ae5b51b749ea4964104b9527af9d8f556"><div class="ttname"><a href="../../da/d5a/class_complex.html#ae5b51b749ea4964104b9527af9d8f556">Complex::abs</a></div><div class="ttdeci">double abs() const</div><div class="ttdoc">Member function to give the modulus of our complex number. Member function to which gives the absolut...</div><div class="ttdef"><b>Definition</b> <a href="#l00079">complex_numbers.cpp:79</a></div></div>
<div class="ttc" id="aclass_complex_html_af8aacf982e2e6c142921bc850f6dc974"><div class="ttname"><a href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">Complex::imag</a></div><div class="ttdeci">double imag() const</div><div class="ttdoc">Member function to get imaginary value of our complex number. Member function (getter) to access the ...</div><div class="ttdef"><b>Definition</b> <a href="#l00070">complex_numbers.cpp:70</a></div></div>
<div class="ttc" id="acomplex__numbers_8cpp_html_a44d5f25b573e870accdf26fd32b8484d"><div class="ttname"><a href="../../d5/d67/complex__numbers_8cpp.html#a44d5f25b573e870accdf26fd32b8484d">operator&lt;&lt;</a></div><div class="ttdeci">std::ostream &amp; operator&lt;&lt;(std::ostream &amp;os, const Complex &amp;num)</div><div class="ttdoc">Operator overload of &#39;&lt;&lt;&#39; of ostream for Complex class. Overloaded insersion operator to accommodate ...</div><div class="ttdef"><b>Definition</b> <a href="#l00186">complex_numbers.cpp:186</a></div></div>
<div class="ttc" id="acomplex__numbers_8cpp_html_a5a73e9d4e68af8cedb95bd0864054b89"><div class="ttname"><a href="../../d5/d67/complex__numbers_8cpp.html#a5a73e9d4e68af8cedb95bd0864054b89">operator==</a></div><div class="ttdeci">bool operator==(const Complex &amp;a, const Complex &amp;b)</div><div class="ttdoc">Operator overload of &#39;==&#39; on Complex class. Logical Equal overload for our Complex class.</div><div class="ttdef"><b>Definition</b> <a href="#l00175">complex_numbers.cpp:175</a></div></div>
<div class="ttc" id="acomplex__numbers_8cpp_html_a5d4d5b8250b50703de888514c8e7a7a0"><div class="ttname"><a href="../../d5/d67/complex__numbers_8cpp.html#a5d4d5b8250b50703de888514c8e7a7a0">get_rand</a></div><div class="ttdeci">double get_rand()</div><div class="ttdoc">Function to get random numbers to generate our complex numbers for test.</div><div class="ttdef"><b>Definition</b> <a href="#l00201">complex_numbers.cpp:201</a></div></div>
<div class="ttc" id="acomplex__numbers_8cpp_html_a88ec9ad42717780d6caaff9d3d6977f9"><div class="ttname"><a href="../../d5/d67/complex__numbers_8cpp.html#a88ec9ad42717780d6caaff9d3d6977f9">tests</a></div><div class="ttdeci">void tests()</div><div class="ttdef"><b>Definition</b> <a href="#l00206">complex_numbers.cpp:206</a></div></div>
<div class="ttc" id="acomplex__numbers_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../d5/d67/complex__numbers_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition</b> <a href="#l00268">complex_numbers.cpp:268</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<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="../../d5/d67/complex__numbers_8cpp.html">complex_numbers.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.13.2 </li>
</ul>
</div>
</body>
</html>