std::complex<T>:: operator+=,-=,*=,/=
From cppreference.net
|
Plantilla principal
complex<T>
|
||
| (1) | ||
|
complex
&
operator
+
=
(
const
T
&
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
+
=
(
const
T
&
other
)
;
|
(desde C++20) | |
| (2) | ||
|
complex
&
operator
-
=
(
const
T
&
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
-
=
(
const
T
&
other
)
;
|
(desde C++20) | |
| (3) | ||
|
complex
&
operator
*
=
(
const
T
&
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
*
=
(
const
T
&
other
)
;
|
(desde C++20) | |
| (4) | ||
|
complex
&
operator
/
=
(
const
T
&
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
/
=
(
const
T
&
other
)
;
|
(desde C++20) | |
|
Especialización
complex<float>
|
||
| (1) | ||
|
complex
&
operator
+
=
(
float
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
+
=
(
float
other
)
;
|
(desde C++20) | |
| (2) | ||
|
complex
&
operator
-
=
(
float
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
-
=
(
float
other
)
;
|
(desde C++20) | |
| (3) | ||
|
complex
&
operator
*
=
(
float
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
*
=
(
float
other
)
;
|
(desde C++20) | |
| (4) | ||
|
complex
&
operator
/
=
(
float
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
/
=
(
float
other
)
;
|
(desde C++20) | |
|
Especialización
complex<double>
|
||
| (1) | ||
|
complex
&
operator
+
=
(
double
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
+
=
(
double
other
)
;
|
(desde C++20) | |
| (2) | ||
|
complex
&
operator
-
=
(
double
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
-
=
(
double
other
)
;
|
(desde C++20) | |
| (3) | ||
|
complex
&
operator
*
=
(
double
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
*
=
(
double
other
)
;
|
(desde C++20) | |
| (4) | ||
|
complex
&
operator
/
=
(
double
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
/
=
(
double
other
)
;
|
(desde C++20) | |
|
Especialización
complex<long double>
|
||
| (1) | ||
|
complex
&
operator
+
=
(
long
double
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
+
=
(
long
double
other
)
;
|
(desde C++20) | |
| (2) | ||
|
complex
&
operator
-
=
(
long
double
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
-
=
(
long
double
other
)
;
|
(desde C++20) | |
| (3) | ||
|
complex
&
operator
*
=
(
long
double
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
*
=
(
long
double
other
)
;
|
(desde C++20) | |
| (4) | ||
|
complex
&
operator
/
=
(
long
double
other
)
;
|
(hasta C++20) | |
|
constexpr
complex
&
operator
/
=
(
long
double
other
)
;
|
(desde C++20) | |
|
Todas las especializaciones
|
||
| (5) | ||
|
template
<
class
X
>
complex & operator + = ( const std:: complex < X > & other ) ; |
(hasta C++20) | |
|
template
<
class
X
>
constexpr complex & operator + = ( const std:: complex < X > & other ) ; |
(desde C++20) | |
| (6) | ||
|
template
<
class
X
>
complex & operator - = ( const std:: complex < X > & other ) ; |
(hasta C++20) | |
|
template
<
class
X
>
constexpr complex & operator - = ( const std:: complex < X > & other ) ; |
(desde C++20) | |
| (7) | ||
|
template
<
class
X
>
complex & operator * = ( const std:: complex < X > & other ) ; |
(hasta C++20) | |
|
template
<
class
X
>
constexpr complex & operator * = ( const std:: complex < X > & other ) ; |
(desde C++20) | |
| (8) | ||
|
template
<
class
X
>
complex & operator / = ( const std:: complex < X > & other ) ; |
(hasta C++20) | |
|
template
<
class
X
>
constexpr complex & operator / = ( const std:: complex < X > & other ) ; |
(desde C++20) | |
Implementa los operadores de asignación compuesta para aritmética compleja y para aritmética mixta compleja/escalar. Los argumentos escalares se tratan como números complejos con la parte real igual al argumento y la parte imaginaria establecida en cero.
1,5)
Agrega
other
a
*
this
.
2,6)
Resta
other
de
*
this
.
3,7)
Multiplica
*
this
por
other
.
4,8)
Divide
*
this
por
other
.
Parámetros
| otro | - | un valor complejo o escalar del tipo correspondiente ( float , double , long double ) |
Valor de retorno
* this
Véase también
|
aplica operadores unarios a números complejos
(function template) |
|
|
realiza operaciones aritméticas con números complejos entre dos valores complejos o un complejo y un escalar
(function template) |