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

Online Help

All Products    Maple    MapleSim


RealBox

  

BinaryPredicates

  

binary predicates for RealBox objects

  

Equal

  

check for data structure equality of two RealBox objects

  

Eq

  

check for mathematical equality of two RealBox objects

  

NotEq

  

check for non-equality of two RealBox objects

  

LessThan

  

check for strict inequality of two RealBox objects

  

`<`

  

check for strict inequality of two RealBox objects

  

LessEqual

  

check for inequality of two RealBox objects

  

`<=`

  

check for inequality of two RealBox objects

  

Overlaps

  

check for a nonempty intersection of two RealBox objects

  

Contains

  

check for inclusion between two RealBox objects

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Equal( b1, b2 )

Eq( b1, b2 )

NotEq( b1, b2 )

b1 < b2

b1 <= b2

LessThan( b1, b2 )

LessEqual( b1, b2 )

Overlaps( b1, b2 )

Contains( b1, b2 )

Parameters

b1

-

RealBox object

b2

-

RealBox object

precopt

-

(optional) equation of the form precision = n, where n is a positive integer

Description

• 

Each RealBox object defines a number of predicates that can be used to query various properties of the box.

• 

Predicates may be further subdivided into unary predicates (of a single RealBox object) or binary (for comparing two RealBox objects).

• 

The following table describes briefly the defined binary predicate methods for RealBox objects.

Predicate

Description

Equal

returns true if the arguments are equal as boxes

Eq

returns true if the arguments are equal in a way that is "mathematically meaningful"

NotEq

returns true if the arguments are unequal in a way that is "mathematically meaningful"

LessThan

returns true if every member of the first argument is less than every member of the second

`<`

operator form of LessThan

LessEqual

returns true if every member of the first argument is less than or equal to every member of the second

`<=`

operator form of LessEqual

Overlaps

returns true if the operands have nonempty intersection

Contains

returns true if the first operand contains the second operand

• 

Use the 'precision' = n option to control the precision used in these methods. For more details on precision, see BoxPrecision.

Examples

The Equal predicate returns true when its two arguments are "equal as boxes".

EqualRealBox0&comma;1.10-10&comma;RealBox0&comma;1.10-10

true

(1)

The Eq predicate is different; it returns a "mathematically meaningful" test for equality.

EqRealBox0&comma;1.10-10&comma;RealBox0&comma;1.10-10

false

(2)

EqRealBox0&comma;RealBox0

true

(3)

EqRealBox0.0&comma;RealBox0

true

(4)

EqRealBox0.0&comma;RealBox0

true

(5)

EqRealBox0.0&comma;RealBox0.0

true

(6)

The NotEq predicate returns true when its two arguments are not equal in  a "mathematically meaningful" way.

NotEqRealBox0&comma;1.10-10&comma;RealBox0&comma;1.10-10

false

(7)

The comparison predicates LessThan and LessEqual, as well as their infix operator counterparts `<` and `<=`, return true if the indicates comparison is true for all members of their box operands.

LessEqualRealBox1&comma;1&comma;RealBox3&comma;1

true

(8)

Also note that `<` and `<=` require that you use evalb in a non-boolean context.

evalbRealBox1&comma;1RealBox3&comma;1

true

(9)

evalbRealBox1&comma;1<RealBox4&comma;1

true

(10)

ContainsRealBox4&comma;4&comma;RealBox3&comma;1

true

(11)

ContainsRealBox0&comma;2&comma;RealBox3&comma;1

false

(12)

OverlapsRealBox0&comma;2&comma;RealBox3&comma;1

true

(13)

Compatibility

• 

The RealBox[BinaryPredicates], RealBox[Equal], RealBox[Eq], RealBox[NotEq], RealBox[LessThan], RealBox[`<`], RealBox[LessEqual], RealBox[`<=`], RealBox[Overlaps] and RealBox[Contains] commands were introduced in Maple 2022.

• 

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

See Also

ComplexBox

RealBox