Skip to content

Commit 9a8ae01

Browse files
committed
Use less ambiguous variable names
1 parent 27bbed2 commit 9a8ae01

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

base/quadgk.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ function do_quadgk{Tw}(f, s, n, ::Type{Tw}, abstol, reltol, maxevals, nrm)
114114
return do_quadgk_no_inf(f, s, n, Tw, abstol, reltol, maxevals, nrm)
115115
end
116116

117-
function do_quadgk_no_inf{Tw}(f, ss, n, ::Type{Tw}, abstol, reltol, maxevals, nrm)
117+
function do_quadgk_no_inf{Tw}(f, s, n, ::Type{Tw}, abstol, reltol, maxevals, nrm)
118118
key = rulekey(Tw,n)
119119
x::Vector{Tw},w::Vector{Tw},gw::Vector{Tw} = haskey(rulecache, key) ? rulecache[key] :
120120
(rulecache[key] = kronrod(Tw, n))
121-
segs = [evalrule(f, ss[1],ss[2], x,w,gw, nrm)]
122-
for i in 2:length(ss) - 1
123-
heappush!(segs, evalrule(f, ss[i],ss[i+1], x,w,gw, nrm), Reverse)
121+
segs = [evalrule(f, s[1],s[2], x,w,gw, nrm)]
122+
for i in 2:length(s) - 1
123+
heappush!(segs, evalrule(f, s[i], s[i+1], x,w,gw, nrm), Reverse)
124124
end
125125
numevals = (2n+1) * length(segs)
126126
I = segs[1].I
@@ -132,14 +132,14 @@ function do_quadgk_no_inf{Tw}(f, ss, n, ::Type{Tw}, abstol, reltol, maxevals, nr
132132
# Pop the biggest-error segment and subdivide (h-adaptation)
133133
# until convergence is achieved or maxevals is exceeded.
134134
while E > abstol && E > reltol * nrm(I) && numevals < maxevals
135-
s = heappop!(segs, Reverse)
136-
mid = (s.a + s.b) * 0.5
137-
s1 = evalrule(f, s.a, mid, x,w,gw, nrm)
138-
s2 = evalrule(f, mid, s.b, x,w,gw, nrm)
139-
heappush!(segs, s1, Reverse)
140-
heappush!(segs, s2, Reverse)
141-
I = (I - s.I) + s1.I + s2.I
142-
E = (E - s.E) + s1.E + s2.E
135+
seg = heappop!(segs, Reverse)
136+
mid = (seg.a + seg.b) * 0.5
137+
seg1 = evalrule(f, seg.a, mid, x,w,gw, nrm)
138+
seg2 = evalrule(f, mid, seg.b, x,w,gw, nrm)
139+
heappush!(segs, seg1, Reverse)
140+
heappush!(segs, seg2, Reverse)
141+
I = (I - seg.I) + seg1.I + seg2.I
142+
E = (E - seg.E) + seg1.E + seg2.E
143143
numevals += 4n+2
144144
end
145145
# re-sum (paranoia about accumulated roundoff)

0 commit comments

Comments
 (0)