From 79e9137726b92cf40293c082593c0c2bb30c7bbe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Th=C3=A9otime=20Grohens?= <theotime.grohens@insa-lyon.fr>
Date: Thu, 16 Jan 2020 18:38:01 +0100
Subject: [PATCH] Add comment in Fuzzy::add_point

---
 src/libaevol/Fuzzy.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/libaevol/Fuzzy.cpp b/src/libaevol/Fuzzy.cpp
index fc605b0ec..f1c718078 100644
--- a/src/libaevol/Fuzzy.cpp
+++ b/src/libaevol/Fuzzy.cpp
@@ -476,12 +476,14 @@ void Fuzzy::clear() {
 
 void Fuzzy::add_point(ProteinConcentration x, ProteinConcentration y)
 {
+  // Don't add a new point if there's already a point at the same x.
   list<Point>::iterator p =
 #ifndef __OPENMP_GPU
       find_if(points_.begin(), points_.end(), [x](Point& q){return q.x > x;});
 #else
       algorithm_cuda::find_if_point_5(points_.begin(), points_.end(), x);
 #endif
+
   if (prev(p)->x == x) {
     prev(p)->y += y;
   } else {
-- 
GitLab