Library index
BlockTensorKit.AbstractBlockTensorMap
— TypeAbstractBlockTensorMap{E,S,N₁,N₂}
Abstract supertype for tensor maps that have additional block structure, i.e. they act on vector spaces that have a direct sum structure. These behave like AbstractTensorMap
but have additional methods to facilitate indexing and manipulation of the block structure.
BlockTensorKit.BlockTensorMap
— Typestruct BlockTensorMap{TT<:AbstractTensorMap{E,S,N₁,N₂}} <: AbstractTensorMap{E,S,N₁,N₂}
Dense BlockTensorMap
type that stores tensors of type TT
in a dense array.
BlockTensorKit.SparseBlockTensorMap
— Typestruct SparseBlockTensorMap{TT<:AbstractTensorMap{E,S,N₁,N₂}} <: AbstractBlockTensorMap{E,S,N₁,N₂}
Sparse SparseBlockTensorMap
type that stores tensors of type TT
in a sparse dictionary.
BlockTensorKit.SumSpace
— Typestruct SumSpace{S<:ElementarySpace} <: ElementarySpace
A (lazy) direct sum of elementary vector spaces of type S
.
BlockTensorKit.SumSpaceIndices
— Typestruct SumSpaceIndices{S,N₁,N₂} <: AbstractArray{TensorMapSpace{S,N₁,N₂},N₁ + N₂}
BlockTensorKit.droptol!
— Functiondroptol!(t::AbstractBlockTensorMap, tol=eps(real(scalartype(t)))^(3/4))
Remove the tensor entries of a blocktensor that have norm ≤(tol)
.
BlockTensorKit.dropzeros!
— Methoddropzeros!(t::AbstractBlockTensorMap)
Remove the tensor entries of a blocktensor that have norm 0. Only applicable to sparse blocktensors.
BlockTensorKit.eachspace
— Methodeachspace(V::TensorMapSumSpace) -> SumSpaceIndices
Return an object that can be used to obtain the subspaces of a BlockTensorMap
.
BlockTensorKit.sprand
— Methodsprand([rng], T::Type, W::TensorMapSumSpace, p::Real)
Construct a sparse blocktensor with entries compatible with type T
and space W
. Each entry is nonzero with probability p
.
BlockTensorKit.spzeros
— Methodspzeros(T::Type, W::TensorMapSumSpace)
spzeros(T, W, nonzero_inds)
Construct a sparse blocktensor with entries compatible with type T
and space W
. By default, the tensor will be empty, but nonzero entries can be specified by passing a tuple of indices nonzero_inds
.
BlockTensorKit.sumspacetype
— Methodsumspacetype(::Union{S,Type{S}}) where {S<:ElementarySpace}
Return the type of a SumSpace
with elements of type S
.