File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ spacetype(::Type{<:AbstractTensorMap{<:Any,S}}) where {S}
8282sectortype(::Type{TT}) where {TT<:AbstractTensorMap}
8383field(::Type{TT}) where {TT<:AbstractTensorMap}
8484storagetype
85+ blocktype
8586```
8687
8788To obtain information about the indices, you can use:
Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ sectortype(t::AbstractTensorMap) = sectortype(typeof(t))
195195InnerProductStyle (t:: AbstractTensorMap ) = InnerProductStyle (typeof (t))
196196field (t:: AbstractTensorMap ) = field (typeof (t))
197197storagetype (t:: AbstractTensorMap ) = storagetype (typeof (t))
198+ blocktype (t:: AbstractTensorMap ) = blocktype (typeof (t))
198199similarstoragetype (t:: AbstractTensorMap , T= scalartype (t)) = similarstoragetype (typeof (t), T)
199200
200201numout (t:: AbstractTensorMap ) = numout (typeof (t))
@@ -310,6 +311,15 @@ Return the matrix block of a tensor corresponding to a coupled sector `c`.
310311See also [`blocks`](@ref), [`blocksectors`](@ref), [`blockdim`](@ref) and [`hasblock`](@ref).
311312""" block
312313
314+ @doc """
315+ blocktype(t)
316+
317+ Return the type of the matrix blocks of a tensor.
318+ """ blocktype
319+ function blocktype (:: Type{T} ) where {T<: AbstractTensorMap }
320+ return Core. Compiler. return_type (block, Tuple{T,sectortype (T)})
321+ end
322+
313323# Derived indexing behavior for tensors with trivial symmetry
314324# -------------------------------------------------------------
315325using TensorKit. Strided: SliceIndex
You can’t perform that action at this time.
0 commit comments