This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function normtypes(S) #For the first post, comparing vector outputs with naive definitions | |
try | |
R0 = typeof(abs(one(S))^0+abs(one(S))^0) | |
R1 = typeof(abs(one(S))+abs(one(S))) | |
Rp = typeof(sqrt(abs(one(S))^2+abs(one(S))^2)) | |
Ri = typeof(maximum(abs(one(S)))) | |
Ri2 = typeof(abs(one(S))) | |
R0i = typeof(norm([one(S)], 0)) | |
R1i = typeof(norm([one(S)], 1)) | |
Rpi = typeof(norm([one(S)])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":"3121457012","type":"IssueCommentEvent","actor":{"id":11798751,"login":"ScottPJones","gravatar_id":"","url":"https://api.github.com/users/ScottPJones","avatar_url":"https://avatars.git ubusercontent.com/u/11798751?"},"repo":{"id":1644196,"name":"JuliaLang/julia","url":"https://api.github.com/repos/JuliaLang/julia"},"payload":{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/12835","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/12835/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/12835/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/12835/events","html_url":"https://github.com/JuliaLang/julia/pull/12835","id":103615789,"number":12835,"title":"let's release this thing !","user":{"login":"carnaval","id":5307791,"avatar_url":"https://avatars.githubusercontent.com/u/5307791?v=3","gravatar_id":"","url":"https://api.github.com/users/carnaval","html_url":"https://github.com/carnaval","follow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type BrokenArrowBidiagonal{T} <: AbstractMatrix{T} | |
dv::Vector{T} | |
av::Vector{T} | |
ev::Vector{T} | |
end | |
Base.size(B::BrokenArrowBidiagonal) = (n=length(B.dv); (n, n)) | |
function Base.size(B::BrokenArrowBidiagonal, n::Int) | |
if n==1 || n==2 | |
return length(B.dv) | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################# | |
# A simple implementation of TSQR (Tall and Skinny QR) in Julia # | |
# Jiahao Chen <[email protected]>, 2015-08-03 # | |
################################################################# | |
# | |
# TSQR is a communication-avoiding QR algorithm designed for | |
# distributed computation on tall, skinny matrices, which are | |
# typical of data matrices in Big Data applications. | |
# | |
# The primary reference is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#function axpy!{T}(a::T, b::StridedVector{T}, c::StridedVector{T}) | |
# @simd for i=1:size(b, 1) | |
# c[i] += a*b[i] | |
# end | |
#end | |
mgs(A)=mgs!(copy(A)) | |
function mgs!(Q) #Does not store R | |
m, n = size(Q) | |
Qc= [slice(Q,:,k) for k=1:n] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ipynb_checkpoints | |
*.ipynb | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Base: +, -, ⋅, *, /, √, convert | |
export DoublelengthFloat | |
immutable DoublelengthFloat{T<:FloatingPoint} <: FloatingPoint | |
head :: T | |
tail :: T | |
end | |
DoublelengthFloat(x::FloatingPoint) = DoublelengthFloat(x, zero(x)) | |
convert{T<:FloatingPoint}(::Type{DoublelengthFloat{T}}, x::T) = DoublelengthFloat(x) |