From 0901ba5002c937f8fdb9d7dbfd38f59f634cc57a Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Fri, 22 Apr 2022 22:31:17 +0200
Subject: [PATCH] Rename `nl_cost_function` to `cost_function`

Rename property `nl_cost_function` to `cost_function`.
---
 cost_function.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/cost_function.py b/cost_function.py
index 72d4e6fd..16391d8c 100755
--- a/cost_function.py
+++ b/cost_function.py
@@ -121,7 +121,7 @@ g.vp['first_av_rad'] = g.new_vp('float')
 g.vp['first_av_ros'] = g.new_vp('float')
 g.vp['last_av_rad'] = g.new_vp('float')
 g.vp['last_av_ros'] = g.new_vp('float')
-g.ep['nl_cost_function'] = g.new_ep('float')
+g.ep['cost_function'] = g.new_ep('float')
 
 # Set up the list of SHPC:
 
@@ -285,8 +285,7 @@ for edge in g.edges():
     cf = math.sqrt(first_term + second_term + third_term)
 
     # assign as weight to the edge
-    g.ep.nl_cost_function[edge] = cf
-
+    g.ep.cost_function[edge] = cf
 
 t1 = time.perf_counter()
 timings.write(f"iterating on edges: {t1 - t0} s\n")
-- 
GitLab