File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 474474 end
475475end
476476
477+ @inline function getindex (A:: SymTridiagonal , b:: BandIndex )
478+ @boundscheck checkbounds (A, i, j)
479+ if b. band == 0
480+ return symmetric ((@inbounds A. dv[b. index]), :U ):: symmetric_type (eltype (A. dv))
481+ elseif b. band == - 1
482+ return copy (transpose (@inbounds A. ev[b. index])) # materialized for type stability
483+ elseif b. band == 1
484+ return @inbounds A. ev[b. index]
485+ else
486+ return diagzero (A, b)
487+ end
488+ end
489+
477490Base. _reverse (A:: SymTridiagonal , dims) = reverse! (Matrix (A); dims)
478491Base. _reverse (A:: SymTridiagonal , dims:: Colon ) = SymTridiagonal (reverse (A. dv), reverse (A. ev))
479492Base. _reverse! (A:: SymTridiagonal , dims:: Colon ) = (reverse! (A. dv); reverse! (A. ev); A)
You can’t perform that action at this time.
0 commit comments