double MainWindow:: get_mean(QVector<double> in)
{
    double sum = std::accumulate(in.begin(), in.end(), 0.0);
    double mean =  sum / in.size(); //均值
    return mean;
}

 

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐