#include <eve/module/math.hpp>
#include <iostream>
int main()
{
kumi::tuple wt{pf, qf, rf};
auto rf0 = f0;
auto rf1 = f1;
auto f2 = [](
auto x){
return eve::sqr(x); };
auto rf2 = [](
auto x){
return eve::sqrt(x); };
std::cout << "<- pf = " << pf << "\n";
std::cout << "<- qf = " << qf << "\n";
std::cout << "<- rf = " << rf << "\n";
std::cout << "<- wt = " << wt << "\n";
std::cout <<
"-> kolmmean(f0, rf0, pf, qf, rf) = " <<
eve::kolmmean(f0, rf0, pf, qf, rf) <<
" //l1 mean\n";
std::cout <<
"-> kolmmean(f0, rf0, wt) = " <<
eve::kolmmean(f0, rf0, wt) <<
"\n";
std::cout <<
"-> kolmmean(f1, rf1, pf, qf, rf) = " <<
eve::kolmmean(f1, rf1, pf, qf, rf) <<
" //harmonic mean\n";
std::cout <<
"-> kolmmean(f1, rf1, wt) = " <<
eve::kolmmean(f1, rf1, wt) <<
"\n";
std::cout <<
"-> kolmmean(f2, rf2, pf, qf, rf) = " <<
eve::kolmmean(f2, rf2, pf, qf, rf) <<
" // quadratic mean\n";
std::cout <<
"-> kolmmean(f2, rf2, wt) = " <<
eve::kolmmean(f2, rf2, wt) <<
"\n\n";
}
constexpr auto sqr
Computes the square of the parameter.
Definition sqr.hpp:97
constexpr auto rec
Computes the inverse of the parameter.
Definition rec.hpp:93
constexpr auto sqrt
Computes the elementwise square root of the parameter.
Definition sqrt.hpp:81
constexpr auto abs
elementwise_callable object computing the absolute value of the parameter.
Definition abs.hpp:86
Wrapper for SIMD registers.
Definition wide.hpp:94