Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ColfaxResearch/layout-categories
/ functions
Functions
185 in github.com/ColfaxResearch/layout-categories
⨍
Functions
185
◇
Types & classes
9
↓ 1 callers
Function
midpoint_y_from_indices
(idxs)
tract/src/tract/tuple_morph_tikz.py:334
↓ 1 callers
Function
nullify_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 callers
Function
process_mode
Return connectors upward; junction y = weighted avg of descendant leaves.
tract/src/tract/tuple_morph_tikz.py:57
↓ 1 callers
Function
random_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 callers
Function
random_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 callers
Function
random_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 callers
Function
random_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 callers
Function
random_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 callers
Method
repr_in_tex
(self)
tract/src/tract/categories.py:1303
↓ 1 callers
Method
restrict
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 callers
Function
sort_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 callers
Method
sum
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 callers
Method
to_Nest_morphism
Convert to nested tuple morphism. :return: Equivalent Nest_morphism :rtype: Nest_morphism
tract/src/tract/categories.py:1190
↓ 1 callers
Method
to_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
Method
are_composable
Check if morphisms are composable. :param g: Second morphism :type g: Tuple_morphism :return: True if compos
tract/src/tract/categories.py:677
Method
are_composable
Check if morphisms are composable. :param g: Second morphism :type g: Nest_morphism :return: True if composa
tract/src/tract/categories.py:1351
Function
coalesce
(f: Nest_morphism)
tract/src/tract/categories.py:1628
Method
coalesce
Compute weak coalescence of the morphism. :return: Weakly coalesced morphism :rtype: Tuple_morphism
tract/src/tract/categories.py:930
Method
coalesce_with_equiv
Compute weak coalescence with equivalence classes. :return: Tuple of (coalesced morphism, codomain equivalence classes)
tract/src/tract/categories.py:1016
Function
complement
(f: Nest_morphism)
tract/src/tract/categories.py:1631
Function
compose
(f: Nest_morphism, g: Nest_morphism)
tract/src/tract/categories.py:1625
Function
flat_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
Method
flatten_codomain
Flatten only the codomain. :return: Morphism with flattened codomain :rtype: Nest_morphism
tract/src/tract/categories.py:1489
Method
is_complementary_to
Check if morphism is complementary to other morphism. :param other: Other morphism :type other: Tuple_morphism
tract/src/tract/categories.py:1175
Method
is_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
Method
is_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
Function
layout_to_tikz
(layout: cute.Layout, full_doc=False)
tract/src/tract/layout_utils.py:318
Function
logical_divide
(f: Nest_morphism, g: Nest_morphism)
tract/src/tract/categories.py:1634
Function
logical_product
(f: Nest_morphism, g: Nest_morphism)
tract/src/tract/categories.py:1637
Function
make_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
Function
morphism_to_tikz
(f: Nest_morphism, full_doc=False)
tract/src/tract/categories.py:1640
Function
mutual_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
Function
nullify_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
Function
random_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
Function
random_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
Method
relative_flattening
Compute relative flattening with respect to another NestedTuple. :param other: Reference NestedTuple :type other: Ne
tract/src/tract/categories.py:497
Method
replace_empty_tuples_with_one
Replace all empty tuples with 1. :return: New NestedTuple with replacements :rtype: NestedTuple
tract/src/tract/categories.py:393
Method
replace_empty_tuples_with_zero
Replace all empty tuples with 0. :return: New NestedTuple with replacements :rtype: NestedTuple
tract/src/tract/categories.py:413
Method
size
Product of domain entries. :return: Size :rtype: int
tract/src/tract/categories.py:1318
Method
strong_coalesce
Compute strong coalescence of the morphism. :return: Strongly coalesced morphism :rtype: Tuple_morphism
tract/src/tract/categories.py:842
Method
sum
Compute sum f ⊕ g. :param g: Second morphism :type g: Tuple_morphism :return: Sum of morphisms :rtyp
tract/src/tract/categories.py:705
Method
test_Nest_coalesce_agree
(self, iteration)
tract/tests/morphism_tests.py:490
Method
test_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
Method
test_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
Method
test_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
Method
test_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
Method
test_Nest_logical_divide_agree
(self,iteration)
tract/tests/morphism_tests.py:496
Method
test_Nest_logical_product_agree
(self,iteration)
tract/tests/morphism_tests.py:502
Method
test_coalesce_agree
Test that morphism coalescence agrees with layout coalescence. :param iteration: Test iteration number for seeding :
tract/tests/morphism_tests.py:235
Method
test_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
Method
test_complement_agree
Test that morphism complement agrees with layout complement. :param iteration: Test iteration number for seeding :ty
tract/tests/morphism_tests.py:274
Method
test_complement_involution
Test that complement is an involution, up to sorting.
tract/tests/morphism_tests.py:577
Method
test_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
Method
test_complex_composition_chain
Test a complex chain of compositions.
tract/tests/morphism_tests.py:677
Method
test_compose_agree
Test that morphism composition agrees with layout composition. :param iteration: Test iteration number for seeding :
tract/tests/morphism_tests.py:262
Method
test_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
Method
test_composition_associativity
Test that morphism composition is associative.
tract/tests/morphism_tests.py:544
Method
test_concat_agree
Test that morphism concatenation agrees with layout concatenation. :param iteration: Test iteration number for seeding
tract/tests/morphism_tests.py:247
Method
test_empty_morphism
Test morphisms with empty domain or codomain.
tract/tests/morphism_tests.py:600
Method
test_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
Method
test_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
Method
test_identity_morphism
Test that identity morphism behaves correctly.
tract/tests/morphism_tests.py:561
Method
test_large_morphism
Test morphisms with large values.
tract/tests/morphism_tests.py:619
Method
test_nested_tuple_edge_cases
Test edge cases for nested tuples.
tract/tests/morphism_tests.py:635
Method
test_single_element_morphism
Test morphisms with single elements.
tract/tests/morphism_tests.py:612
Method
test_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
Method
test_sort_then_coalesce
Test sorting followed by coalescing.
tract/tests/morphism_tests.py:662
Method
underlying_map
Compute underlying map for refinement. :param other: Reference NestedTuple :type other: NestedTuple :return:
tract/src/tract/categories.py:512
Method
update_codomain
Update codomain according to equivalence relation. :param equivalence_relation: List of equivalence classes :type eq
tract/src/tract/categories.py:1105
Function
weak_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
← previous
101–185 of 185, ranked by callers