Esempio n. 1
0
# }.items()}
# _print_object_collection('basic_multisets')

#: Relation instances for testing the relation algebra.
algebra_relations = {key: _create_test_object(val, key) for key, val in {
    'rel1': Set([Couplet('a', 1), Couplet('b', 2), Couplet('c', 3)]),
    'rel1/lefts': Set('a', 'b', 'c'),
    'rel1/rights': Set([1, 2, 3]),
    'rel2': Set([Couplet('x', 'a'), Couplet('zzz', 'zzz'), Couplet('y', 'c')]),
    'rel2/lefts': Set(['x', 'zzz', 'y']),
    'rel2/rights': Set(['a', 'zzz', 'c']),
    'rel1comp1': Set(),
    'rel1comp2': Set([Couplet('x', 1), Couplet('y', 3)]),
    'rel2comp2': Set(Couplet('zzz', 'zzz')),
    'rel1transp': Set([Couplet(1, 'a'), Couplet(2, 'b'), Couplet(3, 'c')]),
    'reldiag': _diag('a', 'b', 'c', 'x', 'zzz', 'y', 1, 2, 3),
}.items()}
_print_object_collection('algebra_relations')

#: Basic clan instances.
basic_clans = {key: _create_test_object(Set(val), key, val) for key, val in {
    'left func': basic_sets['left func'],
    'left func2': [
        basic_sets['left func'], Set([Couplet(s, c) for s, c in zip('def', [4, 5, 6])])
    ],
    'not left func': basic_sets['not left func'],
    'not right func': basic_sets['not right func'],
    'diagonal': basic_sets['diagonal']
}.items()}
_print_object_collection('basic_clans')
Esempio n. 2
0
}.items()}
_print_object_collection('basic_multisets')

#: Relation instances for testing the relation algebra.
algebra_relations = {key: _create_test_object(val, key) for key, val in {
    'rel1': Set([Couplet('a', 1), Couplet('b', 2), Couplet('c', 3)]),
    'rel1/lefts': Set('a', 'b', 'c'),
    'rel1/rights': Set([1, 2, 3]),
    'rel2': Set([Couplet('x', 'a'), Couplet('zzz', 'zzz'), Couplet('y', 'c')]),
    'rel2/lefts': Set(['x', 'zzz', 'y']),
    'rel2/rights': Set(['a', 'zzz', 'c']),
    'rel1comp1': Set(),
    'rel1comp2': Set([Couplet('x', 1), Couplet('y', 3)]),
    'rel2comp2': Set(Couplet('zzz', 'zzz')),
    'rel1transp': Set([Couplet(1, 'a'), Couplet(2, 'b'), Couplet(3, 'c')]),
    'reldiag': _diag('a', 'b', 'c', 'x', 'zzz', 'y', 1, 2, 3),
}.items()}
_print_object_collection('algebra_relations')

#: Basic clan instances.
basic_clans = {key: _create_test_object(Set(val), key, val) for key, val in {
    'left func': basic_sets['left func'],
    'left func2': [
        basic_sets['left func'], Set([Couplet(s, c) for s, c in zip('def', [4, 5, 6])])
    ],
    'not left func': basic_sets['not left func'],
    'not right func': basic_sets['not right func'],
    'diagonal': basic_sets['diagonal']
}.items()}
_print_object_collection('basic_clans')