comparison src/Grids/grid.jl @ 1275:dcd8654ca33b refactor/grids

Remove getcomponent stubs since we might have a cleaner way to solve it with map or lazymap
author Jonatan Werpers <jonatan@werpers.com>
date Sun, 26 Feb 2023 11:53:23 +0100
parents 7fab13c07412
children 1157f889bf50
comparison
equal deleted inserted replaced
1273:7fab13c07412 1275:dcd8654ca33b
60 else 60 else
61 return LazyTensors.LazyFunctionArray((I...)->f(g[I...]...), size(g)) 61 return LazyTensors.LazyFunctionArray((I...)->f(g[I...]...), size(g))
62 end 62 end
63 end 63 end
64 64
65 """
66 getcomponent(gfun, I::Vararg{Int})
67
68 Return one of the components of gfun as a grid function.
69 """
70 # Should it be lazy? Could it be a view?
71 function getcomponent(gfun, I::Vararg{Int}) end
72 # function getcomponent(gfun, s::Symbol) end ?
73
74 65
75 # TODO: Explain how these are intended to be used 66 # TODO: Explain how these are intended to be used
76 _ncomponents(::Type{<:Number}) = 1 67 _ncomponents(::Type{<:Number}) = 1
77 _ncomponents(T::Type{<:SVector}) = length(T) 68 _ncomponents(T::Type{<:SVector}) = length(T)
78 69