MultiSet/Remove
remove a number of occurrences of an element of a MultiSet
Calling Sequence
Parameters
Description
Examples
Compatibility
Remove( M, x, n )
Remove( M, x=n )
Remove( M, [x, n] )
Remove( M, x )
M
-
MultiSet; a MultiSet
x
anything, an expression
n
nonnegint, number of copies of x to remove from M
Each of the first three calling sequences, Remove( M, x, n ), Remove( M, x=n ), and Remove( M, [x, n ] ), reduces the multiplicity of x in the MultiSet M by n.
The fourth calling sequence, Remove( M, x ), removes all occurrences of x from M.
The new multiplicity of x in M is returned.
M≔MultiSet⁡a=2,b=5,c=4
M≔a,2,b,5,c,4
Remove⁡M,b,3
2
a,2,b,2,c,4
Remove⁡M,b=2
0
a,2,c,4
Remove⁡M,c
a,2
The MultiSet/Remove command was introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
See Also
MultiSet
MultiSet/Entries
MultiSet/Insert
Download Help Document