std::valarray
Aus cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
definiert in Header <valarray>
|
||
template< class T > class valarray; |
||
std::valarray ist die Klasse für die Darstellung und Manipulation von Arrays von Werten. Es unterstützt elementweise mathematische Operationen und verschiedene Formen von generalisierten tiefgestellte Operatoren, Aufschneiden und indirekten Zugang .
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.
[Bearbeiten] Notes
std::valarray und Hilfsklassen definiert sind frei von bestimmten Formen von Aliasing, so dass Operationen auf diesen Klassen optimiert ähnlich dem Effekt des Schlüsselworts werden
restrict
in der C-Programmiersprache. Darüber hinaus werden die Funktionen und Operatoren, die valarray
Argumente dürfen Proxy-Objekte zurück, um es möglich, dass der Compiler einen Ausdruck wie v1 = a*v2 + v3; optimieren, wie einer einzelnen Schleife, v1[i] = a*v2[i] + v3[i]; Vermeidung von Provisorien oder mehrere Durchläufe ausführt. Jedoch machen Ausdruck Vorlagen gleich Optimierungstechnik Anzeigeprogramm für C + + Behälter, und die Mehrzahl der numerischen Bibliotheken bevorzugen Expression Vorlagen valarrays für Flexibilität. Einige C + +-Standard-Bibliothek-Implementierungen verwenden Vorlagen für Ausdrücke, um eine effiziente Operationen auf std::valarray
implementieren (zB GNU libstdc + + und LLVM libc + +), und nur selten valarrays optimiert weiter, z. B. in 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, Ausdruck Vorlagen 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.
[Bearbeiten] Mitglied Typen
Mitglied Typ
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
|
[Bearbeiten] Member-Funktionen
baut neue numerische Array 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. (öffentliche Elementfunktion) | |
zerstört sich die numerische Array 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. (öffentliche Elementfunktion) | |
ordnet die Inhalte 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. (öffentliche Elementfunktion) | |
get / set valarray Element, Scheibe, oder Maske 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. (öffentliche Elementfunktion) | |
gilt eine unäre arithmetische Operator für jedes Element des 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. (öffentliche Elementfunktion) | |
gilt Verbindung Zuweisungsoperator zu jedem Element des 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. (öffentliche Elementfunktion) | |
Swaps mit anderen 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. (öffentliche Elementfunktion) | |
gibt die Größe der 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. (öffentliche Elementfunktion) | |
ändert die Größe 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. (öffentliche Elementfunktion) | |
berechnet die Summe aller Elemente 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. (öffentliche Elementfunktion) | |
gibt das kleinste Element 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. (öffentliche Elementfunktion) | |
liefert den größten Element 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. (öffentliche Elementfunktion) | |
Nullfüllung verschieben die Elemente des 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. (öffentliche Elementfunktion) | |
Ringschieberegister der Elemente des 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. (öffentliche Elementfunktion) | |
applies a function to every element of a valarray (öffentliche Elementfunktion) |
[Bearbeiten] Non-Member-Funktionen
(C++11) |
spezialisiert die std::swap() Algorithmus 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. (Funktions-Template) |
(C++11) |
spezialisiert 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. (Funktions-Template) |
(C++11) |
spezialisiert 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. (Funktions-Template) |
gilt Binäroperatoren auf jedes Element von zwei valarrays oder ein valarray und einem Wert 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. (Funktions-Template) | |
vergleicht zwei valarrays oder eine valarray mit einem Wert 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. (Funktions-Template) | |
wendet die Funktion std::abs auf jedes Element valarray 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. (Funktions-Template) | |
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. | |
wendet die Funktion std::exp auf jedes Element valarray 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. (Funktions-Template) | |
wendet die Funktion std::log auf jedes Element valarray 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. (Funktions-Template) | |
wendet die Funktion std::log10 auf jedes Element valarray 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. (Funktions-Template) | |
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. | |
wendet die Funktion std::pow zwei valarrays oder valarray und einem Wert 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. (Funktions-Template) | |
wendet die Funktion std::sqrt auf jedes Element valarray 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. (Funktions-Template) | |
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. | |
wendet die Funktion std::sin auf jedes Element valarray 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. (Funktions-Template) | |
wendet die Funktion std::cos auf jedes Element valarray 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. (Funktions-Template) | |
wendet die Funktion std::tan auf jedes Element valarray 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. (Funktions-Template) | |
wendet die Funktion std::asin auf jedes Element valarray 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. (Funktions-Template) | |
wendet die Funktion std::acos auf jedes Element valarray 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. (Funktions-Template) | |
wendet die Funktion std::atan auf jedes Element valarray 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. (Funktions-Template) | |
wendet die Funktion std::atan2 einer valarray und einem Wert 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. (Funktions-Template) | |
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. | |
wendet die Funktion std::sinh auf jedes Element valarray 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. (Funktions-Template) | |
wendet die Funktion std::cosh auf jedes Element valarray 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. (Funktions-Template) | |
wendet die Funktion std::tanh auf jedes Element valarray 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. (Funktions-Template) |
[Bearbeiten] Helper-Klassen
BLAS-ähnliche Scheibe eines valarray: Startindex, Länge, Schritt 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. (Klasse) | |
Proxy auf eine Teilmenge eines valarray nach Anwendung einer Scheibe 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. (Klassen-Template) | |
generalisierte Scheibe eines valarray: Startindex, Längen eingestellt, der Fortschritte festgelegt 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. (Klasse) | |
Proxy auf eine Teilmenge eines valarray nach Anwendung eines GSlice 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. (Klassen-Template) | |
Proxy auf eine Teilmenge eines valarray nach Anwendung einer Booleschen Operator Maske [] 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. (Klassen-Template) | |
Proxy auf eine Teilmenge eines valarray nach Anlegen indirekten Operator [] 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. (Klassen-Template) |