Open guessable opened 10 months ago
could you provide some example code
could you provide some example code
Thanks for your reply.sure,here is some julia code
using LinearAlgebra
mat = Matrix{Float64}
vec = Vector{Float64}
function GramSchmidt(šø::mat)::mat
m, n = size(šø)
š = šø[:, 1] / norm(šø[:, 1])
@simd for j in 2:n
vā±¼ = šø[:, j]
@simd for i in 1:j-1
vā±¼ -= (@view šø[:, j])' * (@view š[:, i]) * (@view š[:, i])
end
š = cat(š, vā±¼ / norm(vā±¼), dims=2)
end
return š
end
function ModifiedGS(šø::mat)::mat
m, n = size(šø)
š = šø[:, 1] / norm(šø[:, 1])
for j in 2:n
vā±¼ = šø[:, j]
for i in 1:j-1
vā±¼ -= vā±¼' * (@view š[:, i]) * (@view š[:, i])
end
š = cat(š, vā±¼ / norm(vā±¼), dims=2)
end
return š
end
n = 1000
up = range(0, 1, n)
down = range(0, 1, n)
A = diagm(1 => up, -1 => down)
A += 2 * I(n + 1)
@timev ModifiedGS(A)
Hi, thank you for the extension.I like this colorscheme but I don't have enough syntax highlighting on the julia language. Can we make it better?