Merge branch 'future'

This commit is contained in:
2021-11-03 21:26:42 -03:00
54 changed files with 18 additions and 36 deletions

BIN
yoshi-seals1.3.3-1.tar.xz Normal file

Binary file not shown.

View File

@@ -21,11 +21,11 @@ import numpy as np
def eigen(a): def eigen(a):
k = 0 b = np.random.rand(a.shape[0],a.shape[1])
l = np.ones((a.shape[0])) l = np.ones((a.shape[0]))
k = 0
at = a #variavel temporaria para A at = a #variavel temporaria para A
b = np.random.rand(a.shape[0],a.shape[1])
while (k < at.shape[0]): while (k < at.shape[0]):
@@ -34,21 +34,21 @@ def eigen(a):
ctrl = 0 ctrl = 0
while (ctrl != l[k]): while abs(ctrl - l[k]) > 10**(-8):
ctrl = l[k] ctrl = l[k]
u = at.dot(u) u = at.dot(u)
l[k] = max(u.min(), u.max(), key=abs) l[k] = max(u.min(), u.max(), key=abs)
u = u/l[k] u = u/l[k]
alpha = 0.999*l[k] alpha = .999*l[k]
t = np.random.rand(a.shape[0],1)
b[k] = b[k]/max(b[k].min(), b[k].max(), key=abs) 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() t = b[k].copy()
b[k] = np.linalg.solve((a - alpha*np.identity(a.shape[0])),((l[k]-alpha)*t)) 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) b[k] = b[k]/max(b[k].min(), b[k].max(), key=abs)

View File

@@ -21,11 +21,11 @@ import numpy as np
def eigen(a): def eigen(a):
k = 0 b = np.random.rand(a.shape[0],a.shape[1])
l = np.ones((a.shape[0])) l = np.ones((a.shape[0]))
k = 0
at = a #variavel temporaria para A at = a #variavel temporaria para A
b = np.random.rand(a.shape[0],a.shape[1])
while (k < at.shape[0]): while (k < at.shape[0]):
@@ -34,21 +34,21 @@ def eigen(a):
ctrl = 0 ctrl = 0
while (ctrl != l[k]): while abs(ctrl - l[k]) > 10**(-8):
ctrl = l[k] ctrl = l[k]
u = at.dot(u) u = at.dot(u)
l[k] = max(u.min(), u.max(), key=abs) l[k] = max(u.min(), u.max(), key=abs)
u = u/l[k] u = u/l[k]
alpha = 0.999*l[k] alpha = .999*l[k]
t = np.random.rand(a.shape[0],1)
b[k] = b[k]/max(b[k].min(), b[k].max(), key=abs) 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() t = b[k].copy()
b[k] = np.linalg.solve((a - alpha*np.identity(a.shape[0])),((l[k]-alpha)*t)) 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) b[k] = b[k]/max(b[k].min(), b[k].max(), key=abs)

Binary file not shown.

View File

@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools.setup( setuptools.setup(
name="yoshi-seals", name="yoshi-seals",
version="1.3.3.1", version="1.3.3-1",
author="Vitor Hideyoshi", author="Vitor Hideyoshi",
author_email="vitor.h.n.batista@gmail.com", author_email="vitor.h.n.batista@gmail.com",
description="Numeric Calculus python module in the topic of Linear Algebra", description="Numeric Calculus python module in the topic of Linear Algebra",

View File

@@ -1,6 +1,6 @@
Metadata-Version: 2.1 Metadata-Version: 2.1
Name: yoshi-seals Name: yoshi-seals
Version: 1.3.3.1 Version: 1.3.3.post1
Summary: Numeric Calculus python module in the topic of Linear Algebra Summary: Numeric Calculus python module in the topic of Linear Algebra
Home-page: https://github.com/HideyoshiNakazone/Seals-NumericCalculus.git Home-page: https://github.com/HideyoshiNakazone/Seals-NumericCalculus.git
Author: Vitor Hideyoshi Author: Vitor Hideyoshi

Binary file not shown.

View File

@@ -1,15 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}

View File

@@ -1,3 +0,0 @@
{
"python.pythonPath": "/home/hideyoshi/anaconda3/bin/python"
}