Skip to content

Commit e53d9c4

Browse files
committed
add docstring to unitspace
1 parent bfcacdf commit e53d9c4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/spaces/gradedspace.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,13 @@ function rightunitspace(S::GradedSpace{I}) where {I<:Sector}
170170
end
171171
end
172172

173+
"""
174+
unitspace(S::GradedSpace{I}) where {I<:Sector} -> GradedSpace{I}
175+
176+
Return the corresponding vector space of type `GradedSpace{I}` that represents the
177+
space consisting of the unit(s) of the objects in `Sector` `I`. For `I` with simple unit,
178+
this is a one-dimensional space.
179+
"""
173180
function unitspace(S::Type{<:GradedSpace{I}}) where {I<:Sector}
174181
return S(unit => 1 for unit in allunits(I))
175182
end

0 commit comments

Comments
 (0)