@@ -48,20 +48,20 @@ function BlockArrays.blocklengths(a::GradedUnitRangeDual)
4848 return dual .(blocklengths (nondual (a)))
4949end
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)])
5454end
5555
5656# TODO : Move this to a `BlockArraysExtensions` library.
5757function blockedunitrange_getindices (a:: GradedUnitRangeDual , indices:: Vector{<:Block{1}} )
58- return unitrangedual_getindices_blocks (a, indices)
58+ return gradedunitrangedual_getindices_blocks (a, indices)
5959end
6060
6161function blockedunitrange_getindices (
6262 a:: GradedUnitRangeDual , indices:: Vector{<:BlockIndexRange{1}}
6363)
64- return unitrangedual_getindices_blocks (a, indices)
64+ return gradedunitrangedual_getindices_blocks (a, indices)
6565end
6666
6767Base. 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)))
100100end
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-
115102function unlabel_blocks (a:: GradedUnitRangeDual )
116103 return unlabel_blocks (nondual (a))
117104end
0 commit comments