⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 complex.html

📁 ST20 Embedded Toolset R2.0.5用于开发基于ST20芯片机顶盒软件的开发平台,2.0.5版本,国内找不到的.在国外论坛上花了N天才找到!
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<PRE><B>complex</B>(const complex&amp; right);</PRE><P>which is the copy constructor.</P><H3><A NAME="complex::imag"><CODE>complex::imag</CODE></A></H3><PRE>Ty <B>imag</B>() const;</PRE><P>The member function returns the stored imaginary part.</P><H3><A NAME="complex::operator*="><CODE>complex::operator*=</CODE></A></H3><PRE>template&lt;class Other&gt;    complex&amp; <B>operator*=</B>(const complex&lt;Other&gt;&amp; right);complex&amp; <B>operator*=</B>(const Ty&amp; right);</PRE><P>The first member function replaces the stored real and imaginary partswith those corresponding to the complex product of <CODE>*this</CODE>and <CODE>right</CODE>. It then returns <CODE>*this</CODE>.</P><P>The second member function multiplies both the stored real partand the stored imaginary part with <CODE>right</CODE>.It then returns <CODE>*this</CODE>.</P><P>In this<A HREF="index.html#implementation">implementation</A>, if atranslator does not support member template functions, the template:</P><PRE>template&lt;class Other&gt;    complex&amp; <B>operator*=</B>(const complex&lt;Other&gt;&amp; right);</PRE><P>is replaced by:</P><PRE>complex&amp; <B>operator*=</B>(const complex&amp; right);</PRE><H3><A NAME="complex::operator+="><CODE>complex::operator+=</CODE></A></H3><PRE>template&lt;class Other&gt;    complex&amp; <B>operator+=</B>(const complex&lt;Other&gt;&amp; right);complex&amp; <B>operator+=</B>(const Ty&amp; right);</PRE><P>The first member function replaces the stored real and imaginary partswith those corresponding to the complex sum of <CODE>*this</CODE>and <CODE>right</CODE>. It then returns <CODE>*this</CODE>.</P><P>The second member function adds <CODE>right</CODE> to the stored real part.It then returns <CODE>*this</CODE>.</P><P>In this<A HREF="index.html#implementation">implementation</A>, if atranslator does not support member template functions, the template:</P><PRE>template&lt;class Other&gt;    complex&amp; <B>operator+=</B>(const complex&lt;Other&gt;&amp; right);</PRE><P>is replaced by:</P><PRE>complex&amp; <B>operator+=</B>(const complex&amp; right);</PRE><H3><A NAME="complex::operator-="><CODE>complex::operator-=</CODE></A></H3><PRE>template&lt;class Other&gt;    complex&amp; <B>operator-=</B>(const complex&lt;Other&gt;&amp; right);complex&amp; <B>operator-=</B>(const Ty&amp; right);</PRE><P>The first member function replaces the stored real and imaginary partswith those corresponding to the complex difference of <CODE>*this</CODE>and <CODE>right</CODE>. It then returns <CODE>*this</CODE>.</P><P>The second member function subtracts <CODE>right</CODE> fromthe stored real part. It then returns <CODE>*this</CODE>.</P><P>In this<A HREF="index.html#implementation">implementation</A>, if atranslator does not support member template functions, the template:</P><PRE>template&lt;class Other&gt;    complex&amp; <B>operator-=</B>(const complex&lt;Other&gt;&amp; right);</PRE><P>is replaced by:</P><PRE>complex&amp; <B>operator-=</B>(const complex&amp; right);</PRE><H3><A NAME="complex::operator/="><CODE>complex::operator/=</CODE></A></H3><PRE>template&lt;class Other&gt;    complex&amp; <B>operator/=</B>(const complex&lt;Other&gt;&amp; right);complex&amp; <B>operator/=</B>(const Ty&amp; right);</PRE><P>The first member function replaces the stored real and imaginary partswith those corresponding to the complex quotient of <CODE>*this</CODE>and <CODE>right</CODE>. It then returns <CODE>*this</CODE>.</P><P>The second member function multiplies both the stored real partand the stored imaginary part with <CODE>right</CODE>.It then returns <CODE>*this</CODE>.</P><P>In this<A HREF="index.html#implementation">implementation</A>, if atranslator does not support member template functions, the template:</P><PRE>template&lt;class Other&gt;    complex&amp; <B>operator/=</B>(const complex&lt;Other&gt;&amp; right);</PRE><P>is replaced by:</P><PRE>complex&amp; <B>operator/=</B>(const complex&amp; right);</PRE><H3><A NAME="complex::operator="><CODE>complex::operator=</CODE></A></H3><PRE>template&lt;class Other&gt;    complex&amp; <B>operator=</B>(const complex&lt;Other&gt;&amp; right);complex&amp; <B>operator=</B>(const Ty&amp; right);</PRE><P>The first member function replaces the stored real part with<CODE>right.real()</CODE> and the stored imaginary partwith <CODE>right.imag()</CODE>. It then returns <CODE>*this</CODE>.</P><P>The second member function replaces the stored real part with<CODE>right</CODE> and the stored imaginary partwith zero. It then returns <CODE>*this</CODE>.</P><P>In this<A HREF="index.html#implementation">implementation</A>, if atranslator does not support member template functions, the template:</P><PRE>template&lt;class Other&gt;    complex&amp; <B>operator=</B>(const complex&lt;Other&gt;&amp; right);</PRE><P>is replaced by:</P><PRE>complex&amp; <B>operator=</B>(const complex&amp; right);</PRE><P>which is the default assignment operator.</P><H3><A NAME="complex::real"><CODE>complex::real</CODE></A></H3><PRE>Ty <B>real</B>() const;</PRE><P>The member function returns the stored real part.</P><H3><A NAME="complex::value_type"><CODE>complex::value_type</CODE></A></H3><PRE>typedef Ty <B>value_type</B>;</PRE><P>The type is a synonym for the template parameter <CODE>Ty</CODE>.</P><H2><A NAME="complex&lt;double&gt;"><CODE>complex&lt;double&gt;</CODE></A></H2><PRE>template&lt;&gt;    class <B>complex&lt;double&gt;</B> {public:    <B>complex</B>(double realval = 0, double imagval = 0);    <B>complex</B>(const complex&lt;float&gt;&amp; right);    explicit <B>complex</B>(const complex&lt;long double&gt;&amp; right);// rest same as template class complex    };</PRE><P>The explicitly specialized template classdescribes an object that stores two objectsof type <I>double,</I> one that represents the real partof a complex number and one that represents the imaginary part. Theexplicit specialization differs only in the constructors it defines.The first constructor initializes the stored real part to<CODE>realval</CODE> and the stored imaginary part to <CODE>imagval</CODE>.The remaining two constructors initialize the stored real part to<CODE>right.real()</CODE> and the stored imaginary part to<CODE>right.imag()</CODE>.</P><H2><A NAME="complex&lt;float&gt;"><CODE>complex&lt;float&gt;</CODE></A></H2><PRE>template&lt;&gt;    class <B>complex&lt;float&gt;</B> {public:    <B>complex</B>(float realval = 0, float imagval = 0);    explicit <B>complex</B>(const complex&lt;double&gt;&amp; right);    explicit <B>complex</B>(const complex&lt;long double&gt;&amp; right);// rest same as template class complex    };</PRE><P>The explicitly specialized template classdescribes an object that stores two objectsof type <I>float,</I> one that represents the real partof a complex number and one that represents the imaginary part. Theexplicit specialization differs only in the constructors it defines.The first constructor initializes the stored real part to<CODE>realval</CODE> and the stored imaginary part to <CODE>imagval</CODE>.The remaining two constructors initialize the stored real part to<CODE>right.real()</CODE> and the stored imaginary part to<CODE>right.imag()</CODE>.</P><H2><A NAME="complex&lt;long double&gt;"><CODE>complex&lt;long double&gt;</CODE></A></H2><PRE>template&lt;&gt;    class <B>complex&lt;long double&gt;</B> {public:    <B>complex</B>(long double realval = 0, long double imagval = 0);    <B>complex</B>(const complex&lt;float&gt;&amp; right);    <B>complex</B>(const complex&lt;double&gt;&amp; right);// rest same as template class complex    };</PRE><P>The explicitly specialized template classdescribes an object that stores two objectsof type <I>long double,</I> one that represents the real partof a complex number and one that represents the imaginary part. Theexplicit specialization differs only in the constructors it defines.The first constructor initializes the stored real part to<CODE>realval</CODE> and the stored imaginary part to <CODE>imagval</CODE>.The remaining two constructors initialize the stored real part to<CODE>right.real()</CODE> and the stored imaginary part to<CODE>right.imag()</CODE>.</P><H2><A NAME="conj"><CODE>conj</CODE></A></H2><PRE>template&lt;class Ty&gt;    complex&lt;Ty&gt; <B>conj</B>(const complex&lt;Ty&gt;&amp; left);</PRE><P>The function returns the conjugate of <CODE>left</CODE>.</P><H2><A NAME="cos"><CODE>cos</CODE></A></H2><PRE>template&lt;class Ty&gt;    complex&lt;Ty&gt; <B>cos</B>(const complex&lt;Ty&gt;&amp; left);</PRE><P>The function returns the cosine of <CODE>left</CODE>.</P><H2><A NAME="cosh"><CODE>cosh</CODE></A></H2><PRE>template&lt;class Ty&gt;    complex&lt;Ty&gt; <B>cosh</B>(const complex&lt;Ty&gt;&amp; left);</PRE><P>The function returns the hyperbolic cosine of <CODE>left</CODE>.</P><H2><A NAME="exp"><CODE>exp</CODE></A></H2><PRE>template&lt;class Ty&gt;    complex&lt;Ty&gt; <B>exp</B>(const complex&lt;Ty&gt;&amp; left);</PRE><P>The function returns the exponential of <CODE>left</CODE>.</P><H2><A NAME="imag"><CODE>imag</CODE></A></H2><PRE>template&lt;class Ty&gt;    Ty <B>imag</B>(const complex&lt;Ty&gt;&amp; left);</PRE><P>The function returns the imaginary part of <CODE>left</CODE>.</P><H2><A NAME="log"><CODE>log</CODE></A></H2><PRE>template&lt;class Ty&gt;    complex&lt;Ty&gt; <B>log</B>(const complex&lt;Ty&gt;&amp; left);</PRE><P>The function returns the logarithm of <CODE>left</CODE>.The branch cuts are along the negative real axis.</P><H2><A NAME="log10"><CODE>log10</CODE></A></H2>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -