<valarray>
Defines the template class valarray and numerous supporting template classes and functions.
#include <valarray>
Remarks
These template classes and functions are permitted unusual latitude in the interest of improved performance. Specifically, any function returning type valarray<T1> may return an object of some other type T2. In that case, any function that accepts one or more arguments of type valarray<T2> must have overloads that accept arbitrary combinations of those arguments, each replaced with an argument of type T2.
Functions
Operates on the elements of an input valarray, returning a valarray whose elements are equal to the absolute value of the elements of the input valarray. |
|
Operates on the elements of an input valarray, returning a valarray whose elements are equal to the arccosine of the elements of the input valarray. |
|
Operates on the elements of an input valarray, returning a valarray whose elements are equal to the arcsine of the elements of the input valarray. |
|
Operates on the elements of an input valarray, returning a valarray whose elements are equal to the principal value of the arctangent of the elements of the input valarray. |
|
Returns a valarray whose elements are equal to the arctangent of the Cartesian components specified by a combination of constants and elements of valarrays. |
|
Operates on the elements of an input valarray, returning a valarray whose elements are equal to the cosine of the elements of the input valarray. |
|
Operates on the elements of an input valarray, returning a valarray whose elements are equal to the hyperbolic cosine of the elements of the input valarray. |
|
Operates on the elements of an input valarray, returning a valarray whose elements are equal to the natural exponential of the elements of the input valarray. |
|
Operates on the elements of an input valarray, returning a valarray whose elements are equal to the natural logarithm of the elements of the input valarray. |
|
Operates on the elements of an input valarray, returning a valarray whose elements are equal to the base 10 or common logarithm of the elements of the input valarray. |
|
Operates on the elements of input valarrays and constants, returning a valarray whose elements are equal to a base specified either by the elements of an input valarray or a constant raised to an exponent specified either by the elements of an input valarray or a constant. |
|
Operates on the elements of an input valarray, returning a valarray whose elements are equal to the sine of the elements of the input valarray. |
|
Operates on the elements of an input valarray, returning a valarray whose elements are equal to the hyperbolic sine of the elements of the input valarray. |
|
Operates on the elements of an input valarray, returning a valarray whose elements are equal to the square root of the elements of the input valarray. |
|
Operates on the elements of an input valarray, returning a valarray whose elements are equal to the tangent of the elements of the input valarray. |
|
Operates on the elements of an input valarray, returning a valarray whose elements are equal to the hyperbolic tangent of the elements of the input valarray. |
Operators
Tests whether the corresponding elements of two equally sized valarrays are unequal or whether all the elements of a valarray are unequal a specified value of the valarray's element type. |
|
Obtains the remainder of dividing the corresponding elements of two equally sized valarrays or of dividing a valarray by a specified value of the valarray's element type or of dividing a specified value by a valarray. |
|
Obtains the bitwise AND between corresponding elements of two equally sized valarrays or between a valarray and a specified value of the element type. |
|
Obtains the logical AND between corresponding elements of two equally sized valarrays or between a valarray and a specified value of the valarray's element type. |
|
Tests whether the elements of one valarray are greater than the elements of an equally sized valarray or whether all the elements of a valarray are greater or less than a specified value of the valarray's element type. |
|
Tests whether the elements of one valarray are greater than or equal to the elements of an equally sized valarray or whether all the elements of a valarray are greater than or equal to or less than or equal to a specified value. |
|
Right-shifts the bits for each element of a valarray a specified number of positions or by an element-wise amount specified by a second valarray. |
|
Tests whether the elements of one valarray are less than the elements of an equally sized valarray or whether all the elements of a valarray are greater or less than a specified value. |
|
Tests whether the elements of one valarray are less than or equal to the elements of an equally sized valarray or whether all the elements of a valarray are greater than or equal to or less than or equal to a specified value. |
|
Left shifts the bits for each element of a valarray a specified number of positions or by an element-wise amount specified by a second valarray. |
|
Obtains the element-wise product between corresponding elements of two equally sized valarrays or of between a valarray a specified value of the valarray's element type. |
|
Obtains the element-wise sum between corresponding elements of two equally sized valarrays or of between a valarray a specified value of the valarray's element type. |
|
Obtains the element-wise difference between corresponding elements of two equally sized valarrays or of between a valarray a specified value of the valarray's element type. |
|
Obtains the element-wise quotient between corresponding elements of two equally sized valarrays or of between a valarray a specified value of the valarray's element type. |
|
Tests whether the corresponding elements of two equally sized valarrays are equal or whether all the elements of a valarray are equal a specified value of the valarray's element type. |
|
Obtains the bitwise exclusive OR between corresponding elements of two equally sized valarrays or between a valarray and a specified value of the element type. |
|
Obtains the bitwise OR between corresponding elements of two equally sized valarrays or between a valarray and a specified value of the element type. |
|
Obtains the logical OR between corresponding elements of two equally sized valarrays or between a valarray and a specified value of the valarray's element type. |
Classes
A utility class to valarray that is used to define multi-dimensional slices of a valarray. |
|
An internal, auxiliary template class that supports general slice objects by providing operations between subset arrays defined by the general slice of a valarray. |
|
An internal, auxiliary template class that supports objects that are subsets of valarrays by providing operations between subset arrays defined by specifying a subset of indices of a parent valarray. |
|
An internal, auxiliary template class that supports objects that are subsets of parent valarrays, specified with a Boolean expression, by providing operations between the subset arrays. |
|
A utility class to valarray that is used to define one-dimensional, vector-like subsets of a valarray. |
|
An internal, auxiliary template class that supports slice objects by providing operations between subset arrays defined by the slice of a valarray. |
|
The template class describes an object that controls a sequence of elements of type Type that are stored as an array and designed for performing high-speed mathematical operations, optimized for computational performance. |
Specializations
A specialized version of the template class valarray<Type> to elements of type bool. |
See Also
Reference
Thread Safety in the Standard C++ Library