function shells - Maple Help

Home : Support : Online Help : Programming : Logic : Boolean : verify : function shells

verify/function_shells

verify approximate equality between two function plots

 Calling Sequence verify(P, Q, function_shells(epsilon))

Parameters

 P, Q - anything epsilon - non-negative value

Description

 • The verify(P, Q, function_shells) calling sequence verifies the approximate equality between two function plots.
 • The parameters, P and Q, are assumed to be either PLOT data structures, sets or lists of CURVES data structures, or a CURVES data structure.
 • The verify(P, Q, function_shells) returns true for CURVES data structures P and Q if the points of each curve fall within an epsilon shell of a linear piecewise interpolation of the points of the other curve.
 The points in the CURVES data structure must be in order and the x-coordinates must be monotonically increasing.
 • If P or Q are PLOT data structures or sets or lists of CURVES data structures, it checks that for each CURVES data structure in either P or Q, there exists a CURVES data structure in the other set which matches it.
 • This procedure does not compare any other features of the PLOT or CURVES data structures.

Examples

 > $a≔\mathrm{plot}\left(\mathrm{sin}\left(x\right),x=0..1\right):$
 > $b≔\mathrm{plot}\left(\mathrm{sin}\left(x\right),x=0..1,\mathrm{numpoints}=10,\mathrm{adaptive}=\mathrm{false}\right):$
 > $c≔\mathrm{plot}\left(\mathrm{sin}\left(x\right),x=0..1,\mathrm{numpoints}=37,\mathrm{adaptive}=\mathrm{false}\right):$
 > $d≔\mathrm{plot}\left(\mathrm{sin}\left(x\right)+\frac{x}{10},x=0..1\right):$
 > $\mathrm{verify}\left(a,b,\mathrm{function_shells}\left(0.01\right)\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{verify}\left(a,c,\mathrm{function_shells}\left(0.01\right)\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{verify}\left(a,d,\mathrm{function_shells}\left(0.01\right)\right)$
 $\left[{\mathrm{false}}{,}\left[{0.100495240552764}{,}{0.100326170796768}\right]{,}\left[{0.100495240552764}{,}{0.110375694852045}\right]\right]$ (3)
 > $\mathrm{verify}\left(a,d,\mathrm{function_shells}\left(0.1\right)\right)$
 ${\mathrm{true}}$ (4)