Mercurial > repos > public > sbplib_julia
comparison src/Grids/grid.jl @ 1289:3b7ebd135918 refactor/grids
Remove _component_type and replace with eltype
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 03 Mar 2023 15:44:39 +0100 |
parents | 7de1df0aad6a |
children | 0713175a5743 |
comparison
equal
deleted
inserted
replaced
1288:7de1df0aad6a | 1289:3b7ebd135918 |
---|---|
61 | 61 |
62 | 62 |
63 # TODO: Explain how and where these are intended to be used | 63 # TODO: Explain how and where these are intended to be used |
64 _ncomponents(::Type{<:Number}) = 1 | 64 _ncomponents(::Type{<:Number}) = 1 |
65 _ncomponents(T::Type{<:SVector}) = length(T) | 65 _ncomponents(T::Type{<:SVector}) = length(T) |
66 | |
67 _component_type(T::Type{<:Number}) = T | |
68 _component_type(T::Type{<:SVector}) = eltype(T) |