MCPcopy Create free account

hub / github.com/ColfaxResearch/layout-categories / functions

Functions185 in github.com/ColfaxResearch/layout-categories

↓ 1 callersFunctionmidpoint_y_from_indices
(idxs)
tract/src/tract/tuple_morph_tikz.py:334
↓ 1 callersFunctionnullify_trivial_strides
Set stride to 0 for any dimension with shape 1. Given a flat layout L = (s_1,...,s_m):(d_1,...,d_m), sets d_i = 0 if s_i = 1.
tract/src/tract/layout_utils.py:20
↓ 1 callersFunctionprocess_mode
Return connectors upward; junction y = weighted avg of descendant leaves.
tract/src/tract/tuple_morph_tikz.py:57
↓ 1 callersFunctionrandom_Nest_morphisms_with_disjoint_images
Generate a pair of nested tuple morphisms with disjoint images. :return: Pair of morphisms with disjoint images :rtype: Tuple[Nest_m
tract/src/tract/test_utils.py:588
↓ 1 callersFunctionrandom_composable_Nest_morphisms
Generate a pair of composable nested tuple morphisms. :param min_length: Minimum length :type min_length: int :param max_length:
tract/src/tract/test_utils.py:561
↓ 1 callersFunctionrandom_composable_Tuple_morphisms
Generate a pair of composable tuple morphisms. :param min_length: Minimum length :type min_length: int :param max_length: Maximu
tract/src/tract/test_utils.py:221
↓ 1 callersFunctionrandom_divisible_Nest_morphisms
Generate a pair of nested tuple morphisms where one divides the other. :param min_length: Minimum length :type min_length: int :
tract/src/tract/test_utils.py:624
↓ 1 callersFunctionrandom_product_admissible_Nest_morphisms
Generate a pair of nested tuple morphisms admissible for product. :param min_length: Minimum length :type min_length: int :param
tract/src/tract/test_utils.py:655
↓ 1 callersMethodrepr_in_tex
(self)
tract/src/tract/categories.py:1303
↓ 1 callersMethodrestrict
Restrict morphism to a subtuple of its domain. :param subtuple: Indices to restrict to (1-based) :type subtuple: tup
tract/src/tract/categories.py:720
↓ 1 callersFunctionsort_flat_layout_with_perm
Sort a flat layout and return the permutation used. :param flat_layout: Input flat layout :type flat_layout: cute.Layout :return
tract/src/tract/layout_utils.py:94
↓ 1 callersMethodsum
Compute the sum α ⊕ β: <m+p>_* → <n+q>_*. :param beta: Second morphism in sum :type beta: Fin_morphism :retu
tract/src/tract/categories.py:102
↓ 1 callersMethodto_Nest_morphism
Convert to nested tuple morphism. :return: Equivalent Nest_morphism :rtype: Nest_morphism
tract/src/tract/categories.py:1190
↓ 1 callersMethodto_tikz
Generate TikZ representation of the morphism. :return: TikZ code :rtype: str
tract/src/tract/categories.py:1589
Method__getitem__
(self, index)
tract/src/tract/categories.py:257
Method__init__
(self, domain: int, codomain: int, map_: Tuple[int], name: str = "")
tract/src/tract/categories.py:43
Method__init__
(self, data)
tract/src/tract/categories.py:188
Method__init__
( self, domain: Tuple[int], codomain: Tuple[int], map: Tuple[int], name: str = "" )
tract/src/tract/categories.py:567
Method__init__
( self, domain: NestedTuple | Tuple[int] | int, codomain: NestedTuple | Tuple[int] | int, map: tuple,
tract/src/tract/categories.py:1259
Method__iter__
(self)
tract/src/tract/categories.py:254
Method__repr__
(self)
tract/src/tract/categories.py:77
Method__repr__
(self)
tract/src/tract/categories.py:226
Method__repr__
(self)
tract/src/tract/categories.py:602
Method__repr__
(self)
tract/src/tract/categories.py:1297
Method__str__
String representation of the morphism. :return: String representation :rtype: str
tract/src/tract/categories.py:68
Method__str__
(self)
tract/src/tract/categories.py:229
Method__str__
(self)
tract/src/tract/categories.py:605
Method__str__
(self)
tract/src/tract/categories.py:1300
Method_replace
(obj)
tract/src/tract/categories.py:364
Methodare_composable
Check if morphisms are composable. :param g: Second morphism :type g: Tuple_morphism :return: True if compos
tract/src/tract/categories.py:677
Methodare_composable
Check if morphisms are composable. :param g: Second morphism :type g: Nest_morphism :return: True if composa
tract/src/tract/categories.py:1351
Functioncoalesce
(f: Nest_morphism)
tract/src/tract/categories.py:1628
Methodcoalesce
Compute weak coalescence of the morphism. :return: Weakly coalesced morphism :rtype: Tuple_morphism
tract/src/tract/categories.py:930
Methodcoalesce_with_equiv
Compute weak coalescence with equivalence classes. :return: Tuple of (coalesced morphism, codomain equivalence classes)
tract/src/tract/categories.py:1016
Functioncomplement
(f: Nest_morphism)
tract/src/tract/categories.py:1631
Functioncompose
(f: Nest_morphism, g: Nest_morphism)
tract/src/tract/categories.py:1625
Functionflat_complement
Compute the complement of a flat layout with respect to size N. :param flat_layout: Input flat layout :type flat_layout: cute.Layout
tract/src/tract/layout_utils.py:332
Methodflatten_codomain
Flatten only the codomain. :return: Morphism with flattened codomain :rtype: Nest_morphism
tract/src/tract/categories.py:1489
Methodis_complementary_to
Check if morphism is complementary to other morphism. :param other: Other morphism :type other: Tuple_morphism
tract/src/tract/categories.py:1175
Methodis_congruent_to
Check if two NestedTuples have the same profile. :param other: Other NestedTuple to compare :type other: NestedTuple
tract/src/tract/categories.py:382
Methodis_refined_by
Check if self is refined by other. :param other: NestedTuple to check :type other: NestedTuple :return: True
tract/src/tract/categories.py:461
Functionlayout_to_tikz
(layout: cute.Layout, full_doc=False)
tract/src/tract/layout_utils.py:318
Functionlogical_divide
(f: Nest_morphism, g: Nest_morphism)
tract/src/tract/categories.py:1634
Functionlogical_product
(f: Nest_morphism, g: Nest_morphism)
tract/src/tract/categories.py:1637
Functionmake_morphism
Create a Nest_morphism. :param domain: Domain nested tuple data :type domain: tuple :param codomain: Codomain nested tuple data
tract/src/tract/categories.py:1608
Functionmorphism_to_tikz
(f: Nest_morphism, full_doc=False)
tract/src/tract/categories.py:1640
Functionmutual_refinement_to_tikz
Generate a TikZ diagram illustrating the mutual refinement of two nested tuples. :param nestedtuple1: First nested tuple :type neste
tract/src/tract/layout_utils.py:435
Functionnullify_zero_strides
Nullify strides for dimensions with shape 1 in nested layouts. :param layout: Input layout :type layout: cute.Layout :return: La
tract/src/tract/layout_utils.py:45
Functionrandom_complementable_Fin_morphism
Generate a random complementable morphism in Fin_*. :param domain: Domain size (optional) :type domain: int or None :param codom
tract/src/tract/test_utils.py:98
Functionrandom_weakly_composable_nest_morphisms
Generate a pair of weakly composable nested tuple morphisms. :return: Pair of weakly composable morphisms :rtype: Tuple[Nest_morphis
tract/src/tract/test_utils.py:741
Methodrelative_flattening
Compute relative flattening with respect to another NestedTuple. :param other: Reference NestedTuple :type other: Ne
tract/src/tract/categories.py:497
Methodreplace_empty_tuples_with_one
Replace all empty tuples with 1. :return: New NestedTuple with replacements :rtype: NestedTuple
tract/src/tract/categories.py:393
Methodreplace_empty_tuples_with_zero
Replace all empty tuples with 0. :return: New NestedTuple with replacements :rtype: NestedTuple
tract/src/tract/categories.py:413
Methodsize
Product of domain entries. :return: Size :rtype: int
tract/src/tract/categories.py:1318
Methodstrong_coalesce
Compute strong coalescence of the morphism. :return: Strongly coalesced morphism :rtype: Tuple_morphism
tract/src/tract/categories.py:842
Methodsum
Compute sum f ⊕ g. :param g: Second morphism :type g: Tuple_morphism :return: Sum of morphisms :rtyp
tract/src/tract/categories.py:705
Methodtest_Nest_coalesce_agree
(self, iteration)
tract/tests/morphism_tests.py:490
Methodtest_Nest_complement_agree
Test that nested tuple morphism complement agrees with layout complement. :param iteration: Test iteration number for seedin
tract/tests/morphism_tests.py:463
Methodtest_Nest_complement_is_a_complement
Test that complement of a complementable nested morphism is valid. :param iteration: Test iteration number for seeding
tract/tests/morphism_tests.py:451
Methodtest_Nest_compose_agree
Test that nested morphism composition agrees with layout. :param iteration: Test iteration number for seeding :type
tract/tests/morphism_tests.py:508
Methodtest_Nest_concat_agree
Test that nested morphism concatenation agrees with layout. :param iteration: Test iteration number for seeding :typ
tract/tests/morphism_tests.py:475
Methodtest_Nest_logical_divide_agree
(self,iteration)
tract/tests/morphism_tests.py:496
Methodtest_Nest_logical_product_agree
(self,iteration)
tract/tests/morphism_tests.py:502
Methodtest_coalesce_agree
Test that morphism coalescence agrees with layout coalescence. :param iteration: Test iteration number for seeding :
tract/tests/morphism_tests.py:235
Methodtest_coalesce_is_coalesced
Test that coalescing a tuple morphism produces a coalesced morphism. :param iteration: Test iteration number for seeding
tract/tests/morphism_tests.py:211
Methodtest_complement_agree
Test that morphism complement agrees with layout complement. :param iteration: Test iteration number for seeding :ty
tract/tests/morphism_tests.py:274
Methodtest_complement_involution
Test that complement is an involution, up to sorting.
tract/tests/morphism_tests.py:577
Methodtest_complement_is_a_complement
Test that complement of a complementable morphism is valid. :param iteration: Test iteration number for seeding :typ
tract/tests/morphism_tests.py:223
Methodtest_complex_composition_chain
Test a complex chain of compositions.
tract/tests/morphism_tests.py:677
Methodtest_compose_agree
Test that morphism composition agrees with layout composition. :param iteration: Test iteration number for seeding :
tract/tests/morphism_tests.py:262
Methodtest_composition_algorithm_agree
Test that weak composition algorithm is correct. :param iteration: Test iteration number for seeding :type iteration
tract/tests/morphism_tests.py:522
Methodtest_composition_associativity
Test that morphism composition is associative.
tract/tests/morphism_tests.py:544
Methodtest_concat_agree
Test that morphism concatenation agrees with layout concatenation. :param iteration: Test iteration number for seeding
tract/tests/morphism_tests.py:247
Methodtest_empty_morphism
Test morphisms with empty domain or codomain.
tract/tests/morphism_tests.py:600
Methodtest_flat_divide_agree
Test that flat division agrees between morphisms and layouts. :param iteration: Test iteration number for seeding :t
tract/tests/morphism_tests.py:286
Methodtest_flat_product_agree
Test that flat product agrees between morphisms and layouts. :param iteration: Test iteration number for seeding :ty
tract/tests/morphism_tests.py:298
Methodtest_identity_morphism
Test that identity morphism behaves correctly.
tract/tests/morphism_tests.py:561
Methodtest_large_morphism
Test morphisms with large values.
tract/tests/morphism_tests.py:619
Methodtest_nested_tuple_edge_cases
Test edge cases for nested tuples.
tract/tests/morphism_tests.py:635
Methodtest_single_element_morphism
Test morphisms with single elements.
tract/tests/morphism_tests.py:612
Methodtest_sort_is_sorted
Test that sorting a tuple morphism produces a sorted morphism. :param iteration: Test iteration number for seeding :
tract/tests/morphism_tests.py:199
Methodtest_sort_then_coalesce
Test sorting followed by coalescing.
tract/tests/morphism_tests.py:662
Methodunderlying_map
Compute underlying map for refinement. :param other: Reference NestedTuple :type other: NestedTuple :return:
tract/src/tract/categories.py:512
Methodupdate_codomain
Update codomain according to equivalence relation. :param equivalence_relation: List of equivalence classes :type eq
tract/src/tract/categories.py:1105
Functionweak_composite
Compute weak composition of nested tuple morphisms. Computes composition through mutual refinement when domains/codomains don't matc
tract/src/tract/layout_utils.py:460
← previous101–185 of 185, ranked by callers