MultiSet/Entries - Maple Programming Help

Home : Support : Online Help : Programming : Data Types : MultiSet : MultiSet/Entries

MultiSet/Entries

return the entries of a MultiSet

 Calling Sequence Entries( M, opt )

Parameters

 M - MultiSet; a MultiSet opt - optional; option of the form output = list or output = set, specifying the form to return (default: output = set)

Description

 • Entries( M ) returns the entries of the MultiSet M as a set of lists, where the first element of each list is the MultiSet member and the second element is its multiplicity in M.  This is the same as the result of Entries( M, output=set ).
 • Entries( M, output=list ) returns the same result as Entries( M ) but as a list of lists rather than as a set of lists.

Examples

 > $M≔\mathrm{MultiSet}\left(a=2,b=5\right)$
 ${M}{≔}\left\{\left[{a}{,}{2}\right]{,}\left[{b}{,}{5}\right]\right\}$ (1)
 > $\mathrm{type}\left(M,\mathrm{MultiSet}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(M,\mathrm{set}\right)$
 ${\mathrm{false}}$ (3)
 > $\mathrm{Entries}\left(M\right)$
 $\left\{\left[{a}{,}{2}\right]{,}\left[{b}{,}{5}\right]\right\}$ (4)
 > $\mathrm{whattype}\left(\mathrm{Entries}\left(M\right)\right)$
 ${\mathrm{set}}$ (5)
 > $\mathrm{Entries}\left(M,\mathrm{output}=\mathrm{list}\right)$
 $\left[\left[{a}{,}{2}\right]{,}\left[{b}{,}{5}\right]\right]$ (6)
 > $\mathrm{whattype}\left(\mathrm{Entries}\left(M,\mathrm{output}=\mathrm{list}\right)\right)$
 ${\mathrm{list}}$ (7)

Compatibility

 • The MultiSet/Entries command was introduced in Maple 2016.
 • For more information on Maple 2016 changes, see Updates in Maple 2016.