1
0
This commit is contained in:
2024-03-24 23:56:16 +03:00
parent 282c6bf4eb
commit 79d0d82417
2 changed files with 13 additions and 9 deletions

View File

@@ -7,4 +7,16 @@
# example 2
-1 11 -1 25
10 -1 2 6
2 -1 10 -11
2 -1 10 -11
# timofei
4.3 -12.1 23.2 -14.1 15.5
2.4 -4.4 3.5 5.5 2.5
5.4 8.3 -7.4 -12.7 8.6
6.3 -7.6 1.34 3.7 12.1
# matvei
14.4 -5.3 14.3 -12.7 -14.4
23.4 -14.2 -5.4 2.1 6.6
6.3 -13.2 -6.5 14.3 9.4
5.6 8.8 -6.7 -23.8 7.3

View File

@@ -14,8 +14,6 @@ def iterative_method(
alpha = np.copy(A)
beta = np.copy(B)
print(alpha)
swaps = []
for i in range(n):
if not _swap_rows(alpha, beta):
@@ -27,10 +25,6 @@ def iterative_method(
swaps.extend(swaps_)
print(alpha)
print(alpha)
for i in range(n):
beta[i, 0] = beta[i, 0] / alpha[i, i]
@@ -43,8 +37,6 @@ def iterative_method(
alpha[i, i] = 0
print(algorithm.norm(alpha))
if algorithm.norm(alpha) >= 1.0:
return None