Initial commit

This commit is contained in:
2022-11-26 20:06:40 +01:00
parent adffe6cca8
commit db19867779
7 changed files with 97 additions and 0 deletions

25
FImdlp.cpp Normal file
View File

@@ -0,0 +1,25 @@
#include "FImdlp.h"
namespace FImdlp
{
FImdlp::FImdlp()
{
}
FImdlp::~FImdlp()
{
}
std::vector<float> FImdlp::cutPoints(std::vector<int> &X, std::vector<int> &y)
{
std::vector<float> cutPts;
int i, ant = X.at(0);
int n = X.size();
for (i = 1; i < n; i++)
{
if (X.at(i) != ant)
{
cutPts.push_back(float(X.at(i) + ant) / 2);
ant = X.at(i);
}
}
return cutPts;
}
}