utils.cpp
Go to the documentation of this file.
1 #include "utils.h"
2 
3 /*
4 std::vector<double> BuiltTimepointsList(PlotDataMapRef &data)
5 {
6  {
7  std::vector<size_t> index_num( data.numeric.size(), 0);
8 
9  std::vector<double> out;
10 
11  bool loop = true;
12 
13  const double MAX = std::numeric_limits<double>::max();
14 
15  while(loop)
16  {
17  double min_time = MAX;
18  double prev_time = out.empty() ? -MAX : out.back();
19  loop = false;
20  size_t count = 0;
21  for(const auto& it: data.numeric)
22  {
23  const auto& plot = it.second;
24  out.reserve(plot.size());
25 
26  size_t index = index_num[count];
27 
28  while ( index < plot.size() && plot.at(index).x <= prev_time )
29  {
30  index++;
31  }
32  if( index >= plot.size() )
33  {
34  count++;
35  continue;
36  }
37  else{
38  loop = true;
39  }
40  index_num[count] = index;
41  double time_val = plot.at(index).x;
42  min_time = std::min( min_time, time_val);
43  count++;
44  }
45  if( min_time < MAX)
46  {
47  out.push_back( min_time );
48  }
49  }
50  return out;
51  }
52 }
53 */


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:18