Skip to content

Commit

Permalink
add @inbounds, remove whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jlapeyre committed May 17, 2018
1 parent b97810c commit a236734
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
The EmpiricalCDFs.jl package is licensed under the MIT "Expat" License:

> Copyright (c) 2016: John Lapeyre.
>
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
>
> The above copyright notice and this permission notice shall be included in all
> copies or substantial portions of the Software.
>
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE.
>
>
4 changes: 2 additions & 2 deletions src/cdfs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ getcdfindex(cdf::AbstractEmpiricalCDF, x::Real) = searchsortedlast(cdf.xdata, x)
function _getinds{T <: Real}(cdf::AbstractEmpiricalCDF, v::AbstractArray{T})
r = Array{eltype(cdf.xdata)}(size(v)...)
for (i,x) in enumerate(v)
r[i] = cdf(x)
@inbounds r[i] = cdf(x)
end
r
end
Expand Down Expand Up @@ -288,7 +288,7 @@ function _printfull(io, cdf::AbstractEmpiricalCDF, prpts; lastpt=false)
ulim = lastpt ? n : n - 1 # usually don't print ordinate value of 1
# println("ulim is ", ulim)
for i in 1:ulim
xp = cdf.xdata[i]
@inbounds xp = cdf.xdata[i]
if done(prpts,state)
break
end
Expand Down

0 comments on commit a236734

Please sign in to comment.