algebraixlib.algebras.clans module¶
This module contains the algebra of clans.
-
class
algebraixlib.algebras.clans.
Algebra
[source]¶ Bases:
object
Provide the operations and relations that are members of the algebra of clans.
This class contains only static member functions. Its main purpose is to provide a namespace for and highlight the operations and relations that belong to the algebra of clans. All member functions are also available at the enclosing module scope.
-
static
transpose
(clan: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]¶ Return the transposition of the clan
clan
.Returns: The unary extension of transposition from the algebra of relations to the algebra of clans, applied to clan
, orUndef()
ifclan
is not a clan.
-
static
compose
(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]¶ Return the composition of
clan1
withclan2
.Returns: The binary extension of composition from the algebra of relations to the algebra of clans, applied to clan1
andclan2
, orUndef()
ifclan1
orclan2
are not clans.
-
static
cross_union
(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]¶ Return the cross-union of
clan1
andclan2
.Returns: The binary extension of union from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1
andclan2
, orUndef()
ifclan1
orclan2
are not clans.
-
static
functional_cross_union
(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]¶ Return the left-functional cross-union of
clan1
andclan2
.Returns: The binary extension of the left-functional union from the algebra of relations to the algebra of clans, applied to clan1
andclan2
, orUndef()
ifclan1
orclan2
are not clans.
-
static
lhs_functional_cross_union
(lhs: 'PP( MxM )', rhs: 'PP( MxM )', _checked=True)[source]¶ This data manipulations preforms a left functional cross union, then unions the left hand side elements that were not cross unioned.
Parameters: - lhs – The priority left hand clan for this operation
- rhs – The right hand clan to preform the cross union with
Returns: PP(MxM) resulting math object
-
static
right_functional_cross_union
(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]¶ Return the right-functional cross-union of
clan1
andclan2
.Returns: The binary extension of the right-functional union from the algebra of relations to the algebra of clans, applied to clan1
andclan2
, orUndef()
ifclan1
orclan2
are not clans.
-
static
cross_intersect
(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]¶ Return the cross-intersection of
clan1
andclan2
.Returns: The binary extension of intersection from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1
andclan2
, orUndef()
ifclan1
orclan2
are not clans.
-
static
substrict
(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]¶ Return the binary extension of substriction of
clan1
andclan2
.Returns: The binary extension of substriction from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1
andclan2
, orUndef()
ifclan1
orclan2
are not clans.
-
static
superstrict
(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]¶ Return a Set of every element of clan1 that is a superset of any element of clan2.
Returns: The binary extension of superstriction from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1
andclan2
, orUndef()
ifclan1
orclan2
are not clans.
-
static
-
algebraixlib.algebras.clans.
transpose
(clan: 'PP(M x M)', _checked=True) → 'PP(M x M)'¶ Return the transposition of the clan
clan
.Returns: The unary extension of transposition from the algebra of relations to the algebra of clans, applied to clan
, orUndef()
ifclan
is not a clan.
-
algebraixlib.algebras.clans.
compose
(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'¶ Return the composition of
clan1
withclan2
.Returns: The binary extension of composition from the algebra of relations to the algebra of clans, applied to clan1
andclan2
, orUndef()
ifclan1
orclan2
are not clans.
-
algebraixlib.algebras.clans.
cross_union
(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'¶ Return the cross-union of
clan1
andclan2
.Returns: The binary extension of union from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1
andclan2
, orUndef()
ifclan1
orclan2
are not clans.
-
algebraixlib.algebras.clans.
functional_cross_union
(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'¶ Return the left-functional cross-union of
clan1
andclan2
.Returns: The binary extension of the left-functional union from the algebra of relations to the algebra of clans, applied to clan1
andclan2
, orUndef()
ifclan1
orclan2
are not clans.
-
algebraixlib.algebras.clans.
lhs_functional_cross_union
(lhs: 'PP( MxM )', rhs: 'PP( MxM )', _checked=True)¶ This data manipulations preforms a left functional cross union, then unions the left hand side elements that were not cross unioned.
Parameters: - lhs – The priority left hand clan for this operation
- rhs – The right hand clan to preform the cross union with
Returns: PP(MxM) resulting math object
-
algebraixlib.algebras.clans.
right_functional_cross_union
(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'¶ Return the right-functional cross-union of
clan1
andclan2
.Returns: The binary extension of the right-functional union from the algebra of relations to the algebra of clans, applied to clan1
andclan2
, orUndef()
ifclan1
orclan2
are not clans.
-
algebraixlib.algebras.clans.
cross_intersect
(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'¶ Return the cross-intersection of
clan1
andclan2
.Returns: The binary extension of intersection from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1
andclan2
, orUndef()
ifclan1
orclan2
are not clans.
-
algebraixlib.algebras.clans.
substrict
(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'¶ Return the binary extension of substriction of
clan1
andclan2
.Returns: The binary extension of substriction from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1
andclan2
, orUndef()
ifclan1
orclan2
are not clans.
-
algebraixlib.algebras.clans.
superstrict
(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'¶ Return a Set of every element of clan1 that is a superset of any element of clan2.
Returns: The binary extension of superstriction from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1
andclan2
, orUndef()
ifclan1
orclan2
are not clans.
-
algebraixlib.algebras.clans.
get_name
() → str[source]¶ Return the name and ground set of this algebra in string form.
-
algebraixlib.algebras.clans.
get_ground_set
() → algebraixlib.structure.Structure[source]¶ Return the ground set of this algebra.
-
algebraixlib.algebras.clans.
get_absolute_ground_set
() → algebraixlib.structure.Structure[source]¶ Return the absolute ground set of this algebra.
-
algebraixlib.algebras.clans.
is_member
(obj: algebraixlib.mathobjects.mathobject.MathObject) → bool[source]¶ Return
True
ifobj
is a member of the ground set of this algebra.Note
This function calls
get_ground_set()
onobj
.
-
algebraixlib.algebras.clans.
is_absolute_member
(obj: algebraixlib.mathobjects.mathobject.MathObject) → bool[source]¶ Return
True
ifobj
is a member of the absolute ground set of this algebra.return: True
ifobj
is an absolute clan.Note
This function calls
get_ground_set()
onobj
.
-
algebraixlib.algebras.clans.
get_lefts
(clan: 'PP(M x M)', _checked=True) → 'P( M )'[source]¶ Return the left set of this clan.
Returns: The union of the left sets of all relations in the clan or Undef()
ifclan
is not a clan.
-
algebraixlib.algebras.clans.
get_rights
(clan: 'PP(M x M)', _checked=True) → 'P( M )'[source]¶ Return the right set of this clan.
Returns: The union of the right sets of all relations in the clan or Undef()
ifclan
is not a clan.
-
algebraixlib.algebras.clans.
is_left_regular
(clan, _checked=True) → bool[source]¶ Return
True
ifclan
is left-regular.Returns: True
ifclan
is left-regular orUndef()
ifclan
is not a clan.
-
algebraixlib.algebras.clans.
project
(clan: 'PP(M x M)', *lefts) → 'PP(M x M)'[source]¶ Return a clan with the left components from
clan
with the values inlefts
. See project.Parameters: - clan – The source data. Must be a clan.
- lefts – The names of the lefts to return. (If you want to pass in an iterable, you need
to prefix it with a
*
.)
Returns: A clan with only the lefts as indicated by
lefts
.
-
algebraixlib.algebras.clans.
from_set
(left: '( M )', *values: '( M )') → 'PP(M x M)'[source]¶ Return a clan where all relations contain a single couplet with the same left component.
Parameters: - left – The left component of all couplets in the returned clan.
- values – The right components of the couplets in the returned clan.
Returns: A clan where every relation consists of a single couplet with a left component of
left
and a right component fromvalues
.
-
algebraixlib.algebras.clans.
from_dict
(dict1: dict) → 'PP(M x M)'[source]¶ Return a clan with a single relation where the couplets are the elements of
dict1
.