Set

abstract class pitchtools.Set(items=None, item_class=None)

Abstract set.

Lineage

digraph InheritanceGraph { graph [background=transparent, bgcolor=transparent, color=lightslategrey, fontname=Arial, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, root="__builtin__.object", splines=spline, style="dotted, rounded", truecolor=true]; node [colorscheme=pastel19, fontname=Arial, fontsize=12, penwidth=2, style="filled, rounded"]; edge [color=lightsteelblue2, penwidth=2]; subgraph cluster_abctools { graph [label=abctools]; "abjad.tools.abctools.AbjadObject.AbjadObject" [color=1, group=0, label=AbjadObject, shape=box]; "abjad.tools.abctools.AbjadObject.AbstractBase" [color=1, group=0, label=AbstractBase, shape=box]; "abjad.tools.abctools.AbjadObject.AbstractBase" -> "abjad.tools.abctools.AbjadObject.AbjadObject"; } subgraph cluster_datastructuretools { graph [label=datastructuretools]; "abjad.tools.datastructuretools.TypedCollection.TypedCollection" [color=3, group=2, label=TypedCollection, shape=oval, style=bold]; "abjad.tools.datastructuretools.TypedFrozenset.TypedFrozenset" [color=3, group=2, label=TypedFrozenset, shape=box]; "abjad.tools.datastructuretools.TypedCollection.TypedCollection" -> "abjad.tools.datastructuretools.TypedFrozenset.TypedFrozenset"; } subgraph cluster_pitchtools { graph [label=pitchtools]; "abjad.tools.pitchtools.IntervalClassSet.IntervalClassSet" [color=4, group=3, label=IntervalClassSet, shape=box]; "abjad.tools.pitchtools.IntervalSet.IntervalSet" [color=4, group=3, label=IntervalSet, shape=box]; "abjad.tools.pitchtools.PitchClassSet.PitchClassSet" [color=4, group=3, label=PitchClassSet, shape=box]; "abjad.tools.pitchtools.PitchSet.PitchSet" [color=4, group=3, label=PitchSet, shape=box]; "abjad.tools.pitchtools.Set.Set" [color=black, fontcolor=white, group=3, label=<<B>Set</B>>, shape=oval, style="filled, rounded"]; "abjad.tools.pitchtools.Set.Set" -> "abjad.tools.pitchtools.IntervalClassSet.IntervalClassSet"; "abjad.tools.pitchtools.Set.Set" -> "abjad.tools.pitchtools.IntervalSet.IntervalSet"; "abjad.tools.pitchtools.Set.Set" -> "abjad.tools.pitchtools.PitchClassSet.PitchClassSet"; "abjad.tools.pitchtools.Set.Set" -> "abjad.tools.pitchtools.PitchSet.PitchSet"; } subgraph cluster_tonalanalysistools { graph [label=tonalanalysistools]; "abjad.tools.tonalanalysistools.RootedChordClass.RootedChordClass" [color=5, group=4, label=RootedChordClass, shape=box]; } subgraph cluster_builtins { graph [label=builtins]; "builtins.object" [color=2, group=1, label=object, shape=box]; } "abjad.tools.abctools.AbjadObject.AbjadObject" -> "abjad.tools.datastructuretools.TypedCollection.TypedCollection"; "abjad.tools.datastructuretools.TypedFrozenset.TypedFrozenset" -> "abjad.tools.pitchtools.Set.Set"; "abjad.tools.pitchtools.PitchClassSet.PitchClassSet" -> "abjad.tools.tonalanalysistools.RootedChordClass.RootedChordClass"; "builtins.object" -> "abjad.tools.abctools.AbjadObject.AbstractBase"; }

Attribute summary

cardinality Gets cardinality of set.
copy() Copies typed frozen set.
difference(argument) Typed frozen set set-minus argument.
from_selection(class_, selection[, item_class]) Makes set from selection.
intersection(argument) Set-theoretic intersection of typed frozen set and argument.
isdisjoint(argument) Is true when typed frozen set shares no elements with argument.
issubset(argument) Is true when typed frozen set is a subset of argument.
issuperset(argument) Is true when typed frozen set is a superset of argument.
item_class Gets item class of collection.
items Gets items in collection.
symmetric_difference(argument) Symmetric difference of typed frozen set and argument.
union(argument) Union of typed frozen set and argument.
__and__(argument) Logical AND of typed frozen set and argument.
__contains__(item) Is true when typed collection contains item.
__eq__(argument) Is true when argument is a typed collection with items that compare equal to those of this typed collection.
__format__([format_specification]) Formats Abjad object.
__ge__(argument) Is true when typed frozen set is greater than or equal to argument.
__gt__(argument) Is true when typed frozen set is greater than argument.
__hash__() Hashes typed frozen set.
__iter__() Iterates typed collection.
__le__(argument) Is true when typed frozen set is less than or equal to argument.
__len__() Gets length of typed collection.
__lt__(argument) Is true when typed frozen set is less than argument.
__ne__(argument) Is true when Abjad object does not equal argument.
__or__(argument) Logical OR of typed frozen set and argument.
__repr__() Gets interpreter representation of Abjad object.
__str__() Gets string representation.
__sub__(argument) Subtracts argument from typed frozen set.
__xor__(argument) Logical XOR of typed frozen set and argument.

Read-only properties

Set.cardinality

Gets cardinality of set.

Defined equal to length of set.

Returns nonnegative integer.

(TypedCollection).item_class

Gets item class of collection.

Collection coerces items according to item_class.

Returns class.

(TypedCollection).items

Gets items in collection.

Returns list.

Methods

(TypedFrozenset).copy()

Copies typed frozen set.

Returns new typed frozen set.

(TypedFrozenset).difference(argument)

Typed frozen set set-minus argument.

Returns new typed frozen set.

abstract Set.from_selection(class_, selection, item_class=None)

Makes set from selection.

Returns set.

(TypedFrozenset).intersection(argument)

Set-theoretic intersection of typed frozen set and argument.

Returns new typed frozen set.

(TypedFrozenset).isdisjoint(argument)

Is true when typed frozen set shares no elements with argument. Otherwise false.

Returns true or false.

(TypedFrozenset).issubset(argument)

Is true when typed frozen set is a subset of argument. Otherwise false.

Returns true or false.

(TypedFrozenset).issuperset(argument)

Is true when typed frozen set is a superset of argument. Otherwise false.

Returns true or false.

(TypedFrozenset).symmetric_difference(argument)

Symmetric difference of typed frozen set and argument.

Returns new typed frozen set.

(TypedFrozenset).union(argument)

Union of typed frozen set and argument.

Returns new typed frozen set.

Special methods

(TypedFrozenset).__and__(argument)

Logical AND of typed frozen set and argument.

Returns new typed frozen set.

(TypedCollection).__contains__(item)

Is true when typed collection contains item. Otherwise false.

Returns true or false.

(TypedCollection).__eq__(argument)

Is true when argument is a typed collection with items that compare equal to those of this typed collection. Otherwise false.

Returns true or false.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to ‘’ or ‘storage’. Interprets ‘’ equal to ‘storage’.

Returns string.

(TypedFrozenset).__ge__(argument)

Is true when typed frozen set is greater than or equal to argument. Otherwise false.

Returns true or false.

(TypedFrozenset).__gt__(argument)

Is true when typed frozen set is greater than argument. Otherwise false.

Returns true or false.

(TypedFrozenset).__hash__()

Hashes typed frozen set.

Returns integer.

(TypedCollection).__iter__()

Iterates typed collection.

Returns generator.

(TypedFrozenset).__le__(argument)

Is true when typed frozen set is less than or equal to argument. Otherwise false.

Returns true or false.

(TypedCollection).__len__()

Gets length of typed collection.

Returns nonnegative integer.

(TypedFrozenset).__lt__(argument)

Is true when typed frozen set is less than argument. Otherwise false.

Returns true or false.

(AbjadObject).__ne__(argument)

Is true when Abjad object does not equal argument. Otherwise false.

Returns true or false.

(TypedFrozenset).__or__(argument)

Logical OR of typed frozen set and argument.

Returns new typed frozen set.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.

Set.__str__()

Gets string representation.

Returns string.

(TypedFrozenset).__sub__(argument)

Subtracts argument from typed frozen set.

Returns new typed frozen set.

(TypedFrozenset).__xor__(argument)

Logical XOR of typed frozen set and argument.

Returns new typed frozen set.