This commit is contained in:
2025-06-19 09:34:40 +08:00
parent 9248b0d302
commit 839a79bb32
3 changed files with 112 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ if __name__ == "__main__":
x = [[1], [-1]] # 注意储存形式,单独一列的相量,每个数字都要中括号
print("Norm of x with v=1:", Norm(x, 1))
print("Norm of x with v=inf:", Norm(x, float("inf")))
print("Norm of x with v=inf:", Norm(x, float("inf"))) # 1 1范数2 2范数float('inf') 无穷范数
print("Norm of x with v=2:", Norm(x, 2))
print("Dot product of A and x:", Dot(A, x))
print("Norm of Ax with v=2:", Norm(Dot(A, x), 2))