std::sort(vector1.begin(), vector1.end(), [] (const std::vector<double> &a, const std::vector<double> &b) { return a[3] < b[3]; });