EqualEntries
compare elements inside two container structures
Calling Sequence
Parameters
Description
Examples
Compatibility
EqualEntries(A,B)
A
-
container object
B
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.
a≔1,2,3
a≔123
b≔Vectorcolumn⁡1,2,3
b≔123
EqualEntries⁡a,b
true
EqualEntries⁡1.0,1.00,1.000,1.,1.,1.
t1≔table⁡color=red,size=4
t1≔table⁡size=4,color=red
t2≔table⁡color=red,size=5
t2≔table⁡size=5,color=red
EqualEntries⁡t1,t2
false
t2size≔4
EqualEntries⁡1.00,1.0,1.
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
Download Help Document