名前空間
変種
操作

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

提供: cppreference.com
< cpp‎ | numeric‎ | valarray

 
 
ニューメリックスライブラリ
一般的な数学関数
浮動小数点環境
複素数
数値配列
擬似乱数生成
コンパイル時有理数演算 (C++11)
汎用の数値演算
Original:
Generic numeric operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iota(C++11)
accumulate
inner_product
adjacent_difference
partial_sum
 
std::valarray
メンバ関数
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
valarray::operator+
valarray::operator-
valarray::operator~
valarray::operator!
valarray::operator+=
valarray::operator-=
valarray::operator*=
valarray::operator/=
valarray::operator%=
valarray::operator&=
valarray::operator|=
valarray::operator^=
valarray::operator<<=
valarray::operator>>=
非メンバ関数
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ヘルパークラス
Original:
Helper classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
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)
数値配列の各要素に複合代入演算子を適用します.
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)
各要素は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.
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.
v内の任意の値が割り当て時に計算され、*this内の任意の値に依存している場合の動作は未定義である、すなわち、代入の右辺の式は、代入式の左辺にある変数を参照します。
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)
各要素は要素の以前の値と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.

目次

[編集] パラメータ

v -
別の数値配列
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 -
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.

[編集] 値を返します

*this

[編集] 例外

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

[編集] ノート

次の要件が満たされている場合の演算子は、インスタンシエーションのみできます
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.
  • 指定された演算子は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.
  • 結果値が一義的T(1-3)または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.
関数はstd::valarrayから別の戻り値型で実装することができます。この場合、交換型は、次のプロパティがあります
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.
  • constのすべてstd::valarrayメンバ関数が用意されています.
    Original:
    All const member functions of std::valarray are provided.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • std::valarraystd::slice_arraystd::gslice_arraystd::mask_arraystd::indirect_array交換タイプから構築することができます.
    Original:
    std::valarray, std::slice_array, std::gslice_array, std::mask_array and std::indirect_array can be constructed from the replacement type.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • タイプconst std::valarray&の引数を受け付ける機能は、すべての交換タイプを受け入れる必要があります.
    Original:
    All functions accepting a arguments of type const std::valarray& should also accept the replacement type.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • タイプconst std::valarray&の2つの引数を受け入れるすべての機能がconst std::valarray&と交換タイプのすべての組み合わせを受け入れるべき.
    Original:
    All functions accepting two arguments of type const std::valarray& should accept every combination of const std::valarray& and the replacement type.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.