Hello,
Is possible to use the Loop Fusion between arrays of custom defined structures? For example:
struct point{T}
x::T
y::T
end
x = rand(100)
y = rand(100)
p = point{Array{Float64,1}}(x,y)
at this point I created a 100 elements array of points, and then i overload the + operator
Base.:+(a::Point{Float64}, b::Point{Float64}) = Point{Float64}(a.x+b.x , a.y+b.y)
then i defined another point and i tried to add it to every elements of array using .+ loop fusion operator
point_p = point{Float64}(1,1)
p_new .= p .+ point_p
and return the following error:
ERROR: LoadError: MethodError: no method matching length(::point{Array{Float64,1}})
Closest candidates are:
length(!Matched::Core.SimpleVector) at essentials.jl:582
length(!Matched::Base.MethodList) at reflection.jl:732
length(!Matched::Core.MethodTable) at reflection.jl:806
Is possible to overload the loop fusion . operator?