Refactor base algorithm

This commit is contained in:
2022-12-08 22:28:21 +01:00
parent c4e5cf1629
commit 4939a5b673
25 changed files with 538 additions and 1130 deletions

View File

@@ -13,7 +13,7 @@ namespace FImdlp {
int n = X.size();
for (i = 1; i < n; i++) {
if (X.at(i) != ant) {
cutPts.push_back(float(X.at(i) + ant) / 2);
cutPts.push_back(precision_t(X.at(i) + ant) / 2);
ant = X.at(i);
}
}

View File

@@ -5,7 +5,7 @@ from libcpp.vector cimport vector
cdef extern from "FImdlp.h" namespace "FImdlp":
cdef cppclass FImdlp:
FImdlp() except +
vector[float] cutPoints(vector[int]&, vector[int]&)
vector[precision_t] cutPoints(vector[int]&, vector[int]&)
cdef class CFImdlp:
cdef FImdlp *thisptr