[chronojump] Fixed a bug on FindPosOfBestN since last commits
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed a bug on FindPosOfBestN since last commits
- Date: Mon, 28 Oct 2019 18:31:58 +0000 (UTC)
commit 50bc62f55220c910611eaa07a713d115cf2e9e46
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Oct 28 19:31:24 2019 +0100
Fixed a bug on FindPosOfBestN since last commits
src/encoder.cs | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/encoder.cs b/src/encoder.cs
index 998bb75a..ebd57f63 100644
--- a/src/encoder.cs
+++ b/src/encoder.cs
@@ -504,15 +504,9 @@ public class EncoderSignal
public List<int> FindPosOfBestN(int start, string variable, int n, Contraction eccon)
{
//1) find how many values to return
- if(eccon == Contraction.C)
- {
- //size of list will be n or the related curves if it is smaller
- if(curves.Count - start < n)
- n = curves.Count - start;
- } else { //(eccon == Contraction.EC)
- if(curves.Count/2 - start < n) //TODO check 0/2 return before
- n = curves.Count/2 - start;
- }
+ //size of list will be n or the related curves if it is smaller
+ if(curves.Count - start < n)
+ n = curves.Count - start;
//2) make a copy of curves and have a new EncoderSignal to work with
ArrayList curvesCopy = new ArrayList();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]