mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Merge pull request #66320 from waynexia/period-detect
Avoid unneeded calculation in SeriesPeriodDetect
This commit is contained in:
commit
e501894767
@ -153,12 +153,8 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<double> xfreq(spec_len);
|
|
||||||
double step = 0.5 / (spec_len - 1);
|
double step = 0.5 / (spec_len - 1);
|
||||||
for (size_t i = 0; i < spec_len; ++i)
|
auto freq = idx * step;
|
||||||
xfreq[i] = i * step;
|
|
||||||
|
|
||||||
auto freq = xfreq[idx];
|
|
||||||
|
|
||||||
period = std::round(1 / freq);
|
period = std::round(1 / freq);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user