public member function
<valarray>
std::valarray::minReturn smallest value
Returns the minimum value contained in the valarray, as if the elements were compared with operator<.If the valarray has a size of zero, the value returned is unspecified (depends on the particular library implementation).
T shall support being compared with operator<.
1
2
3
4
5
6
7
8
9
10
11
12
// valarray::min example
#include <iostream> // std::cout
#include <valarray> // std::valarray
int main ()
{
int init[]={20,40,10,30};
std::valarray<int> myvalarray (init,4);
std::cout << "The min is " << myvalarray.min() << '\n';
return 0;
}
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