File: samplerow.cpp

package info (click to toggle)
aoflagger 3.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 4,476 kB
  • sloc: cpp: 51,868; python: 152; sh: 25; makefile: 17
file content (22 lines) | stat: -rw-r--r-- 346 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "samplerow.h"

SampleRow SampleRow::MakeWithoutMissings() const
{
	size_t newSize = 0;
	for(num_t v : _values)
	{
		if(std::isfinite(v))
			++newSize;
	}
	SampleRow newRow(newSize);
	size_t indexToNew = 0;
	for(num_t v : _values)
	{
		if(std::isfinite(v))
		{
			newRow._values[indexToNew] = v;
			++indexToNew;
		}
	}
	return newRow;
}