multiset - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


convert/multiset

convert to a multiset

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

convert( f, multiset )

Parameters

f

-

table, list, or algebraic expression

Description

• 

This utility function converts f to a multiset. A multiset is represented in the form [[e1,m1],...,[en,mn]]; it is a list of pairs where each ei is a value (an expression), and mi is its multiplicity (an integer).

• 

If f is a table, each index is interpreted as a value and the associated entry (which should be an integer) is interpreted as its multiplicity.

• 

If f is an algebraic expression, each factor is interpreted as a value, and the exponent to which this factor is raised (which should be an integer) is interpreted as its multiplicity.

• 

If f is a list, the number of instances of each entry in the list is interpreted as its multiplicity.

• 

Note: The output from this command is a list-of-lists structure, which is not the same as the MultiSet object introduced in Maple 2016.

Examples

ttablex=1,y=3,z=2:

convertt,multiset

y,3,z,2,x,1

(1)

convertxy3z2,multiset

x,1,y,3,z,−2

(2)

convertx,y,z,y,z,y,multiset

y,3,z,2,x,1

(3)

See Also

convert/MultiSet

convert/set

MultiSet