diff --git a/yoshi-seals1.3.3-1/Seals/eigen/eigen.py b/yoshi-seals1.3.3-1/Seals/eigen/eigen.py index 52c62f2..3adf9b3 100644 --- a/yoshi-seals1.3.3-1/Seals/eigen/eigen.py +++ b/yoshi-seals1.3.3-1/Seals/eigen/eigen.py @@ -21,11 +21,11 @@ import numpy as np def eigen(a): - k = 0 + b = np.random.rand(a.shape[0],a.shape[1]) l = np.ones((a.shape[0])) + k = 0 at = a #variavel temporaria para A - b = np.random.rand(a.shape[0],a.shape[1]) while (k < at.shape[0]): @@ -34,21 +34,21 @@ def eigen(a): ctrl = 0 - while (ctrl != l[k]): + while abs(ctrl - l[k]) > 10**(-8): ctrl = l[k] u = at.dot(u) l[k] = max(u.min(), u.max(), key=abs) u = u/l[k] - alpha = 0.999*l[k] - - t = np.random.rand(a.shape[0],1) + alpha = .999*l[k] b[k] = b[k]/max(b[k].min(), b[k].max(), key=abs) - t = l/max(l.min(), l.max(), key=abs) + t = np.random.rand(a.shape[0],1) + t = t/max(t.min(), t.max(), key=abs) + + while not (np.allclose(b[k],t,atol=10**(-8))): - while not (np.allclose(b[k],t,atol=10**(-17))): t = b[k].copy() b[k] = np.linalg.solve((a - alpha*np.identity(a.shape[0])),((l[k]-alpha)*t)) b[k] = b[k]/max(b[k].min(), b[k].max(), key=abs) diff --git a/yoshi-seals1.3.3-1/build/lib/Seals/eigen/eigen.py b/yoshi-seals1.3.3-1/build/lib/Seals/eigen/eigen.py index 52c62f2..3adf9b3 100644 --- a/yoshi-seals1.3.3-1/build/lib/Seals/eigen/eigen.py +++ b/yoshi-seals1.3.3-1/build/lib/Seals/eigen/eigen.py @@ -21,11 +21,11 @@ import numpy as np def eigen(a): - k = 0 + b = np.random.rand(a.shape[0],a.shape[1]) l = np.ones((a.shape[0])) + k = 0 at = a #variavel temporaria para A - b = np.random.rand(a.shape[0],a.shape[1]) while (k < at.shape[0]): @@ -34,21 +34,21 @@ def eigen(a): ctrl = 0 - while (ctrl != l[k]): + while abs(ctrl - l[k]) > 10**(-8): ctrl = l[k] u = at.dot(u) l[k] = max(u.min(), u.max(), key=abs) u = u/l[k] - alpha = 0.999*l[k] - - t = np.random.rand(a.shape[0],1) + alpha = .999*l[k] b[k] = b[k]/max(b[k].min(), b[k].max(), key=abs) - t = l/max(l.min(), l.max(), key=abs) + t = np.random.rand(a.shape[0],1) + t = t/max(t.min(), t.max(), key=abs) + + while not (np.allclose(b[k],t,atol=10**(-8))): - while not (np.allclose(b[k],t,atol=10**(-17))): t = b[k].copy() b[k] = np.linalg.solve((a - alpha*np.identity(a.shape[0])),((l[k]-alpha)*t)) b[k] = b[k]/max(b[k].min(), b[k].max(), key=abs) diff --git a/yoshi-seals1.3.3-1/dist/yoshi-seals-1.3.3.post1.tar.gz b/yoshi-seals1.3.3-1/dist/yoshi-seals-1.3.3.post1.tar.gz index cb4c4c7..e6bfdd0 100644 Binary files a/yoshi-seals1.3.3-1/dist/yoshi-seals-1.3.3.post1.tar.gz and b/yoshi-seals1.3.3-1/dist/yoshi-seals-1.3.3.post1.tar.gz differ diff --git a/yoshi-seals1.3.3-1/dist/yoshi_seals-1.3.3.post1-py3-none-any.whl b/yoshi-seals1.3.3-1/dist/yoshi_seals-1.3.3.post1-py3-none-any.whl index 441ab99..5aa18e6 100644 Binary files a/yoshi-seals1.3.3-1/dist/yoshi_seals-1.3.3.post1-py3-none-any.whl and b/yoshi-seals1.3.3-1/dist/yoshi_seals-1.3.3.post1-py3-none-any.whl differ