Пространства имён
Варианты
Действия

std::valarray

Материал из cppreference.com

 
 
 
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.
Не являющиеся членами функций
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>
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.

Содержание

[править] Notes

std::valarray и вспомогательные классы определяются быть свободным от определенных форм сглаживания, что позволяет операциях на эти классы должны быть оптимизированы похож на эффект ключевое слово restrict на языке программирования Си. Кроме того, функций и операторов, которые принимают valarray аргументы разрешили вернуться прокси-объекты, чтобы сделать это возможным для компилятора, чтобы оптимизировать выражения, такие как v1 = a*v2 + v3; как единый цикл, который выполняется 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.

[править] Член типов

Член типа
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.

(public функция-член) [edit]
разрушает числовых массивов
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.

(public функция-член) [edit]
присваивает содержимое
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.

(public функция-член) [edit]
получить / установить 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.

(public функция-член) [edit]
применяется унарный оператор арифметическое для каждого элемента 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.

(public функция-член) [edit]
применяется оператор присваивания для каждого элемента 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.

(public функция-член) [edit]
свопы с другой 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.

(public функция-член) [edit]
возвращает размер 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.

(public функция-член) [edit]
изменяет размер 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.

(public функция-член) [edit]
вычисляет сумму всех элементов
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.

(public функция-член) [edit]
возвращает наименьший элемент
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.

(public функция-член) [edit]
возвращает наибольший элемент
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.

(public функция-член) [edit]
нулевом заполнении перенести элементы 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.

(public функция-член) [edit]
циклический сдвиг элементов 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.

(public функция-член) [edit]
applies a function to every element of a valarray
(public функция-член) [edit]

[править] Не являющиеся членами функций

Специализируется 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.

(шаблон функции) [edit]
Специализируется 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.

(шаблон функции) [edit]
Специализируется 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.

(шаблон функции) [edit]
применяется бинарных операторов для каждого элемента из двух 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.

(шаблон функции) [edit]
сравнивает два 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.

(шаблон функции) [edit]
применяет функцию std::abs к каждому элементу 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.

(шаблон функции) [edit]
Экспоненциальной функции
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.
применяет функцию std::exp к каждому элементу 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.

(шаблон функции) [edit]
применяет функцию std::log к каждому элементу 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.

(шаблон функции) [edit]
применяет функцию std::log10 к каждому элементу 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.

(шаблон функции) [edit]
Мощность функций
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.
применяет функцию std::pow до двух valarrays или valarray и значение
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.

(шаблон функции) [edit]
применяет функцию std::sqrt к каждому элементу 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.

(шаблон функции) [edit]
Тригонометрические функции
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.
применяет функцию std::sin к каждому элементу 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.

(шаблон функции) [edit]
применяет функцию std::cos к каждому элементу 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.

(шаблон функции) [edit]
применяет функцию std::tan к каждому элементу 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.

(шаблон функции) [edit]
применяет функцию std::asin к каждому элементу 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.

(шаблон функции) [edit]
применяет функцию std::acos к каждому элементу 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.

(шаблон функции) [edit]
применяет функцию std::atan к каждому элементу 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.

(шаблон функции) [edit]
применяет функцию std::atan2 в valarray и значение
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.

(шаблон функции) [edit]
Гиперболические функции
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.
применяет функцию std::sinh к каждому элементу 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.

(шаблон функции) [edit]
применяет функцию std::cosh к каждому элементу 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.

(шаблон функции) [edit]
применяет функцию std::tanh к каждому элементу 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.

(шаблон функции) [edit]

[править] Вспомогательные классы

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.

(класс) [edit]
прокси подмножество 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.

(шаблон класса) [edit]
обобщенной кусочек 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.

(класс) [edit]
прокси подмножество valarray после применения 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.

(шаблон класса) [edit]
прокси подмножество 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.

(шаблон класса) [edit]
прокси подмножество 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.

(шаблон класса) [edit]