forked from denizdonmez/numethods
tutorial is finished: a bug in numethods
(QRHouseholder
) is resolved.
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import sys
|
||||||
|
sys.path.append('../')
|
||||||
from numethods import *
|
from numethods import *
|
||||||
|
|
||||||
A = Matrix([[2, -1], [1, 2], [1, 1]])
|
A = Matrix([[2, -1], [1, 2], [1, 1]])
|
||||||
|
@@ -89,7 +89,7 @@ class QRHouseholder:
|
|||||||
s = sum(v[i] * self.Q.data[j][k + i] for i in range(len(v)))
|
s = sum(v[i] * self.Q.data[j][k + i] for i in range(len(v)))
|
||||||
for i in range(len(v)):
|
for i in range(len(v)):
|
||||||
self.Q.data[j][k + i] -= 2 * s * v[i]
|
self.Q.data[j][k + i] -= 2 * s * v[i]
|
||||||
self.Q = self.Q.transpose()
|
# self.Q = self.Q.transpose()
|
||||||
|
|
||||||
|
|
||||||
class QRSolver:
|
class QRSolver:
|
||||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user