algebraixlib.mathobjects.mathobject module¶
The abstract base class for all math objects.
-
algebraixlib.mathobjects.mathobject.
raise_if_not_mathobject
(obj)[source]¶ Raise a
TypeError
exception ifobj
is not an instance ofMathObject
.
-
algebraixlib.mathobjects.mathobject.
raise_if_not_mathobjects
(*objs)[source]¶ Raise a
TypeError
exception if any member ofobjs
is not aMathObject
.
-
class
algebraixlib.mathobjects.mathobject.
MathObject
[source]¶ Bases:
abc.ABC
An abstract base class (see the base class
abc.ABC
) for all classes that represent data.Note
This class can’t be instantiated. Only derived classes that implement all abstract methods can be instantiated. Since derived classes are expected to be hashable, they must be immutable.
-
get_ground_set
() → algebraixlib.structure.Structure[source]¶ Return the ground set of the lowest-level algebra of this
MathObject
.
-
is_left_regular
() → bool[source]¶ Return
True
if left-regular orUndef()
if not applicable.
-
is_left_functional
() → bool[source]¶ Return
True
if left-functional orUndef()
if not applicable.
-
is_right_functional
() → bool[source]¶ Return
True
if right-functional orUndef()
if not applicable.
-
is_bijection
() → bool[source]¶ Return
True
if left- and right-functional orUndef()
if not applicable.
-
is_transitive
() → bool[source]¶ Return
True
if transitive orUndef()
if not applicable.
-
is_equivalence_relation
() → bool[source]¶ Return
True
if equivalence relation orUndef()
if not applicable.
-
__hash__
() → int[source]¶ Return a hash based on the member values (must match the implementation of
__eq__
).Note
The fact that we calculate a hash of an instance requires that instances of classes derived from this class are immutable (see also Immutable Sequence Types) and all its contained elements hashable (see also object.__hash__).
-
cached_is_not_relation
¶
-
cached_is_relation
¶
-
cached_is_not_clan
¶
-
cached_is_clan
¶
-
cached_is_not_multiclan
¶
-
cached_is_multiclan
¶
-
cached_is_not_left_functional
¶
-
cached_is_left_functional
¶
-
cached_is_not_right_functional
¶
-
cached_is_right_functional
¶
-
cached_is_not_left_regular
¶
-
cached_is_left_regular
¶
-
cached_is_not_reflexive
¶
-
cached_is_reflexive
¶
-
cached_is_not_symmetric
¶
-
cached_is_symmetric
¶
-
cached_is_not_transitive
¶
-
cached_is_transitive
¶
-