insert an element into a MultiSet
Insert( M, x, n )
Insert( M, x=n )
Insert( M, [x, n] )
Insert( M, x )
MultiSet; a MultiSet
anything, an expression
nonnegint, number of copies of x to insert into M
Each of the first three calling sequences, Insert( M, x, n ), Insert( M, x=n ), and Insert( M, [x, n] ), increments the multiplicity of x in the MultiSet M by n.
The fourth calling sequence, Insert( M, x ) is equivalent to Insert( M, x, 1 ).
The new multiplicity of x in M is returned.
To set the multiplicity of an element to a specific value, use the selection operator. For example, to set the multiplicity of x to 3, use M[x] := 3.
M ≔ MultiSet⁡a=2,b=5
The MultiSet/Insert command was introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
Download Help Document
What kind of issue would you like to report? (Optional)