std::valarray<T>::min

Computes the minimum value of the elements.

# Declarations

T min() const;

# Return value

The minimum of the elements.

# Example

#include <valarray>
#include <iostream>
 
int main()
{
    std::valarray<double> a{1, 2, 3, 4, 5, 6, 7, 8};
    std::cout << "Minimum value : " << a.min() << "\n";
}

# See also