It is designed to hold an array of values, and easily perform mathematical operations on them. It also allows special mechanisms to refer to subsets of elements in the arrays.
DeclarationFollowing is the declaration for std::valarray.
template <class T> class valarray;C++11
template <class T> class valarray;Parameters
T − It is a type of the elements contained in the valarray.
Member functions Sr.No. Member function & description 1 (constructor)It is a valarray constructor.
2 (destructor)It is a valarray destructor.
3 valarray operatorsIt is a valarray operators.
4 applyIt is an apply function.
5 cshiftIt is a circularly shift elements.
6 maxIt returns greatest value.
7 minIt returns smallest value.
8 operator=It assigns the content.
9 operator[]It is used to access element or subscript.
10 resizeIt is used to resize valarray.
11 shiftIt is used to shift elements.
12 sizeIt returns size.
13 sumIt returns sum of elements.
14 swapIt swaps valarray contents.
Non-member overloads Sr.No. Non-member overload & description 1 valarray operatorsIt is a valarray operators.
2 swapIt is a swap valarrays.
3 beginIt iterators to beginning.
4 endIt iterators to end.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4