algebraixlib.mathobjects package¶
This package contains the modules that define the classes that represent data.
The modules are:
mathobject
: Contains the abstract base classMathObject
. It is the base class of all other data classes and can’t be instantiated. It also provides the utility functionsraise_if_not_mathobject()
andraise_if_not_mathobjects()
that raise aTypeError
if the argument is not an instance ofMathObject
(resp. is not a collection of such instances).atom
: Contains the classAtom
. Instances of this class represent atoms; that is, values (of non-math objects, like numbers, strings or any immutable Python value). All instances ofAtom
are members of set A (\(A\)), or conversely, set A is the set of all instances ofAtom
. It also provides the utility functionauto_convert()
that makes sure that its argument is always an instance ofMathObject
; if it isn’t, it converts it into anAtom
.couplet
: Contains the classCouplet
that represents a couplet.set
: Contains the classSet
that represents a set.
If you import mathobjects
(the package), all module-level symbols (functions, classes) are
imported.