Commit fee1ccf8 authored by limingbo's avatar limingbo

test filterByPosition

parent cb179b2d
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.5.2, 2023-02-02T11:19:58. --> <!-- Written by QtCreator 4.5.2, 2023-02-07T12:46:26. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>
......
...@@ -226,9 +226,13 @@ void filterByPosition( ...@@ -226,9 +226,13 @@ void filterByPosition(
} }
pair<size_t, size_t> longestIndex = make_pair(retIndex, periodIndex); pair<size_t, size_t> longestIndex = make_pair(retIndex, periodIndex);
uint32_t longestPeriod = period.second - period.first; uint32_t longestPeriod = period.second - period.first;
LOG(INFO) << setprecision(15) << "filterByPosition src: " << oneRet.index
<< " start: " << period.first << " period: " << longestPeriod;
for(auto index : aroundIndexVec){ for(auto index : aroundIndexVec){
auto aroundPeriod = ret.at(index.first).periods.at(index.second); auto aroundPeriod = ret.at(index.first).periods.at(index.second);
uint32_t periodDuration = aroundPeriod.second - aroundPeriod.first; uint32_t periodDuration = aroundPeriod.second - aroundPeriod.first;
LOG(INFO) << setprecision(15) << "tar: " << ret.at(index.first).index
<< " start: " << aroundPeriod.first << " period: " << periodDuration;
if(periodDuration > longestPeriod){ if(periodDuration > longestPeriod){
longestPeriod = periodDuration; longestPeriod = periodDuration;
longestIndex = index; longestIndex = index;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment