Skip to content

Commit

Permalink
remove unused simpson function
Browse files Browse the repository at this point in the history
  • Loading branch information
lindahua committed Nov 8, 2014
1 parent 19b8a3e commit 3c12980
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,20 +145,6 @@ macro checkinvlogcdf(lp,ex)
:($lp <= zero($lp) ? $ex : NaN)
end

# Simple method for integration
function simpson(f::AbstractVector{Float64}, h::Float64)
n = length(f)
isodd(n) || error("The length of the input vector must be odd.")
s = f[1]
t = -1
for i = 2:2:n-1
@inbounds s += (4 * f[i] + 2 * f[i+1])
end
s += f[n]
return s * h / 3.0
end


# because X == X' keeps failing due to floating point nonsense
function isApproxSymmmetric(a::Matrix{Float64})
tmp = true
Expand Down

0 comments on commit 3c12980

Please sign in to comment.