[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: [analitza/kf5] /: Merge remote-tracking branch 'origin/imaginary' into kf5
From:       Percy_Camilo_TriveƱo_Aucahuasi <percy.camilo.ta () gmail ! com>
Date:       2014-07-19 19:04:32
Message-ID: CAH5PjXp5AMTA_W9iYVu+Dnh807utpRxMCN5A9v5dUSXNSsn7+A () mail ! gmail ! com
[Download RAW message or body]

On Sun, Jun 15, 2014 at 5:18 PM, Aleix Pol <aleixpol@kde.org> wrote:

> Git commit f9bed1300be72c23a3ebc7237a8f4de91d756566 by Aleix Pol.
> Committed on 15/06/2014 at 22:17.
> Pushed by apol into branch 'kf5'.
>
> Merge remote-tracking branch 'origin/imaginary' into kf5
>
> With this change, Analitza officially supports imaginary operations.
>
> Conflicts:
>         analitzagui/operatorsmodel.cpp
>         analitzaplot/private/utils/marchingcubes.cpp
>         analitzaplot/private/utils/marchingcubes.h
>
> CCMAIL: percy.camilo.ta@gmail.com
>
> ...
> + static bool operator<(complex<double> a, complex<double> b)
> + { return a.real() < b.real() || (a.real() == b.real() &&
> a.imag()<b.imag()); }
> +
> + static bool operator>(complex<double> a, complex<double> b)
> + { return a.real() > b.real() || (a.real() == b.real() &&
> a.imag()>b.imag()); }
> +
> + static bool operator<=(complex<double> a, complex<double> b)
> + { return a.real() <= b.real() || (a.real() == b.real() &&
> a.imag()<=b.imag()); }
> +
> + static bool operator>=(complex<double> a, complex<double> b)
> + { return a.real() >= b.real() || (a.real() == b.real() &&
> a.imag()>=b.imag()); }
> +
>

Hi Aleix,

I think this part shouldn't have been considered for this merge, since
complex number doesn't have order, so we can not define operators like
<,<=,>,>,>= between complex numbers.

If the user wants to operate <=,>,>,>= between complex numbers we should
tell him/her can't do that kind of operations.

Percy :)

[Attachment #3 (text/html)]

<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 15, \
2014 at 5:18 PM, Aleix Pol <span dir="ltr">&lt;<a href="mailto:aleixpol@kde.org" \
target="_blank">aleixpol@kde.org</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Git \
commit f9bed1300be72c23a3ebc7237a8f4de91d756566 by Aleix Pol.<br>

Committed on 15/06/2014 at 22:17.<br>
Pushed by apol into branch &#39;kf5&#39;.<br>
<br>
Merge remote-tracking branch &#39;origin/imaginary&#39; into kf5<br>
<br>
With this change, Analitza officially supports imaginary operations.<br>
<br>
Conflicts:<br>
            analitzagui/operatorsmodel.cpp<br>
            analitzaplot/private/utils/marchingcubes.cpp<br>
            analitzaplot/private/utils/marchingcubes.h<br>
<br>
CCMAIL: <a href="mailto:percy.camilo.ta@gmail.com">percy.camilo.ta@gmail.com</a><br>
<br>...<br>
+ static bool operator&lt;(complex&lt;double&gt; a, complex&lt;double&gt; b)<br>
+ { return a.real() &lt; b.real() || (a.real() == b.real() &amp;&amp; \
a.imag()&lt;b.imag()); }<br> +<br>
+ static bool operator&gt;(complex&lt;double&gt; a, complex&lt;double&gt; b)<br>
+ { return a.real() &gt; b.real() || (a.real() == b.real() &amp;&amp; \
a.imag()&gt;b.imag()); }<br> +<br>
+ static bool operator&lt;=(complex&lt;double&gt; a, complex&lt;double&gt; b)<br>
+ { return a.real() &lt;= b.real() || (a.real() == b.real() &amp;&amp; \
a.imag()&lt;=b.imag()); }<br> +<br>
+ static bool operator&gt;=(complex&lt;double&gt; a, complex&lt;double&gt; b)<br>
+ { return a.real() &gt;= b.real() || (a.real() == b.real() &amp;&amp; \
a.imag()&gt;=b.imag()); }<br> +<br></blockquote><div><br></div><div>Hi Aleix,  \
</div><div><br></div><div>I think this part shouldn&#39;t have been considered for \
this merge, since complex number doesn&#39;t have order, so we can not define \
operators like &lt;,&lt;=,&gt;,&gt;,&gt;= between complex numbers.</div>


<div><br></div><div>If the user wants to operate &lt;=,&gt;,&gt;,&gt;= between \
complex numbers we should tell him/her can&#39;t do that kind of \
operations.</div><div><br></div><div>Percy :)</div><div><br></div></div></div> </div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic