std::vector<int64_t> randomId;
//randomId插入数据
for(auto &&layer : layers)
{
for(auto &&defect : layer.get_defect_lst())
{
randomId.emplace_back(defect.get_defect().id());
}
}
//打乱顺序
std::random_shuffle(randomId.begin(), randomId.end());
std::vector<int64_t> randomId;
//randomId插入数据
for(auto &&layer : layers)
{
for(auto &&defect : layer.get_defect_lst())
{
randomId.emplace_back(defect.get_defect().id());
}
}
//打乱顺序
std::random_shuffle(randomId.begin(), randomId.end());