Remove final remaining comment from distribution.h
This commit is contained in:
parent
c53b108500
commit
ecf02306b2
@ -10,7 +10,6 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "mix_cc/ihyper_db.h"
|
#include "mix_cc/ihyper_db.h"
|
||||||
// 炉辊组算法无需额外的算法初始化步骤
|
|
||||||
int Roller2::init() {
|
int Roller2::init() {
|
||||||
int res = 0;
|
int res = 0;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -10,7 +10,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
// 炉辊组算法无需额外的算法初始化步骤
|
|
||||||
int Roller3::init() {
|
int Roller3::init() {
|
||||||
int res = 0;
|
int res = 0;
|
||||||
try {
|
try {
|
||||||
@ -366,7 +365,7 @@ vector<int> Roller3::extractTagNumbers(const string &expr) {
|
|||||||
if (numEnd > numStart) {
|
if (numEnd > numStart) {
|
||||||
string numStr = expr.substr(numStart, numEnd - numStart);
|
string numStr = expr.substr(numStart, numEnd - numStart);
|
||||||
try {
|
try {
|
||||||
int num = stoi(numStr); // 将字符串转换为整数[7](@ref)
|
int num = stoi(numStr);
|
||||||
result.push_back(num);
|
result.push_back(num);
|
||||||
} catch (const invalid_argument &e) {
|
} catch (const invalid_argument &e) {
|
||||||
// 处理无效数字字符串(例如非数字内容),根据需求可忽略或记录错误
|
// 处理无效数字字符串(例如非数字内容),根据需求可忽略或记录错误
|
||||||
@ -407,10 +406,9 @@ Roller3::findMaxWithIndex(const std::vector<double> &vec) {
|
|||||||
return std::make_pair(-1, 0.0); // 返回无效值
|
return std::make_pair(-1, 0.0); // 返回无效值
|
||||||
}
|
}
|
||||||
|
|
||||||
// 使用max_element找到最大元素的迭代器[1,2,5](@ref)
|
// 使用max_element找到最大元素的迭代器
|
||||||
auto max_iter = std::max_element(vec.begin(), vec.end());
|
auto max_iter = std::max_element(vec.begin(), vec.end());
|
||||||
|
|
||||||
// 计算下标序号[1,6,8](@ref)
|
|
||||||
int index = std::distance(vec.begin(), max_iter);
|
int index = std::distance(vec.begin(), max_iter);
|
||||||
|
|
||||||
// 获取最大值
|
// 获取最大值
|
||||||
|
|||||||
@ -128,4 +128,4 @@ class Dist {
|
|||||||
mix_cc::float_range_t get_range(double prob);
|
mix_cc::float_range_t get_range(double prob);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace DAA
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user