Keep in mind that you don't need to declare the types of the inputs in order 
for the function to be type stable. The only reason to declare the types is to 
control dispatch in some fashion.

--Tim

On Saturday, April 11, 2015 05:29:57 AM Alan Crawford wrote:
> I would like to setup a type stable function where one of the arguments is
> the result of lufact(A) where A::Array{Float64,2}.
> 
> Here is code I wrote to test this out:
> 
> A = rand(100,100);
> f = rand(100,1);
> luA = lufact(A);
> typeof(luA)
> function test(f::Vector{Float64},luA::LU{Float64,Array{Float64,2}})
>        \(luA,f)
> end
> 
> The output i get is:
> 
> *typeof(luA)*
> 
> *LU{Float64,Array{Float64,2}} (constructor with 1 method)*
> 
> 
> *julia> **function
> test(f::Vector{Float64},luA::LU{Float64,Array{Float64,2}}) *
> 
> *         \(luA,f) *
> 
> *       end*
> 
> *ERROR: LU not defined*
> 
> 
> I am working in Julia 0.3.7. I am relatively new to Julia, so I imagine I
> am missing something quite simple...

Reply via email to