Added tests to constant kernel

This commit is contained in:
2020-12-19 13:39:12 +01:00
parent aca4284ddd
commit 2708403923
8 changed files with 113 additions and 11 deletions

View File

@@ -227,15 +227,12 @@ impl Fitter for RecursiveFitter {
let mut ms = Vec::new();
let mut vs = Vec::new();
let locations = ts
.iter()
.map(|t| {
self.ts
.iter()
.position(|tc| t <= tc)
.unwrap_or_else(|| self.ts.len())
})
.collect::<Vec<_>>();
let locations = ts.iter().map(|t| {
self.ts
.iter()
.position(|tc| t <= tc)
.unwrap_or_else(|| self.ts.len())
});
for (i, nxt) in locations.into_iter().enumerate() {
if nxt == self.ts.len() {