Mercurial > repos > public > sbplib_julia
changeset 1335:cca45af5e724 refactor/grids
Some docs for EquidistantGrid
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 03 May 2023 15:49:37 +0200 |
parents | 47e309eac131 |
children | 52087a6c0682 |
files | grid_refactor.md src/Grids/equidistant_grid.jl |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/grid_refactor.md Wed May 03 15:41:45 2023 +0200 +++ b/grid_refactor.md Wed May 03 15:49:37 2023 +0200 @@ -16,6 +16,7 @@ ## TODO * Add benchmarks or allocation tests for eval_on and indexing grids. +* Add benchmarks for range type in EquidistantGrid. (LinRange vs StepRange) * Document the expected behavior of grid functions * Write down the thinking around Grid being an AbstractArray. Why it doesn't work. * Write about the design choices in the docs.
--- a/src/Grids/equidistant_grid.jl Wed May 03 15:41:45 2023 +0200 +++ b/src/Grids/equidistant_grid.jl Wed May 03 15:49:37 2023 +0200 @@ -1,9 +1,15 @@ """ EquidistantGrid{T,R<:AbstractRange{T}} <: Grid{T,1} -TODO +A one-dimensional equidistant grid. Most users are expected to use +[`equidistant_grid`](@ref) for constructing equidistant grids. + +See also: [`equidistant_grid`](@ref) + + +## Note +The type of range used for the points can likely impact performance. """ -#TODO: Document recomendations for type of range. (LinRange is faster?) struct EquidistantGrid{T,R<:AbstractRange{T}} <: Grid{T,1} points::R end