std::valarray
提供: cppreference.com
![]() | このページは、Google 翻訳を使って英語版から機械翻訳されました。 翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
Defined in header <valarray> | ||
template<class T > class valarray; | ||
std::valarray値の配列を表現し、操作するためのクラスです。これは、スライスと間接アクセス、要素単位の数学演算と一般添字演算子の様々な形式をサポートしています.
Original:
std::valarray is the class for representing and manipulating arrays of values. It supports element-wise mathematical operations and various forms of generalized subscript operators, slicing and indirect access.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集]ノート
std::valarrayおよびヘルパークラスは、このようにこれらのクラスの操作は、Cプログラミング言語のキーワード
restrict
の効果と似て最適化できるように、エイリアシングの特定の形態の自由になるように定義されています。また、valarray
の引数を取る関数と演算子は、それが可能なコンパイラはv1 = a*v2 + v3;た一時または複数のパスを避けて実行する1つのループのようなv1[i]= a*v2[i]+ v3[i];として発現を最適化するために作るためにプロキシオブジェクトを返すことが許可されています。しかし、式テンプレートはC + +のコンテナに同じ最適化手法を利用できるようにし、数値ライブラリの大半は、柔軟性のためvalarraysに式テンプレートを好む。いくつかは、C + +標準ライブラリの実装はstd::valarray
(例えば、GNU libstdc + +がとLLVMのlibc + +)とごくまれvalarraysは、例えば、それ以上に最適化された上で効率的なオペレーションを実現するために、式テンプレートを使用Intel Parallel Studioの.Original:
std::valarray and helper classes are defined to be free of certain forms of aliasing, thus allowing operations on these classes to be optimized similar to the effect of the keyword
restrict
in the C programming language. In addition, functions and operators that take valarray
arguments are allowed to return proxy objects to make it possible for the compiler to optimize an expression such as v1 = a*v2 + v3; as a single loop that executes v1[i]= a*v2[i]+ v3[i]; avoiding any temporaries or multiple passes. However, 式テンプレート make the same optimization technique available for any C++ container, and the majority of numeric libraries prefer expression templates to valarrays for flexibility. Some C++ standard library implementations use expression templates to implement efficient operations on std::valarray
(e.g. GNU libstdc++ and LLVM libc++), and only rarely valarrays are optimized any further, e.g. in Intel Parallel Studio.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集]メンバータイプ
メンバー·タイプ Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | Definition |
value_type | T |
[編集]メンバ関数
新しい数値配列を構築します Original: constructs new numeric array The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
数値配列を破棄します Original: destructs 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. (パブリックメンバ関数) | |
内容が割り当てられます Original: assigns the contents The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
valarrayの要素、スライス、またはマスクを設定/取得する Original: get/set valarray element, slice, or mask The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
valarrayの各要素に単項算術演算子が適用されます Original: applies a unary arithmetic operator to each element of the valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
valarrayの各要素に複合代入演算子を適用します Original: applies compound assignment operator to each element of the valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
別のvalarrayとスワップ Original: swaps with another valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
valarrayのサイズを返します Original: returns the size of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
valarrayのサイズを変更します Original: changes the size of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
すべての要素の合計を計算します Original: calculates the sum of all elements The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
最小の要素を返します Original: returns the smallest element The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
最大の要素を返します Original: returns the largest element The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
valarrayの要素をシフトゼロフィリング Original: zero-filling shift the elements of the valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
valarrayの要素を循環的にシフトした Original: circular shift of the elements of the valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
applies a function to every element of a valarray (パブリックメンバ関数) |
[編集]非メンバ関数
(C++11) | std::swap()アルゴリズムを専門としています Original: specializes the std::swap() algorithm The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) |
(C++11) | std::beginを専門としています Original: specializes std::begin The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) |
(C++11) | std::endを専門としています Original: specializes std::end The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) |
2 valarrays、またはのvalarrayと値の各要素に二項演算子を適用します Original: applies binary operators to each element of two valarrays, or a valarray and a value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
2 valarraysまたは値を持つvalarrayを比較します Original: compares two valarrays or a valarray with a value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
valarrayの各要素に関数を適用しstd::abs Original: applies the function std::abs to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
Original: Exponential functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
valarrayの各要素に関数を適用しstd::exp Original: applies the function std::exp to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
valarrayの各要素に関数を適用しstd::log Original: applies the function std::log to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
valarrayの各要素に関数を適用しstd::log10 Original: applies the function std::log10 to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
Original: Power functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
2 valarraysまたはvalarrayは、値への関数std::powを適用します Original: applies the function std::pow to two valarrays or a valarray and a value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
valarrayの各要素に関数を適用しstd::sqrt Original: applies the function std::sqrt to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
Original: Trigonometric functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
valarrayの各要素に関数を適用しstd::sin Original: applies the function std::sin to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
valarrayの各要素に関数を適用しstd::cos Original: applies the function std::cos to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
valarrayの各要素に関数を適用しstd::tan Original: applies the function std::tan to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
valarrayの各要素に関数を適用しstd::asin Original: applies the function std::asin to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
valarrayの各要素に関数を適用しstd::acos Original: applies the function std::acos to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
valarrayの各要素に関数を適用しstd::atan Original: applies the function std::atan to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
valarrayは、値への関数std::atan2を適用します Original: applies the function std::atan2 to a valarray and a value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
Original: Hyperbolic functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
valarrayの各要素に関数を適用しstd::sinh Original: applies the function std::sinh to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
valarrayの各要素に関数を適用しstd::cosh Original: applies the function std::cosh to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) | |
valarrayの各要素に関数を適用しstd::tanh Original: applies the function std::tanh to each element of valarray The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (関数テンプレート) |
[編集]ヘルパークラス
BLASのようなvalarrayのスライス:開始インデックス、長さ、ストライド Original: BLAS-like slice of a valarray: starting index, length, stride The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラス) | |
スライスを適用した後のvalarrayのサブセットへのプロキシ Original: proxy to a subset of a valarray after applying a slice The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
valarrayの一般的なスライス:開始インデックス、長さのセットは、ストライドのセット Original: generalized slice of a valarray: starting index, set of lengths, set of strides The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラス) | |
gsliceを適用した後のvalarrayのサブセットへのプロキシ Original: proxy to a subset of a valarray after applying a gslice The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
ブールマスク演算子[]を適用した後のvalarrayのサブセットへのプロキシ Original: proxy to a subset of a valarray after applying a boolean mask operator[] The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) | |
間接演算子[]を適用した後のvalarrayのサブセットへのプロキシ Original: proxy to a subset of a valarray after applying indirect operator[] The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (クラステンプレート) |