MultiSet Selection - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

Home : Support : Online Help : Programming : Data Types : MultiSet : MultiSet Selection

MultiSet Selection

get or set the multiplicity of an element of a MultiSet

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

M[x]

M[x] := n;

Parameters

M

-

MultiSet; a MultiSet

x

-

anything, an expression

n

-

numeric, the new multiplicity of x in M

Description

• 

M[x] returns the multiplicity of the member x of the MultiSet M.

• 

M[x] := n sets the multiplicity of x in M to n.  Note that this is different from Insert( M, x=n ), which increases the multiplicity of x in M by n.

• 

Note M[x] := 0 is equivalent to Remove( M, x ).

• 

If M is a generalized MultiSet, n may be any real number.  Otherwise, it must be a non-negative integer.

Examples

(1)

(2)

(3)

(4)

(5)

(6)

(7)

(8)

(9)

See Also

MultiSet

MultiSet/Insert

MultiSet/Remove

 


Download Help Document