Skip to content

Commit 5f2452d

Browse files
committed
remove to_tuple
1 parent 192fe47 commit 5f2452d

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/fusion_trees/fusiontree.jl

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,15 @@ outer_multiplicity_indices(f::SectorFusionTree) = f.outer_multiplicity_indices
6767

6868
# Base interface
6969
Base.convert(T::Type{<:Array}, f::SectorFusionTree) = convert(T, to_array(f))
70-
Base.isless(f1::SectorFusionTree, f2::SectorFusionTree) = isless(to_tuple(f1), to_tuple(f2))
70+
71+
function Base.isless(f1::SectorFusionTree, f2::SectorFusionTree)
72+
return isless(leaves(f1), leaves(f2)) ||
73+
isless(arrows(f1), arrows(f2)) ||
74+
isless(root_sector(f1), root_sector(f2)) ||
75+
isless(branch_sectors(f1), branch_sectors(f2)) ||
76+
isless(outer_multiplicity_indices(f1), outer_multiplicity_indices(f2))
77+
end
78+
7179
Base.length(::SectorFusionTree{<:Any,N}) where {N} = N
7280

7381
# GradedUnitRanges interface
@@ -146,16 +154,6 @@ end
146154
#
147155
# ===================================== Internals ========================================
148156
#
149-
# --------------- misc ---------------
150-
function to_tuple(f::SectorFusionTree)
151-
return (
152-
leaves(f)...,
153-
arrows(f)...,
154-
root_sector(f),
155-
branch_sectors(f)...,
156-
outer_multiplicity_indices(f)...,
157-
)
158-
end
159157

160158
# --------------- SectorProduct helper functions ---------------
161159
function outer_multiplicity_kron(

0 commit comments

Comments
 (0)