aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations
diff options
context:
space:
mode:
authorMuriithi Frederick Muriuki2021-07-22 13:58:18 +0300
committerMuriithi Frederick Muriuki2021-07-22 13:58:18 +0300
commit0263a7c79e3131d42006a38ac2fbb80556506491 (patch)
tree94c90b9f21c610432a32f457876eea427cd79fff /gn3/computations
parent0b71c74992ab1bff82d14902c51f52c3c6fbe4a1 (diff)
downloadgenenetwork3-0263a7c79e3131d42006a38ac2fbb80556506491.tar.gz
Check that given list and both coordinates, we get shortest distance
* gn3/computations/slink.py: Add code to compute the distance given the coordinate of both members on the parent list/tuple * tests/unit/computations/test_slink.py: * Change the name of the tests to more closely correspond to the business requirement the test is checking for * Update the comments to indicate some more things that might need to be done in the future
Diffstat (limited to 'gn3/computations')
-rw-r--r--gn3/computations/slink.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gn3/computations/slink.py b/gn3/computations/slink.py
index 7d13d91..7b4016a 100644
--- a/gn3/computations/slink.py
+++ b/gn3/computations/slink.py
@@ -71,3 +71,5 @@ This description should be updated once the form/type of 'distance' identified."
raise_valueerror_on_negative_distances(lists)
#### END: Guard Functions ####
return None
+ if type(i) == int and type(j) == int: # From member i to member j
+ return lists[i][j]