Espacios de nombres
Variantes
Acciones

std::valarray::operator+=,-=,*=,/=,%=,&=,|=,<<=,>>=

De cppreference.com
< cpp‎ | numeric‎ | valarray
 
 
 
 
valarray<T> operator+=(const valarray<T>& v );

valarray<T> operator-=(const valarray<T>& v );
valarray<T> operator*=(const valarray<T>& v );
valarray<T> operator/=(const valarray<T>& v );
valarray<T> operator%=(const valarray<T>& v );
valarray<T> operator&=(const valarray<T>& v );
valarray<T> operator|=(const valarray<T>& v );
valarray<T> operator^=(const valarray<T>& v );
valarray<T> operator<<=(const valarray<T>& v );

valarray<T> operator>>=(const valarray<T>& v );
(1)
valarray<T> operator+=(const T& val );

valarray<T> operator-=(const T& val );
valarray<T> operator*=(const T& val );
valarray<T> operator/=(const T& val );
valarray<T> operator%=(const T& val );
valarray<T> operator&=(const T& val );
valarray<T> operator|=(const T& val );
valarray<T> operator^=(const T& val );
valarray<T> operator<<=(const T& val );

valarray<T> operator>>=(const T& val );
(2)
Se aplica operadores de asignación compuestos para cada elemento en la matriz numérica .
Original:
Applies compound assignment operators to each element in the numeric array.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Cada elemento se le asigna valor obtenido por la aplicación del operador correspondiente al valor anterior del elemento y el elemento correspondiente de v .
Original:
Each element is assigned value obtained by applying the corresponding operator to the previous value of the element and corresponding element from v.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
El comportamiento no está definido si size()!= v.size()
Original:
The behavior is undefined if size()!= v.size()
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
El comportamiento es indefinido si cualquiera de los valores en v se calcula durante la asignación y depende de cualquiera de los valores en *this, es decir, la expresión en el lado derecho de la asignación se refiere a una variable en el lado izquierdo de la asignación.
Original:
The behavior is undefined if any of the values in v is computed during the assignment and depends on any of the values in *this, that is, the expression on the right side of the assignment refers to a variable in the left side of the assignment.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Cada elemento se le asigna valor obtenido por la aplicación del operador correspondiente al valor anterior del elemento y el valor de val .
Original:
Each element is assigned value obtained by applying the corresponding operator to the previous value of the element and the value of val.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar]Parámetros

v -
otra matriz numérica
Original:
another numeric array
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
val -
un valor
Original:
a value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar]Valor de retorno

*this

[editar]Excepciones

(Ninguno)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar]Notas

Cada uno de los operadores sólo pueden crear instancias que reúnan las siguientes condiciones:
Original:
Each of the operators can only be instantiated if the following requirements are met:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • El operador indicado se puede aplicar al tipo T
    Original:
    The indicated operator can be applied to type T
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • El valor resultante puede ser convertida de forma inequívoca a T (1-3) o bool (4) .
    Original:
    The result value can be unambiguously converted to T (1-3) or bool (4).
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
La función se puede implementar con el tipo de retorno diferente de std::valarray. En este caso, el tipo de reemplazo tiene las siguientes propiedades:
Original:
The function can be implemented with the return type different from std::valarray. In this case, the replacement type has the following properties:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
close