MultiSet/member - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

MultiSet/member

test if an expression is a member of a MultiSet

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

member( x, M )

x in M

Parameters

M

-

MultiSet; a MultiSet

x

-

anything, an expression

Description

• 

member( x, M ) returns true if x is a member of the MultiSet M, false otherwise

• 

Note: member( x, M ) is equivalent to evalb( x in M ) and also equivalent to evalb( M[x] <> 0 ).

• 

Note: As a MultiSet is unordered, attempting to use the three-argument form of the member command, as in member( x, M, 'k' ) will result in an error.

Examples

MMultiSeta=2&comma;b=5

Ma&comma;2&comma;b&comma;5

(1)

memberb&comma;M

true

(2)

memberc&comma;M

false

(3)

evalbainM

true

(4)

membera&comma;M&comma;k

Error, index of member is undefined

Compatibility

• 

The MultiSet/member command was introduced in Maple 2016.

• 

For more information on Maple 2016 changes, see Updates in Maple 2016.

See Also

MultiSet

MultiSet/intersection

MultiSet/subset

MultiSet/union