You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Difficult problems often leave a lot of adjacent or overlapping :unknown intervals. As an example:
function f( x )
return sqrt(1-cos(x)^2) + sin(x) + 0.01*x
end
X = -5 .. 5
rt = roots(f, X)
rt = sort(rt, by=x->x.interval.lo)
println("# of intervals: ",length(rt))
num_adj = sum(
(rt[i].interval.hi == rt[i+1].interval.lo && rt[i].status==:unknown && rt[i+1].status==:unknown)
for i = 1:length(rt)-1)
println("# of adjancies: ",num_adj)
prints out
# of intervals: 100
# of adjancies: 98
That is, it's returning one :unique interval, and then 99 :unknown intervals, which each share endpoints with each other. For the end-user, it would make sense to combine these into a larger interval, since there's no information lost in combining them.
As another example (one with continuous derivatives everywhere):
function f( (x, y) )
return SVector(
x + (y-0.3)^3 - 0.7,
x - (y-0.3)^2 - 0.7
)
end
X = 0 .. 1
rt = roots(f, X × X)
all share essentially the same x range, and the y-ranges are often overlapping or adjacent. Dumping out the first intervals shows that several are indeed identical:
Thanks, it's a good idea and we have explored it before. The main difficulty comes in higher dimensions when it's not so clear how to combine the rectangles, or how to decide when not to combine them.
Difficult problems often leave a lot of adjacent or overlapping :unknown intervals. As an example:
prints out
That is, it's returning one
:unique
interval, and then 99:unknown
intervals, which each share endpoints with each other. For the end-user, it would make sense to combine these into a larger interval, since there's no information lost in combining them.As another example (one with continuous derivatives everywhere):
gives
all share essentially the same x range, and the y-ranges are often overlapping or adjacent. Dumping out the first intervals shows that several are indeed identical:
These could also be merged or de-duplicated somehow.
The text was updated successfully, but these errors were encountered: