@@ -87,14 +87,11 @@ const _Tensor{T, A <: DenseVector{T}, S, N} = Tensor{T, S, N, A}
8787# - select A and map to _TensorMap{T, A}
8888# - select S, N1, N2 and map to TensorMap{T,S,N1,N2,A}
8989"""
90- TensorMap{T}(undef, codomain::ProductSpace{S,N₁}, domain::ProductSpace{S,N₂}) where {T,S, N₁,N₂}
90+ TensorMap{T}(undef, codomain::ProductSpace{S, N₁}, domain::ProductSpace{S, N₂}) where {T, S, N₁, N₂}
9191 TensorMap{T}(undef, codomain ← domain)
9292 TensorMap{T}(undef, domain → codomain)
93- # expert mode: select storage type `A`
94- TensorMap{T,S,N₁,N₂,A}(undef, codomain ← domain)
95- TensorMap{T,S,N₁,N₂,A}(undef, domain → domain)
9693
97- Construct a `TensorMap` with uninitialized data.
94+ Construct a `TensorMap` with uninitialized data with elements of type `T` .
9895"""
9996TensorMap {T} (:: UndefInitializer , V:: TensorMapSpace ) where {T} =
10097 _TensorMap {T, _tensormap_storagetype(T)} (undef, V)
@@ -103,6 +100,13 @@ TensorMap{T}(::UndefInitializer, codomain::TensorSpace, domain::TensorSpace) whe
103100Tensor {T} (:: UndefInitializer , V:: TensorSpace ) where {T} = TensorMap {T} (undef, V ← one (V))
104101
105102# specifying storagetype, fill in other parameters
103+ """
104+ (TensorMap{T, S, N₁, N₂, A} where {S, N₁, N₂})(undef, codomain, domain) where {T, A}
105+ (TensorMap{T, S, N₁, N₂, A} where {S, N₁, N₂})(undef, codomain ← domain) where {T, A}
106+ (TensorMap{T, S, N₁, N₂, A} where {S, N₁, N₂})(undef, domain → codomain) where {T, A}
107+
108+ Construct a `TensorMap` with uninitialized data stored as `A <: DenseVector{T}`.
109+ """
106110_TensorMap {T, A} (:: UndefInitializer , V:: TensorMapSpace ) where {T, A} =
107111 TensorMap {T, spacetype(V), numout(V), numin(V), A} (undef, V)
108112_TensorMap {T, A} (:: UndefInitializer , codomain:: TensorSpace , domain:: TensorSpace ) where {T, A} =
@@ -126,20 +130,19 @@ _TensorMap{T, A}(data::DenseVector{T}, codomain::TensorSpace, domain::TensorSpac
126130const _BlockData{I <: Sector , A <: AbstractMatrix } = AbstractDict{I, A}
127131
128132"""
129- TensorMap(data::AbstractDict{<:Sector,<:AbstractMatrix}, codomain::ProductSpace{S,N₁},
130- domain::ProductSpace{S,N₂}) where {S<:ElementarySpace,N₁,N₂}
133+ TensorMap(data::AbstractDict{<:Sector, <:AbstractMatrix}, codomain::ProductSpace, domain::ProductSpace)
131134 TensorMap(data, codomain ← domain)
132135 TensorMap(data, domain → codomain)
133136
134137Construct a `TensorMap` by explicitly specifying its block data.
135138
136139## Arguments
137- - `data::AbstractDict{<:Sector,<:AbstractMatrix}`: dictionary containing the block data for
140+ - `data::AbstractDict{<:Sector, <:AbstractMatrix}`: dictionary containing the block data for
138141 each coupled sector `c` as a matrix of size `(blockdim(codomain, c), blockdim(domain, c))`.
139- - `codomain::ProductSpace{S,N₁}`: the codomain as a `ProductSpace` of `N₁` spaces of type
140- `S<: ElementarySpace`.
141- - `domain::ProductSpace{S,N₂}`: the domain as a `ProductSpace` of `N₂` spaces of type
142- `S<: ElementarySpace`.
142+ - `codomain::ProductSpace{S, N₁}`: the codomain as a `ProductSpace` of `N₁` spaces of type
143+ `S <: ElementarySpace`.
144+ - `domain::ProductSpace{S, N₂}`: the domain as a `ProductSpace` of `N₂` spaces of type
145+ `S <: ElementarySpace`.
143146
144147Alternatively, the domain and codomain can be specified by passing a [`HomSpace`](@ref)
145148using the syntax `codomain ← domain` or `domain → codomain`.
0 commit comments