IsEqual - Maple Help

# Online Help

###### All Products    Maple    MapleSim

ArrayTools

 IsEqual
 compare Arrays for equality

 Calling Sequence IsEqual(Array1, Array2, ...) IsEqual(Array1, Array2, ..., equalundefined)

Parameters

 Array1, Array2 - Arrays to be compared, more Arrays are optional equalundefined - (optional) treat undefined elements in Arrays as equal

Description

 • The IsEqual(Array1, Array2, ...) function compares two or more arrays for equality with undefined elements treated as inequal.
 • The option equalundefined causes the function to treat undefined elements as equal.  The default value is false.
 • This function is part of the ArrayTools package, so it can be used in the short form IsEqual(..) only after executing the command with(ArrayTools). However, it can always be accessed through the long form of the command by using ArrayTools[IsEqual](..).

Examples

 > $\mathrm{with}\left(\mathrm{ArrayTools}\right):$
 > $a≔\mathrm{Array}\left(\left[\left[1,2\right],\left[3,4\right]\right]\right)$
 ${a}{≔}\left[\begin{array}{cc}{1}& {2}\\ {3}& {4}\end{array}\right]$ (1)
 > $b≔\mathrm{Array}\left(\left[\left[1,2\right],\left[3,4\right]\right]\right)$
 ${b}{≔}\left[\begin{array}{cc}{1}& {2}\\ {3}& {4}\end{array}\right]$ (2)
 > $c≔\mathrm{Array}\left(\left[\left[1,2\right],\left[3,\mathrm{undefined}\right]\right]\right)$
 ${c}{≔}\left[\begin{array}{cc}{1}& {2}\\ {3}& {\mathrm{undefined}}\end{array}\right]$ (3)
 > $d≔\mathrm{Array}\left(\left[\left[1,2\right],\left[3,\mathrm{undefined}\right]\right]\right)$
 ${d}{≔}\left[\begin{array}{cc}{1}& {2}\\ {3}& {\mathrm{undefined}}\end{array}\right]$ (4)
 > $\mathrm{IsEqual}\left(a,b\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{IsEqual}\left(c,d\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{IsEqual}\left(c,d,\mathrm{equalundefined}\right)$
 ${\mathrm{true}}$ (7)

 See Also