Skip to content

Commit

Permalink
Improve type safety
Browse files Browse the repository at this point in the history
Co-authored-by: Christopher Rackauckas <accounts@chrisrackauckas.com>
  • Loading branch information
IlianPihlajamaa and ChrisRackauckas authored Sep 21, 2023
1 parent 7c3d710 commit 65cf88d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/trapezoidal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ struct TrapezoidalUniformWeights{T} <: UniformWeights
h::T
end

@inline Base.getindex(w::TrapezoidalUniformWeights, i) = ifelse((i == 1) || (i == w.n), w.h*0.5 , w.h)
@inline Base.getindex(w::TrapezoidalUniformWeights, i) = ifelse((i == 1) || (i == w.n), w.h/2 , w.h)


struct TrapezoidalNonuniformWeights{X<:AbstractArray} <: NonuniformWeights
Expand Down

0 comments on commit 65cf88d

Please sign in to comment.