time - efficient way of creating regular series c++ -
i've got txt file comma delimiters in each line contains information collected @ time. format of line follows: timeinseconds, numericvar1, numericvar2
however, information not collected regularly in time. idea using c++: step 1. create regular series, timeinsecondsregular, desired (lower frequency) intervals 30 min, 1 hour, etc. step 2. pick closest line in time, previous target date of sequence, file: max(0, min(timeinsecondsregular - timeinseconds)). step 3. write regular series new file.
i thinking of using getline i've read not efficient. file has around 100.000 rows. alternatives out there?
Comments
Post a Comment