Lines Matching +full:- +full:r
12 def householder(x,eps=1e-16):
29 beta = -math.sqrt(alpha*alpha + xnorm2)
31 r = (alpha - beta)
32 v = x / r
33 tau = (beta - alpha) / beta
58 print(np.isclose(betaRef,betaF32,1e-6,1e-6))
59 print(np.isclose(vRef,vF32,1e-6,1e-6))
63 print(np.isclose(betaRef,betaF64,1e-6,1e-6))
64 print(np.isclose(vRef,vF64,1e-6,1e-6))
71 a = a / np.max(np.abs(a)) * 1.0e-7
81 def checkOrtho(A,err=1e-10):
94 r=np.random.randn(rows)
95 r = Tools.normalize(r)[np.newaxis]
98 result=r.T.dot(c)
117 m = randomIsometry(rows,columns,columns-1)
121 # The CMSIS-DSP C functions is requiring two temporary arrays
135 status,r,q,tau = dsp.arm_mat_qr_f64(m,dsp.DEFAULT_HOUSEHOLDER_THRESHOLD_F64,tmpa,tmpb) variable
141 #print(r)
145 assert(checkOrtho(q,err=1e-14))
147 # Remove householder vectors from R matrix
149 for c in r.T:
153 # Check that M = Q R
154 newm = np.dot(q,r)
159 status,r,q,tau = dsp.arm_mat_qr_f32(m,dsp.DEFAULT_HOUSEHOLDER_THRESHOLD_F32,tmpa,tmpb) variable
165 #print(r)
170 assert(checkOrtho(q,err=1.0e-6))
172 # Remove householder vectors from R matrix
174 for c in r.T:
178 # Check that M = Q R
179 newm = np.dot(q,r)
180 assert_allclose(newm,m,2e-6,1e-7)