numelems - Maple Help

MultiSet/numelems

return the number of elements of a MultiSet

 Calling Sequence numelems( M )

Parameters

 M - MultiSet; a MultiSet

Description

 • numelems( M ) returns the number of elements of the MultiSet M, counted by multiplicity.

Examples

 > $M≔\mathrm{MultiSet}\left(a=2,b=5\right)$
 ${M}{≔}\left\{\left[{a}{,}{2}\right]{,}\left[{b}{,}{5}\right]\right\}$ (1)
 > $\mathrm{numelems}\left(M\right)$
 ${7}$ (2)

Compatibility

 • The MultiSet/numelems command was introduced in Maple 2016.