This commit is contained in:
2023-09-27 21:20:04 +08:00
parent 7f22b4fe3f
commit b6d10cd394
2 changed files with 16 additions and 16 deletions

View File

@@ -211,18 +211,18 @@ inline void Output::write(std::string filename, std::string format, unsigned per
frequency_to_weight.erase(it_lower, it_upper);
frequency_to_weight[frequency_sum / weight_sum] = weight_sum;
}
auto& _ = output.QPointData.emplace_back();
_.QPoint = qpoint->QPoint;
_.Source = qpoint->Source;
_.SourceIndex_ = qpoint->SourceIndex_;
for (auto [frequency, weight] : frequency_to_weight)
if (weight > 0.1)
{
auto& __ = _.ModeData.emplace_back();
__.Frequency = frequency;
__.Weight = weight;
}
}
auto& _ = output.QPointData.emplace_back();
_.QPoint = qpoint->QPoint;
_.Source = qpoint->Source;
_.SourceIndex_ = qpoint->SourceIndex_;
for (auto [frequency, weight] : frequency_to_weight)
if (weight > 0.1)
{
auto& __ = _.ModeData.emplace_back();
__.Frequency = frequency;
__.Weight = weight;
}
}
output.write(filename, "yaml", 3);
}