You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returns the Jacobi matrix `X` associated to a quasi-matrix of polynomials
40
-
orthogonal with respect to `w(x) w_p(x)` where `w_p(x)` is the weight of the polynomials in `P` by computing a Cholesky decomposition of the weight modification.
40
+
orthogonal with respect to `w(x)` by computing a Cholesky decomposition of the weight modification.
41
41
42
-
The resulting polynomials are orthonormal on the same domain as `P`. The supplied `P` must be normalized. Accepted inputs are `w` as a function or `W` as an infinite matrix representing multiplication with the function `w` on the basis `P`.
42
+
The resulting polynomials are orthonormal on the same domain as `P`. The supplied `P` must be normalized. Accepted inputs are `w` as a function or `W` as an infinite matrix representing the weight modifier multiplication by the function `w / w_P` on `P` where `w_P` is the orthogonality weight of `P`.
returns the Jacobi matrix `X` associated to a quasi-matrix of polynomials
122
-
orthogonal with respect to `w(x) w_p(x)` where `w_p(x)` is the weight of the polynomials in `P` by computing a QR decomposition of the square root weight modification.
133
+
orthogonal with respect to `w(x)` by computing a QR decomposition of the square root weight modification.
123
134
124
-
The resulting polynomials are orthonormal on the same domain as `P`. The supplied `P` must be normalized. Accepted inputs for `sqrtw` are the square root of the weight modification as a function or `sqrtW` as an infinite matrix representing multiplication with the function `sqrt(w)` on the basis `P`.
135
+
The resulting polynomials are orthonormal on the same domain as `P`. The supplied `P` must be normalized. Accepted inputs for `w` are the target weight as a function or `sqrtW`, representing the multiplication operator of square root weight modification on the basis `P`.
125
136
126
137
The underlying QR approach allows two methods, one which uses the Q matrix and one which uses the R matrix. To change between methods, an optional argument :Q or :R may be supplied. The default is to use the Q method.
@@ -246,10 +265,11 @@ function _fillqrbanddata!(J::QRJacobiData{:R,T}, inds::UnitRange{Int}) where T
246
265
# pre-fill U and UX to prevent expensive step-by-step filling in of cached U and UX in the loop
247
266
m = inds[end]+1
248
267
resizedata!(J.U,m,m)
249
-
resizedata!(J.UX,m,m)
268
+
dv, ev, X, U = J.dv, J.ev, J.UX, J.U
269
+
270
+
UX =view(U,1:m,1:m)*X[1:m,1:m]
250
271
251
-
dv, ev, UX, U = J.dv, J.ev, J.UX, J.U
252
-
@inboundsfor k in inds
272
+
@inbounds Threads.@threadsfor k in inds
253
273
dv[k] =-U[k-1,k]*UX[k,k-1]/(U[k-1,k-1]*U[k,k])+UX[k,k]./U[k,k] # this is dot(view(UX,k,k-1:k), U[k-1:k,k-1:k] \ ek)
254
274
ev[k] = UX[k,k-1]/U[k+1,k+1]*(-U[k-1,k+1]/U[k-1,k-1]+U[k-1,k]*U[k,k+1]/(U[k-1,k-1]*U[k,k]))+UX[k,k]/U[k+1,k+1]*(-U[k,k+1]/U[k,k])+UX[k,k+1]/U[k+1,k+1] # this is dot(view(UX,k,k-1:k+1), U[k-1:k+1,k-1:k+1] \ ek)
0 commit comments