verify/dataseries - Maple Help

verify/dataseries

verify a relation between two DataSeries objects

 Calling Sequence verify(expr1, expr2, dataseries) verify(expr1, expr2, dataseries(ver, opt)

Parameters

 expr1, expr2 - anything ver - (optional) verification to use for the entries of the DataSeries objects opt - (optional) equation of the form labelverification = lver, where lver is the verification to use for the labels of the DataSeries objects

Description

 • The verify(expr1, expr2, dataseries) command returns true if expr1 and expr2 are both DataSeries objects, and their labels and entries are the same and occur in the same order.
 • The verify(expr1, expr2, dataseries(ver)) command returns true if expr1 and expr2 are both DataSeries objects, and their labels are the same and occur in the same order, and each entry of expr1 is in the relation specified by ver with the corresponding entry of expr2.
 • The verify(expr1, expr2, dataseries(labelverification=lver)) command returns true if expr1 and expr2 are both DataSeries objects, and their entries are the same and occur in the same order, and each label of expr1 is in the relation specified by lver with the corresponding label of expr2.
 • The verify(expr1, expr2, dataseries(ver, labelverification=lver)) command returns true if expr1 and expr2 are both DataSeries objects, and each label of expr1 is in the relation specified by lver with the corresponding label of expr2, and each entry of expr1 is in the relation specified by ver with the corresponding entry of expr2.
 • The relation specified as dataseries(ver, labelverification=lver) is symmetric if ver and lver are symmetric. The default relation used for verification if ver and/or lver is omitted, is symmetric (it is equality).

Examples

 > $\mathrm{ds1}≔\mathrm{DataSeries}\left(\left[1.,2.,3.\right],\mathrm{labels}=\left[a,b,c\right]\right)$
 ${\mathrm{ds1}}{≔}\left[\begin{array}{cc}{a}& {1.}\\ {b}& {2.}\\ {c}& {3.}\end{array}\right]$ (1)
 > $\mathrm{ds2}≔\mathrm{DataSeries}\left(\left[1.01,1.99,2.99\right],\mathrm{labels}=\left[a,b,c\right]\right)$
 ${\mathrm{ds2}}{≔}\left[\begin{array}{cc}{a}& {1.01}\\ {b}& {1.99}\\ {c}& {2.99}\end{array}\right]$ (2)
 > $\mathrm{ds3}≔\mathrm{DataSeries}\left(\left[1.,3.,2.\right],\mathrm{labels}=\left[a,c,b\right]\right)$
 ${\mathrm{ds3}}{≔}\left[\begin{array}{cc}{a}& {1.}\\ {c}& {3.}\\ {b}& {2.}\end{array}\right]$ (3)
 > $\mathrm{ds4}≔\mathrm{DataSeries}\left(\left[1.,2.,3.\right],\mathrm{labels}=\left[d,e,f\right]\right)$
 ${\mathrm{ds4}}{≔}\left[\begin{array}{cc}{d}& {1.}\\ {e}& {2.}\\ {f}& {3.}\end{array}\right]$ (4)

ds1 and ds1 have the same entries and labels.

 > $\mathrm{verify}\left(\mathrm{ds1},\mathrm{ds1},\mathrm{dataseries}\right)$
 ${\mathrm{true}}$ (5)

ds1 and ds2 have different entries.

 > $\mathrm{verify}\left(\mathrm{ds1},\mathrm{ds2},\mathrm{dataseries}\right)$
 ${\mathrm{false}}$ (6)

However, they are pairwise in the relation float(2, digits=3) (see verify/float).

 > $\mathrm{verify}\left(\mathrm{ds1},\mathrm{ds2},\mathrm{dataseries}\left(\mathrm{float}\left(2,\mathrm{digits}=3\right)\right)\right)$
 ${\mathrm{true}}$ (7)

While ds1 and ds3 map the same labels to the same values, they are ordered differently. The verify/dataseries command has no facility to recognize this.

 > $\mathrm{verify}\left(\mathrm{ds1},\mathrm{ds3},\mathrm{dataseries}\right)$
 ${\mathrm{false}}$ (8)

ds1 and ds4 have the same entries, but different labels. We specify labelverification = true (see verify/true) so that the labels compare pairwise successfully.

 > $\mathrm{verify}\left(\mathrm{ds1},\mathrm{ds4},\mathrm{dataseries}\left(\mathrm{labelverification}=\mathrm{true}\right)\right)$
 ${\mathrm{true}}$ (9)