コード例 #1
0
 def test_intersect(self):
     """Basic tests of clans.intersect()."""
     self._check_wrong_argument_types_binary(cross_intersect)
     result = cross_intersect(ac['clan1'], ac['clan3'])
     self.assertEqual(result, ac['clan1inters3'])
コード例 #2
0
ファイル: multi_example.py プロジェクト: jdcasi/algebraixlib
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")

# Multiset Cross Intersect Operation Example
simple_cross_intersect_1 = _multiclans.cross_intersect(mc_1, mc_2)

print(str(mc_1) + ' CROSS INTERSECT ' + str(mc_2))
print('=> EVALUATES TO ' + str(simple_cross_intersect_1))

print("multiclan's cross intersect applies relation's intersect for all relations in the multiclan of each argument."
      "Again the resulting multiple is the product of the two relations multiples.\n")

simple_cross_intersect_2 = _multiclans.cross_intersect(mc_3, mc_4)

print(str(mc_3) + ' CROSS INTERSECT ' + str(mc_4))
print('=> EVALUATES TO ' + str(simple_cross_intersect_2))

print("multiclan's cross intersect can yield the same result for different inner relation intersect"
      "These same results are summed together.\n")
コード例 #3
0
 def test_intersect(self):
     """Basic tests of clans.intersect()."""
     self._check_wrong_argument_types_binary(cross_intersect)
     result = cross_intersect(ac['clan1'], ac['clan3'])
     self.assertEqual(result, ac['clan1inters3'])
コード例 #4
0
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")

# Multiset Cross Intersect Operation Example
simple_cross_intersect_1 = _multiclans.cross_intersect(mc_1, mc_2)

print(str(mc_1) + ' CROSS INTERSECT ' + str(mc_2))
print('=> EVALUATES TO ' + str(simple_cross_intersect_1))

print(
    "multiclan's cross intersect applies relation's intersect for all relations in the multiclan "
    "of each argument. Again the resulting multiple is the product of the two relations "
    "multiples.\n")

simple_cross_intersect_2 = _multiclans.cross_intersect(mc_3, mc_4)

print(str(mc_3) + ' CROSS INTERSECT ' + str(mc_4))
print('=> EVALUATES TO ' + str(simple_cross_intersect_2))

print(