From 9ba75bf0c519dc0b2b242ebed1d3686eb5956c6b Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Tue, 19 Apr 2022 17:11:11 +0200
Subject: [PATCH] Polish

---
 cost_function.py | 4 +++-
 segments.py      | 9 +++------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/cost_function.py b/cost_function.py
index 7c371328..02b37f55 100755
--- a/cost_function.py
+++ b/cost_function.py
@@ -120,7 +120,9 @@ for year in range(1993,2019):
 # change if there is a change over the number of days to average
 num_of_days_to_avg = 7
 
-# we iterate on the years because the segments are non sequential in time
+# We iterate on the years because the segments are non sequential in
+# time. For each year, we are going to process only the segments that
+# begin in that year.
 for yr in range(1993, 2019):
     print(f'Current year: {yr}') 
     
diff --git a/segments.py b/segments.py
index 2cc3fd5b..f9388ff0 100755
--- a/segments.py
+++ b/segments.py
@@ -36,17 +36,14 @@ t1 = time.perf_counter()
 print(f'Loading done in {t1 - t0:.0f} s')
 t0 = t1
 
-#####################
-# Set property maps #
-#####################
-
-g.vp['segment'] = g.new_vp('object') # this object will be a list
-
 ##############
 # Processing #
 ##############
 
+# Set property maps:
+g.vp['segment'] = g.new_vp('object') # this object will be a list
 del g.properties[("e", "weight")]
+
 print('Collapsing into segments...')
 g.set_fast_edge_removal()
 verts_to_del = []
-- 
GitLab