Or login with:
| template<class T>Tlargest( | int | n | |
| T* | data | ||
| int | k | )[inline] |
#include <codecogs/statistics/moments/largest.h> #include <iostream> int main() { double a[6] = {0.2, 1.24, 0.5, 2.54, 2.3, 0.3}, large = Stats::Moments::largest<double>(6, a, 3); std::cout << "The 3rd largest value of the array is: " << large; std::cout << std::endl; return 0; }
The 3rd largest value of the array is: 1.24| n | the size of the array |
| data | an array of numerical data for which you want to determine the k-th smallest value |
| k | the order of the largest value to return |
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
You must login to leave a messge