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

Online Help

All Products    Maple    MapleSim


EqualEntries

compare elements inside two container structures

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

EqualEntries(A,B)

Parameters

A

-

container object

B

-

container object

Description

• 

The EqualEntries command compares the elements of A with the elements of B.  EqualEntries('A','B') will return true when both A and B are the same kind of structure, have the same number of elements, and contain the same elements in the same order.  Some exceptions apply.

• 

When comparing tables, both tables must have the same index/value pairs.  The indices in both tables must be exactly the same.  That is, an index of 1.0 in one table will not compare equally with 1.00 in the other table.  The values at each index are compared using evalb.

• 

When comparing rtables, both structures must have the same number of dimensions, and the same bounds in each dimension.  If A and B are Vectors of differing orientation, EqualEntries will return false.  The values at each index are compared using evalb.

• 

When comparing lists, EqualEntries is applied recursively on the elements of the lists.  In this way, lists containing other mutable container objects like tables and rtables can be compared in a deeper way than what evalb does.

• 

When comparing sets, EqualEntries will verify that each element in set A has an equivalent entry in set B, and vice versa.  This means that sets A and B need not be the same size for EqualEntries to return true.  As one example, the set {1.0,1.00} is considered to have the same entries as {1.000}.

• 

Comparison of modules is currently undefined and may change in the future.

• 

All other data structures are directly compared using evalb.

Examples

a1,2,3

a123

(1)

bVectorcolumn1,2,3

b123

(2)

EqualEntriesa,b

true

(3)

EqualEntries1.0,1.00,1.000,1.,1.,1.

true

(4)

t1tablecolor=red,size=4

t1tablesize=4,color=red

(5)

t2tablecolor=red,size=5

t2tablesize=5,color=red

(6)

EqualEntriest1,t2

false

(7)

t2size4

t2size4

(8)

EqualEntriest1,t2

true

(9)

EqualEntries1.00,1.0,1.

true

(10)

Compatibility

• 

The EqualEntries command was introduced in Maple 15.

• 

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

See Also

evalb

LinearAlgebra,Equal