This commit is contained in:
lwj
2025-06-10 14:27:18 +08:00
parent 0d7b89e21d
commit 89ad8d0f1f
12 changed files with 45 additions and 35 deletions

View File

@@ -1,3 +1,4 @@
#模 范数
def Norm(x,v):
if len(x[0]) == 1:
if v == 1:
@@ -12,7 +13,7 @@ def Norm(x,v):
elif v == float("inf"):
return max([sum([abs(i) for i in x[j]]) for j in range(len(x))])
return None
#SOR方法 逐次超松弛迭代
def SOR(A,b,x,w,err,N):
count = 0
n = len(A)