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

Online Help

All Products    Maple    MapleSim


Set

Python representation of a Maple set

 

Description

Method Summary

Superclass

Examples

Description

• 

The maple.Set class represents Maple objects of type set.

Method Summary

• 

maple.Set inherits all the methods defined on Indexable objects.

• 

It implements the collections.abc.Set base abstract class from the collections.abc module.

• 

The following methods are defined on any Set object and invoke the specified implementation in Maple.

Method name

Usage

Maple implementation

__le__

x <= y

True if x is equal to or a subset of y

__lt__

x < y

True when x is a strict subset of y

__ge__

x >= y

True when x is equal to or a superset of y

__gt__

x > y

True when x is a strict superset of y

__`and`__

x and y

Intersection of x and y

__`or`__

x or y

Union of x and y

__`xor`__

x ^ y

Symmetric difference of of x and y

__sub__

x - y

Set difference of x and y

isdisjoint

isdisjoint(x,y)

True when x and y are disjoint

• 

A maple.Set object may be transformed to a Python set using the set command.

Superclass

• 

Indexable

Examples

See Also

OpenMaple/Python

OpenMaple/Python/Examples

OpenMaple/Python/Expression

OpenMaple/Python/List

OpenMaple/Python/Name

OpenMaple/Python/RTable

OpenMaple/Python/Table