Skip to content

Commit 92707fb

Browse files
committed
remove dead code
1 parent a0ddb30 commit 92707fb

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

NDTensors/src/lib/GradedAxes/src/gradedunitrange.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ function BlockArrays.combine_blockaxes(
342342
end
343343

344344
# preserve labels inside combine_blockaxes
345-
# TODO dual
346345
function BlockArrays.combine_blockaxes(a::GradedOneTo, b::GradedOneTo)
347346
return GradedOneTo(sortedunion(blocklasts(a), blocklasts(b)))
348347
end

NDTensors/src/lib/GradedAxes/src/gradedunitrangedual.jl

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,20 @@ function BlockArrays.blocklengths(a::GradedUnitRangeDual)
4848
return dual.(blocklengths(nondual(a)))
4949
end
5050

51-
function unitrangedual_getindices_blocks(a::GradedUnitRangeDual, indices)
51+
function gradedunitrangedual_getindices_blocks(a::GradedUnitRangeDual, indices)
5252
a_indices = getindex(nondual(a), indices)
5353
return mortar([label_dual(b) for b in blocks(a_indices)])
5454
end
5555

5656
# TODO: Move this to a `BlockArraysExtensions` library.
5757
function blockedunitrange_getindices(a::GradedUnitRangeDual, indices::Vector{<:Block{1}})
58-
return unitrangedual_getindices_blocks(a, indices)
58+
return gradedunitrangedual_getindices_blocks(a, indices)
5959
end
6060

6161
function blockedunitrange_getindices(
6262
a::GradedUnitRangeDual, indices::Vector{<:BlockIndexRange{1}}
6363
)
64-
return unitrangedual_getindices_blocks(a, indices)
64+
return gradedunitrangedual_getindices_blocks(a, indices)
6565
end
6666

6767
Base.axes(a::GradedUnitRangeDual) = axes(nondual(a))
@@ -99,19 +99,6 @@ function BlockArrays.combine_blockaxes(a1::GradedUnitRangeDual, a2::GradedUnitRa
9999
return dual(combine_blockaxes(dual(a1), dual(a2)))
100100
end
101101

102-
# This is needed when constructing `CartesianIndices` from
103-
# a tuple of unit ranges that have this kind of dual unit range.
104-
# TODO: See if we can find some more elegant way of constructing
105-
# `CartesianIndices`, maybe by defining conversion of `LabelledInteger`
106-
# to `Int`, defining a more general `convert` function, etc.
107-
function Base.OrdinalRange{Int,Int}(
108-
r::GradedUnitRangeDual{<:LabelledInteger{Int},<:LabelledUnitRange{Int,UnitRange{Int}}}
109-
)
110-
# TODO: Implement this broadcasting operation and use it here.
111-
# return Int.(r)
112-
return unlabel(nondual(r))
113-
end
114-
115102
function unlabel_blocks(a::GradedUnitRangeDual)
116103
return unlabel_blocks(nondual(a))
117104
end

0 commit comments

Comments
 (0)