Lines Matching +full:- +full:m
34 c = math.sqrt(1-s*s)
35 m = np.zeros((rows,cols))
38 for i in range(rows-1):
39 m[i,i] = sc
40 m[i,i+1:] = - sc * c * np.ones(rows-i-1)
43 m = m + m.T
45 return(m)
47 def householder(x,eps=1e-16):
64 beta = -math.sqrt(alpha*alpha + xnorm2)
66 r = (alpha - beta)
68 tau = (beta - alpha) / beta
73 def QR(oldm,eps=1e-16):
74 m=np.copy(oldm)
75 (rows,cols) = m.shape
80 currentSize = rows - c
81 v,beta=householder(m[c:,c],eps=eps)
85 t = np.identity(currentSize) - beta * np.outer(v,v)
86 m[c:,c:] = np.dot(t,m[c:,c:])
90 c=cols - 1
92 t = np.identity(len(v)) - beta * np.outer(v,v)
94 c = c - 1
96 return(q,m,tau,h)