Close
Close window
MultiSet Selection - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


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

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

>

MMultiSeta=2,b=5

Ma,2,b,5

(1)
>

Ma

2

(2)
>

Mb7

Mb7

(3)
>

Ma0

Ma0

(4)
>

Mc4

Mc4

(5)
>

M

b,7,c,4

(6)
>

NMultiSetgeneralized

N

(7)
>

Nw3.14159

Nw3.14159

(8)
>

N

w,3.14159

(9)


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /