Skip to content

Instantly share code, notes, and snippets.

@pkofod
Created February 8, 2016 12:34
Show Gist options
  • Save pkofod/252d6fcca7676c11e2bd to your computer and use it in GitHub Desktop.
Save pkofod/252d6fcca7676c11e2bd to your computer and use it in GitHub Desktop.
type Type1
a::Matrix{Float64} # why not vector of vectors?
b::Vector{Matrix{Float64}}
c::Vector{Float64}
d::Float64
e::Int64
end
type Type2{T}
a::Matrix{T} # why not vector of vectors?
b::Vector{Matrix{T}}
c::Vector{T}
d::T
e::Int64
end
a = rand(30, 30)
b = Matrix[rand(10, 10), rand(10, 10)]
b_ = Matrix{Float64}[rand(10, 10), rand(10, 10)]
c = rand(30)
d = 0.9
e = 3
Type1(a, b, c, d, e)
Type2(a, b, c, d, e)
Type2(a, b_, c, d, e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment