neighborhood - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


verify/neighborhood

verify that a point is within a neighborhood of another

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

verify(expr1, expr2, neighborhood(dist, opt1, opt2, ...))

verify(expr1, expr2, neighbourhood(dist, opt1, opt2, ...))

Parameters

expr1, expr2

-

algebraic objects or lists of algebraic objects

dist

-

algebraic object with a non-negative signum

opt1, opt2, ...

-

optional arguments

Description

• 

The verify(expr1, expr2, neighborhood(dist, opt1, opt2, ...)) calling sequence returns true if it can determine that the distance between expr1 and expr2 is less than dist.

• 

By default, the distance is measured in Euclidean space, that is, the square root of the sum of the squares of the differences between the points.  This can be modified by using the option p=N, where N is between 0 and , inclusive. This distance is given by:

i=1Nexpr1iexpr2ip1p

• 

By default, the neighborhood is open, that is, the distance must be strictly less than dist. This can be modified by using the option closed to indicate that the distance is less than or equal to dist, or by using boundary to indicate that the distance is exactly equal to dist.

• 

By default, the precision used for floating-point computations is determined by Digits. This can be changed, however, by setting digits=d, where d is any positive integer.

• 

This verification is symmetric.

• 

If either expr1 or expr2 is not of type algebraic then false is returned.

Examples

verifyπ,3,neighborhood1

true

(1)

verify3,4,neighborhood1

false

(2)

verify3,4,neighborhood1,open

false

(3)

verifysqrt22,sqrt22,0,0,neighborhood1

false

(4)

verifysqrt22,sqrt22,0,0,neighborhood1,closed

true

(5)

verifysqrt22,sqrt22,0,0,neighborhood1,p=3

true

(6)

verify1,1,0,0,neighborhood1,p=

false

(7)

verify1,1,0,0,neighborhood1,p=,closed

true

(8)

verifyπ,3.1415,neighbourhood0.00001,digits=10

false

(9)

verifyπ,3.1415,neighbourhood0.00001,digits=4

true

(10)

Compatibility

• 

The verify/neighborhood command was updated in Maple 2024.

• 

The digits option was introduced in Maple 2024.

• 

For more information on Maple 2024 changes, see Updates in Maple 2024.

See Also

list

verify

verify/as_list

verify/set