Mercurial > repos > public > sbplib_julia
comparison src/RegionIndices/RegionIndices.jl @ 1678:13a7a4ff49e3 feature/grids/manifolds
Merge feature/grids/curvilinear
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sun, 30 Jun 2024 10:50:44 +0200 |
parents | 61aacc51d38a |
children | aba2ce166546 |
comparison
equal
deleted
inserted
replaced
1650:8250cf5a3ce9 | 1678:13a7a4ff49e3 |
---|---|
11 i::T | 11 i::T |
12 | 12 |
13 Index{R,T}(i::T) where {R<:Region,T<:Integer} = new{R,T}(i) | 13 Index{R,T}(i::T) where {R<:Region,T<:Integer} = new{R,T}(i) |
14 Index{R}(i::T) where {R<:Region,T<:Integer} = new{R,T}(i) | 14 Index{R}(i::T) where {R<:Region,T<:Integer} = new{R,T}(i) |
15 Index(i::T, ::Type{R}) where {R<:Region,T<:Integer} = Index{R,T}(i) | 15 Index(i::T, ::Type{R}) where {R<:Region,T<:Integer} = Index{R,T}(i) |
16 Index(t::Tuple{T, DataType}) where {R<:Region,T<:Integer} = Index{t[2],T}(t[1]) # TBD: This is not very specific in what types are allowed in t[2]. Can this be fixed? | 16 Index(t::Tuple{T, DataType}) where T<:Integer = Index{t[2],T}(t[1]) # TBD: This is not very specific in what types are allowed in t[2]. Can this be fixed? |
17 end | 17 end |
18 | 18 |
19 export Index | 19 export Index |
20 | 20 |
21 # Index(R::Type{<:Region}) = Index{R} | 21 # Index(R::Type{<:Region}) = Index{R} |