def test_union(self): """Basic tests of clans.cross_union().""" self._check_wrong_argument_types_binary(cross_union) result = cross_union(ac['clan1'], ac['clan2']) self.assertEqual(result, ac['clan1union2'])
print(str(mc_1) + ' COMPOSE ' + str(mc_2)) print('=> EVALUATES TO ' + str(simple_compose_1)) print("multiclan's compose applies a cross compose of the relations in each sides multiclan, " "the multiplicity is the product of each sides multiplicity.\n") simple_compose_2 = _multiclans.compose(mc_2, mc_1) print(str(mc_2) + ' COMPOSE ' + str(mc_1)) print('=> EVALUATES TO ' + str(simple_compose_2)) print("multiclan's compose can result in relation compositions such that two different operations" "yield the same result. For multiclans operations these same results are summed together.\n") # Multiset Cross Union Operation Example simple_cross_union_1 = _multiclans.cross_union(mc_1, mc_2) print(str(mc_1) + ' CROSS UNION ' + str(mc_2)) print('=> EVALUATES TO ' + str(simple_cross_union_1)) print("multiclan's cross union applies the relation's union for all relations in the multiclan of each argument. " "Again the resulting multiple is the product of the two relations multiples.\n") simple_cross_union_2 = _multiclans.cross_union(mc_3, mc_4) print(str(mc_3) + ' CROSS UNION ' + str(mc_4)) print('=> EVALUATES TO ' + str(simple_cross_union_2)) print("multiclan's cross union like other operations can yield the same result for different inner relation unions" "These same results are summed together.\n")
print( "multiclan's compose applies a cross compose of the relations in each sides multiclan, " "the multiplicity is the product of each sides multiplicity.\n") simple_compose_2 = _multiclans.compose(mc_2, mc_1) print(str(mc_2) + ' COMPOSE ' + str(mc_1)) print('=> EVALUATES TO ' + str(simple_compose_2)) print( "multiclan's compose can result in relation compositions such that two different operations" "yield the same result. For multiclans operations these same results are summed together.\n" ) # Multiset Cross Union Operation Example simple_cross_union_1 = _multiclans.cross_union(mc_1, mc_2) print(str(mc_1) + ' CROSS UNION ' + str(mc_2)) print('=> EVALUATES TO ' + str(simple_cross_union_1)) print( "multiclan's cross union applies the relation's union for all relations in the multiclan of " "each argument. Again the resulting multiple is the product of the two relations multiples." "\n") simple_cross_union_2 = _multiclans.cross_union(mc_3, mc_4) print(str(mc_3) + ' CROSS UNION ' + str(mc_4)) print('=> EVALUATES TO ' + str(simple_cross_union_2)) print(