From 0eba2b0eb3e7e4ebf7ae734988704c2b6fa1875e Mon Sep 17 00:00:00 2001 From: Charles Jekel Date: Sat, 7 Oct 2023 11:10:29 -0700 Subject: [PATCH] bring up docs for 1.0.0 release --- docs/similaritymeasures.html | 49 +++++++++++++++--------------------- docs/version.html | 2 +- 2 files changed, 21 insertions(+), 30 deletions(-) diff --git a/docs/similaritymeasures.html b/docs/similaritymeasures.html index 093a220..657b654 100644 --- a/docs/similaritymeasures.html +++ b/docs/similaritymeasures.html @@ -29,7 +29,6 @@

Module similaritymeasures.similaritymeasures

from __future__ import division
 import numpy as np
 from scipy.spatial import distance
-from scipy.spatial import minkowski_distance
 # MIT License
 #
 # Copyright (c) 2018,2019 Charles Jekel
@@ -118,16 +117,13 @@ 

Module similaritymeasures.similaritymeasures

temp2 = np.cross(cd, da) temp3 = np.cross(da, ab) cross = np.array([temp0, temp1, temp2, temp3]) - # See that cross products are greater than or equal to zero - crossTF = cross >= 0 - # if the cross products are majority false, re compute the cross products - # Because they don't necessarily need to lie in the same 'Z' direction - if sum(crossTF) <= 1: + # See that majority of cross products is non-positive or non-negative + # They don't necessarily need to lie in the same 'Z' direction + if sum(cross > 0) < sum(cross < 0): crossTF = cross <= 0 - if sum(crossTF) > 2: - return True else: - return False + crossTF = cross >= 0 + return sum(crossTF) > 2 def makeQuad(x, y): @@ -524,19 +520,18 @@

Module similaritymeasures.similaritymeasures

""" n = len(exp_data) m = len(num_data) + c = distance.cdist(exp_data, num_data, metric='minkowski', p=p) ca = np.ones((n, m)) ca = np.multiply(ca, -1) - ca[0, 0] = minkowski_distance(exp_data[0], num_data[0], p=p) + ca[0, 0] = c[0, 0] for i in range(1, n): - ca[i, 0] = max(ca[i-1, 0], minkowski_distance(exp_data[i], num_data[0], - p=p)) + ca[i, 0] = max(ca[i-1, 0], c[i, 0]) for j in range(1, m): - ca[0, j] = max(ca[0, j-1], minkowski_distance(exp_data[0], num_data[j], - p=p)) + ca[0, j] = max(ca[0, j-1], c[0, j]) for i in range(1, n): for j in range(1, m): ca[i, j] = max(min(ca[i-1, j], ca[i, j-1], ca[i-1, j-1]), - minkowski_distance(exp_data[i], num_data[j], p=p)) + c[i, j]) return ca[n-1, m-1] @@ -1710,19 +1705,18 @@

Examples

""" n = len(exp_data) m = len(num_data) + c = distance.cdist(exp_data, num_data, metric='minkowski', p=p) ca = np.ones((n, m)) ca = np.multiply(ca, -1) - ca[0, 0] = minkowski_distance(exp_data[0], num_data[0], p=p) + ca[0, 0] = c[0, 0] for i in range(1, n): - ca[i, 0] = max(ca[i-1, 0], minkowski_distance(exp_data[i], num_data[0], - p=p)) + ca[i, 0] = max(ca[i-1, 0], c[i, 0]) for j in range(1, m): - ca[0, j] = max(ca[0, j-1], minkowski_distance(exp_data[0], num_data[j], - p=p)) + ca[0, j] = max(ca[0, j-1], c[0, j]) for i in range(1, n): for j in range(1, m): ca[i, j] = max(min(ca[i-1, j], ca[i, j-1], ca[i-1, j-1]), - minkowski_distance(exp_data[i], num_data[j], p=p)) + c[i, j]) return ca[n-1, m-1]
@@ -1943,16 +1937,13 @@

Returns

temp2 = np.cross(cd, da) temp3 = np.cross(da, ab) cross = np.array([temp0, temp1, temp2, temp3]) - # See that cross products are greater than or equal to zero - crossTF = cross >= 0 - # if the cross products are majority false, re compute the cross products - # Because they don't necessarily need to lie in the same 'Z' direction - if sum(crossTF) <= 1: + # See that majority of cross products is non-positive or non-negative + # They don't necessarily need to lie in the same 'Z' direction + if sum(cross > 0) < sum(cross < 0): crossTF = cross <= 0 - if sum(crossTF) > 2: - return True else: - return False + crossTF = cross >= 0 + return sum(crossTF) > 2
diff --git a/docs/version.html b/docs/version.html index ab61f82..7152d5d 100644 --- a/docs/version.html +++ b/docs/version.html @@ -26,7 +26,7 @@

Module similaritymeasures.version

Expand source code -
__version__ = "0.7.0"
+
__version__ = "1.0.0"