using StaticArrays, TensorCast
const Point2d{T <: AbstractFloat} = SVector{2,T}
struct PointCspond{T <: AbstractFloat}
first::Point2d{T}
second::Point2d{T}
end
function point_csponds(u₁,u₂)
@cast u₁[j]{i:2} := u₁[i,j]
@cast u₂[j]{i:2} := u₂[i,j]
return StructArray{PointCspond{Float64}}((u₁,u₂))
end
x1 = rand(2,100)
x2 = rand(2,100)
pc = point_csponds(u₁,u₂)
The type of pc.first is
100-element reinterpret(SVector{2, Float64}, ::Vector{Float64})
but I would like it to be something like a
2x100 Matrix{Float64} (alias for Array{Float64, 2})
Is it possible? Thanks!