mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-24 13:53:35 +08:00
Documentation for 341ed50da8
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.1"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.2"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: Complex Class Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -17,9 +17,9 @@
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
|
||||
@@ -32,8 +32,7 @@
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">Algorithms_in_C++
|
||||
 <span id="projectnumber">1.0.0</span>
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
</td>
|
||||
@@ -42,21 +41,22 @@
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.1 -->
|
||||
<!-- Generated by Doxygen 1.9.2 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",false,'Search','.html');
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */</script>
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
@@ -70,7 +70,7 @@ $(function() {
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('da/d5a/class_complex.html','../../'); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
@@ -94,15 +94,14 @@ $(document).ready(function(){initNavTree('da/d5a/class_complex.html','../../');
|
||||
<a href="#pub-methods">Public Member Functions</a> |
|
||||
<a href="#pri-attribs">Private Attributes</a> |
|
||||
<a href="../../d6/d1f/class_complex-members.html">List of all members</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">Complex Class Reference</div> </div>
|
||||
<div class="headertitle"><div class="title">Complex Class Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Class <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> to represent complex numbers as a field.
|
||||
<a href="../../da/d5a/class_complex.html#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a3cfc522c782726f49ee20af17b77f867"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a> (double x=0.f, double y=0.f, bool is_polar=false)</td></tr>
|
||||
<tr class="memdesc:a3cfc522c782726f49ee20af17b77f867"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> Constructor which initialises our complex number. <a href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">More...</a><br /></td></tr>
|
||||
@@ -110,13 +109,11 @@ Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a466cd7b664cc6a864937ceb3dead1323"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d5a/class_complex.html#a466cd7b664cc6a864937ceb3dead1323">Complex</a> (const <a class="el" href="../../da/d5a/class_complex.html">Complex</a> &other)</td></tr>
|
||||
<tr class="memdesc:a466cd7b664cc6a864937ceb3dead1323"><td class="mdescLeft"> </td><td class="mdescRight">Copy Constructor. <a href="../../da/d5a/class_complex.html#a466cd7b664cc6a864937ceb3dead1323">More...</a><br /></td></tr>
|
||||
<tr class="separator:a466cd7b664cc6a864937ceb3dead1323"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a312e4b19146128408fb06e0150b0faf6"><td class="memItemLeft" align="right" valign="top"><a id="a312e4b19146128408fb06e0150b0faf6"></a>
|
||||
double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a> () const</td></tr>
|
||||
<tr class="memdesc:a312e4b19146128408fb06e0150b0faf6"><td class="mdescLeft"> </td><td class="mdescRight">Member function to get real value of our complex number. Member function (getter) to access the class' re value. <br /></td></tr>
|
||||
<tr class="memitem:a312e4b19146128408fb06e0150b0faf6"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a> () const</td></tr>
|
||||
<tr class="memdesc:a312e4b19146128408fb06e0150b0faf6"><td class="mdescLeft"> </td><td class="mdescRight">Member function to get real value of our complex number. Member function (getter) to access the class' re value. <a href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">More...</a><br /></td></tr>
|
||||
<tr class="separator:a312e4b19146128408fb06e0150b0faf6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af8aacf982e2e6c142921bc850f6dc974"><td class="memItemLeft" align="right" valign="top"><a id="af8aacf982e2e6c142921bc850f6dc974"></a>
|
||||
double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a> () const</td></tr>
|
||||
<tr class="memdesc:af8aacf982e2e6c142921bc850f6dc974"><td class="mdescLeft"> </td><td class="mdescRight">Member function to get imaginary value of our complex number. Member function (getter) to access the class' im value. <br /></td></tr>
|
||||
<tr class="memitem:af8aacf982e2e6c142921bc850f6dc974"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a> () const</td></tr>
|
||||
<tr class="memdesc:af8aacf982e2e6c142921bc850f6dc974"><td class="mdescLeft"> </td><td class="mdescRight">Member function to get imaginary value of our complex number. Member function (getter) to access the class' im value. <a href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">More...</a><br /></td></tr>
|
||||
<tr class="separator:af8aacf982e2e6c142921bc850f6dc974"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae5b51b749ea4964104b9527af9d8f556"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d5a/class_complex.html#ae5b51b749ea4964104b9527af9d8f556">abs</a> () const</td></tr>
|
||||
<tr class="memdesc:ae5b51b749ea4964104b9527af9d8f556"><td class="mdescLeft"> </td><td class="mdescRight">Member function to give the modulus of our complex number. Member function to which gives the absolute value (modulus) of our complex number. <a href="../../da/d5a/class_complex.html#ae5b51b749ea4964104b9527af9d8f556">More...</a><br /></td></tr>
|
||||
@@ -139,24 +136,23 @@ double </td><td class="memItemRight" valign="bottom"><a class="el" href="..
|
||||
<tr class="memitem:ac38437c10eb798f176c384a695171b90"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../da/d5a/class_complex.html">Complex</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d5a/class_complex.html#ac38437c10eb798f176c384a695171b90">operator/</a> (const <a class="el" href="../../da/d5a/class_complex.html">Complex</a> &other)</td></tr>
|
||||
<tr class="memdesc:ac38437c10eb798f176c384a695171b90"><td class="mdescLeft"> </td><td class="mdescRight">Operator overload of '/' on <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> class. Operator overload to be able to divide two complex numbers. This function would throw an exception if the other number is zero. <a href="../../da/d5a/class_complex.html#ac38437c10eb798f176c384a695171b90">More...</a><br /></td></tr>
|
||||
<tr class="separator:ac38437c10eb798f176c384a695171b90"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a889215b7b004a3e7ec4d785ca5e7a2ba"><td class="memItemLeft" align="right" valign="top"><a id="a889215b7b004a3e7ec4d785ca5e7a2ba"></a>
|
||||
const <a class="el" href="../../da/d5a/class_complex.html">Complex</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d5a/class_complex.html#a889215b7b004a3e7ec4d785ca5e7a2ba">operator=</a> (const <a class="el" href="../../da/d5a/class_complex.html">Complex</a> &other)</td></tr>
|
||||
<tr class="memdesc:a889215b7b004a3e7ec4d785ca5e7a2ba"><td class="mdescLeft"> </td><td class="mdescRight">Operator overload of '=' on <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> class. Operator overload to be able to copy RHS instance of <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> to LHS instance of <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a>. <br /></td></tr>
|
||||
<tr class="separator:a889215b7b004a3e7ec4d785ca5e7a2ba"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a4ac9f529d54cacf2969f2c7179b4c4ac"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="../../da/d5a/class_complex.html">Complex</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/d5a/class_complex.html#a4ac9f529d54cacf2969f2c7179b4c4ac">operator=</a> (const <a class="el" href="../../da/d5a/class_complex.html">Complex</a> &other)</td></tr>
|
||||
<tr class="memdesc:a4ac9f529d54cacf2969f2c7179b4c4ac"><td class="mdescLeft"> </td><td class="mdescRight">Operator overload of '=' on <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> class. Operator overload to be able to copy RHS instance of <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> to LHS instance of <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a>. <a href="../../da/d5a/class_complex.html#a4ac9f529d54cacf2969f2c7179b4c4ac">More...</a><br /></td></tr>
|
||||
<tr class="separator:a4ac9f529d54cacf2969f2c7179b4c4ac"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
|
||||
Private Attributes</h2></td></tr>
|
||||
<tr class="memitem:a843ce2f85af4c57db9063c86f3cd9607"><td class="memItemLeft" align="right" valign="top"><a id="a843ce2f85af4c57db9063c86f3cd9607"></a>
|
||||
<tr class="memitem:a843ce2f85af4c57db9063c86f3cd9607"><td class="memItemLeft" align="right" valign="top"><a id="a843ce2f85af4c57db9063c86f3cd9607" name="a843ce2f85af4c57db9063c86f3cd9607"></a>
|
||||
double </td><td class="memItemRight" valign="bottom"><b>re</b></td></tr>
|
||||
<tr class="separator:a843ce2f85af4c57db9063c86f3cd9607"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a776d595d5a1b576e9136cbc6bac0589c"><td class="memItemLeft" align="right" valign="top"><a id="a776d595d5a1b576e9136cbc6bac0589c"></a>
|
||||
<tr class="memitem:a776d595d5a1b576e9136cbc6bac0589c"><td class="memItemLeft" align="right" valign="top"><a id="a776d595d5a1b576e9136cbc6bac0589c" name="a776d595d5a1b576e9136cbc6bac0589c"></a>
|
||||
double </td><td class="memItemRight" valign="bottom"><b>im</b></td></tr>
|
||||
<tr class="separator:a776d595d5a1b576e9136cbc6bac0589c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Class <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> to represent complex numbers as a field. </p>
|
||||
<div class="textblock"><p >Class <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> to represent complex numbers as a field. </p>
|
||||
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="a3cfc522c782726f49ee20af17b77f867"></a>
|
||||
<a id="a3cfc522c782726f49ee20af17b77f867" name="a3cfc522c782726f49ee20af17b77f867"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a3cfc522c782726f49ee20af17b77f867">◆ </a></span>Complex() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
@@ -197,7 +193,7 @@ double </td><td class="memItemRight" valign="bottom"><b>im</b></td></tr>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p><a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> Constructor which initialises our complex number. </p>
|
||||
<p><a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> Constructor which initialises the complex number which takes three arguments. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<p ><a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> Constructor which initialises the complex number which takes three arguments. </p><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">x</td><td>If the third parameter is 'true' then this x is the absolute value of the complex number, if the third parameter is 'false' then this x is the real value of the complex number (optional). </td></tr>
|
||||
<tr><td class="paramname">y</td><td>If the third parameter is 'true' then this y is the argument of the complex number, if the third parameter is 'false' then this y is the imaginary value of the complex number (optional). </td></tr>
|
||||
@@ -205,16 +201,16 @@ double </td><td class="memItemRight" valign="bottom"><b>im</b></td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  {</div>
|
||||
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordflow">if</span> (!is_polar) {</div>
|
||||
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  re = x;</div>
|
||||
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  im = y;</div>
|
||||
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  }</div>
|
||||
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  </div>
|
||||
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  re = x * <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/cos.html">std::cos</a>(y);</div>
|
||||
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  im = x * <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/sin.html">std::sin</a>(y);</div>
|
||||
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  }</div>
|
||||
<div class="fragment"><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> <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 * <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/cos.html">std::cos</a>(y);</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> im = x * <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/sin.html">std::sin</a>(y);</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> }</div>
|
||||
<div class="ttc" id="acos_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/cos.html">std::cos</a></div><div class="ttdeci">T cos(T... args)</div></div>
|
||||
<div class="ttc" id="asin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/sin.html">std::sin</a></div><div class="ttdeci">T sin(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
@@ -226,7 +222,7 @@ Here is the call graph for this function:</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a466cd7b664cc6a864937ceb3dead1323"></a>
|
||||
<a id="a466cd7b664cc6a864937ceb3dead1323" name="a466cd7b664cc6a864937ceb3dead1323"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a466cd7b664cc6a864937ceb3dead1323">◆ </a></span>Complex() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
@@ -257,14 +253,14 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> : re(other.<a class="code" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a>()), im(other.<a class="code" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>()) {}</div>
|
||||
<div class="fragment"><div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span>: 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="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> complex_numbers.cpp:64</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> complex_numbers.cpp:70</div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="ae5b51b749ea4964104b9527af9d8f556"></a>
|
||||
<a id="ae5b51b749ea4964104b9527af9d8f556" name="ae5b51b749ea4964104b9527af9d8f556"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae5b51b749ea4964104b9527af9d8f556">◆ </a></span>abs()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
@@ -289,9 +285,9 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<p>Member function to give the modulus of our complex number. Member function to which gives the absolute value (modulus) of our complex number. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>\( \sqrt{z \bar{z}} \) where \( z \) is our complex number. </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  {</div>
|
||||
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">return</span> <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html">std::sqrt</a>(this->re * this->re + this->im * this->im);</div>
|
||||
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  }</div>
|
||||
<div class="fragment"><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">return</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html">std::sqrt</a>(this->re * this->re + this->im * this->im);</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</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>
|
||||
@@ -302,7 +298,7 @@ Here is the call graph for this function:</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ae1e03712837450549e0c9b4017533a41"></a>
|
||||
<a id="ae1e03712837450549e0c9b4017533a41" name="ae1e03712837450549e0c9b4017533a41"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae1e03712837450549e0c9b4017533a41">◆ </a></span>arg()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
@@ -327,7 +323,7 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<p>Member function to give the argument of our complex number. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>Argument of our <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> number in radians. </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> { <span class="keywordflow">return</span> <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/atan2.html">std::atan2</a>(this->im, this->re); }</div>
|
||||
<div class="fragment"><div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span>{ <span class="keywordflow">return</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/atan2.html">std::atan2</a>(this->im, this->re); }</div>
|
||||
<div class="ttc" id="aatan2_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/atan2.html">std::atan2</a></div><div class="ttdeci">T atan2(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
@@ -338,7 +334,35 @@ Here is the call graph for this function:</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aa9b4a7d6083ca7040ddd4fe93db5c19d"></a>
|
||||
<a id="af8aacf982e2e6c142921bc850f6dc974" name="af8aacf982e2e6c142921bc850f6dc974"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#af8aacf982e2e6c142921bc850f6dc974">◆ </a></span>imag()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">double Complex::imag </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Member function to get imaginary value of our complex number. Member function (getter) to access the class' im value. </p>
|
||||
<div class="fragment"><div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span>{ <span class="keywordflow">return</span> this->im; }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="aa9b4a7d6083ca7040ddd4fe93db5c19d" name="aa9b4a7d6083ca7040ddd4fe93db5c19d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa9b4a7d6083ca7040ddd4fe93db5c19d">◆ </a></span>operator*()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
@@ -370,17 +394,17 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>result current number times other number. </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  {</div>
|
||||
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <a class="code" href="../../da/d5a/class_complex.html">Complex</a> <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>(this->re * other.re - this->im * other.im,</div>
|
||||
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  this->re * other.im + this->im * other.re);</div>
|
||||
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordflow">return</span> <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>;</div>
|
||||
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  }</div>
|
||||
<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> <a class="code hl_class" href="../../da/d5a/class_complex.html">Complex</a> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>(this->re * other.re - this->im * other.im,</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> this->re * other.im + this->im * other.re);</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>;</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> }</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> complex_numbers.cpp:20</div></div>
|
||||
<div class="ttc" id="afibonacci__sum_8cpp_html_aadb40ac4c74a7efc0680b83eeee138aa"><div class="ttname"><a href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">math::fibonacci_sum::result</a></div><div class="ttdeci">uint64_t result(uint64_t n)</div><div class="ttdef"><b>Definition:</b> fibonacci_sum.cpp:76</div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a820afcbb330df716577459d7a3aa3a1c"></a>
|
||||
<a id="a820afcbb330df716577459d7a3aa3a1c" name="a820afcbb330df716577459d7a3aa3a1c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a820afcbb330df716577459d7a3aa3a1c">◆ </a></span>operator+()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
@@ -412,14 +436,14 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>result current number plus other number </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  {</div>
|
||||
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <a class="code" href="../../da/d5a/class_complex.html">Complex</a> <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>(this->re + other.re, this->im + other.im);</div>
|
||||
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordflow">return</span> <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>;</div>
|
||||
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  }</div>
|
||||
<div class="fragment"><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> <a class="code hl_class" href="../../da/d5a/class_complex.html">Complex</a> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>(this->re + other.re, this->im + other.im);</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>;</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a36739619a07b5478bcd8a28ad2f8b7da"></a>
|
||||
<a id="a36739619a07b5478bcd8a28ad2f8b7da" name="a36739619a07b5478bcd8a28ad2f8b7da"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a36739619a07b5478bcd8a28ad2f8b7da">◆ </a></span>operator-()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
@@ -451,14 +475,14 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>result current number subtract other number </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  {</div>
|
||||
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <a class="code" href="../../da/d5a/class_complex.html">Complex</a> <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>(this->re - other.re, this->im - other.im);</div>
|
||||
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="keywordflow">return</span> <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>;</div>
|
||||
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  }</div>
|
||||
<div class="fragment"><div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> {</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <a class="code hl_class" href="../../da/d5a/class_complex.html">Complex</a> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>(this->re - other.re, this->im - other.im);</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>;</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="ac38437c10eb798f176c384a695171b90"></a>
|
||||
<a id="ac38437c10eb798f176c384a695171b90" name="ac38437c10eb798f176c384a695171b90"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ac38437c10eb798f176c384a695171b90">◆ </a></span>operator/()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
@@ -490,18 +514,18 @@ Here is the call graph for this function:</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>result Current number divided by other number. </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  {</div>
|
||||
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <a class="code" href="../../da/d5a/class_complex.html">Complex</a> <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = *<span class="keyword">this</span> * ~other;</div>
|
||||
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordtype">double</span> denominator =</div>
|
||||
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  other.<a class="code" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a>() * other.<a class="code" href="../../da/d5a/class_complex.html#a312e4b19146128408fb06e0150b0faf6">real</a>() + other.<a class="code" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>() * other.<a class="code" href="../../da/d5a/class_complex.html#af8aacf982e2e6c142921bc850f6dc974">imag</a>();</div>
|
||||
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keywordflow">if</span> (denominator != 0) {</div>
|
||||
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <a class="code" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a>(<a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.real() / denominator,</div>
|
||||
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.imag() / denominator);</div>
|
||||
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keywordflow">return</span> <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>;</div>
|
||||
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="keywordflow">throw</span> <a class="codeRef" target="_blank" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">"Undefined Value"</span>);</div>
|
||||
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  }</div>
|
||||
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  }</div>
|
||||
<div class="fragment"><div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> {</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <a class="code hl_class" href="../../da/d5a/class_complex.html">Complex</a> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = *<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> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a> = <a class="code hl_function" href="../../da/d5a/class_complex.html#a3cfc522c782726f49ee20af17b77f867">Complex</a>(<a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.real() / denominator,</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>.imag() / denominator);</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>;</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> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a>(<span class="stringliteral">"Undefined Value"</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 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> complex_numbers.cpp:43</div></div>
|
||||
<div class="ttc" id="ainvalid_argument_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/error/invalid_argument.html">std::invalid_argument</a></div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
@@ -513,7 +537,46 @@ Here is the call graph for this function:</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a8d5427f6c42c15283031d73e1418c59d"></a>
|
||||
<a id="a4ac9f529d54cacf2969f2c7179b4c4ac" name="a4ac9f529d54cacf2969f2c7179b4c4ac"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a4ac9f529d54cacf2969f2c7179b4c4ac">◆ </a></span>operator=()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">const <a class="el" href="../../da/d5a/class_complex.html">Complex</a> & Complex::operator= </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const <a class="el" href="../../da/d5a/class_complex.html">Complex</a> & </td>
|
||||
<td class="paramname"><em>other</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Operator overload of '=' on <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> class. Operator overload to be able to copy RHS instance of <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> to LHS instance of <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a>. </p>
|
||||
<div class="fragment"><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> this->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->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><!-- 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="../../da/d5a/class_complex_a4ac9f529d54cacf2969f2c7179b4c4ac_cgraph.svg" width="310" height="88"><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="a8d5427f6c42c15283031d73e1418c59d" name="a8d5427f6c42c15283031d73e1418c59d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a8d5427f6c42c15283031d73e1418c59d">◆ </a></span>operator~()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
@@ -538,10 +601,38 @@ Here is the call graph for this function:</div>
|
||||
|
||||
<p>Operator overload of '~' on <a class="el" href="../../da/d5a/class_complex.html" title="Class Complex to represent complex numbers as a field.">Complex</a> class. Operator overload of the BITWISE NOT which gives us the conjugate of our complex number. NOTE: This is overloading the BITWISE operator but its not a BITWISE operation in this definition. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>result The conjugate of our complex number. </dd></dl>
|
||||
<div class="fragment"><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  {</div>
|
||||
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <a class="code" href="../../da/d5a/class_complex.html">Complex</a> <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>(this->re, -(this->im));</div>
|
||||
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordflow">return</span> <a class="code" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>;</div>
|
||||
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  }</div>
|
||||
<div class="fragment"><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> <a class="code hl_class" href="../../da/d5a/class_complex.html">Complex</a> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>(this->re, -(this->im));</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../de/dc3/fibonacci__sum_8cpp.html#aadb40ac4c74a7efc0680b83eeee138aa">result</a>;</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a312e4b19146128408fb06e0150b0faf6" name="a312e4b19146128408fb06e0150b0faf6"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a312e4b19146128408fb06e0150b0faf6">◆ </a></span>real()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">double Complex::real </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Member function to get real value of our complex number. Member function (getter) to access the class' re value. </p>
|
||||
<div class="fragment"><div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span>{ <span class="keywordflow">return</span> this->re; }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -554,7 +645,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/d5a/class_complex.html">Complex</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.1 </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>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user