Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
uni20::Codomain< Spaces > Class Template Reference

Ordered codomain spaces of a tensor morphism. More...

#include <morphism_boundary.hpp>

Public Types

template<std::size_t I>
using space_type = std::tuple_element_t< I, tuple_type >
 Type of one codomain space.
 
using tuple_type = std::tuple< Spaces... >
 Tuple containing the ordered codomain-space types.
 

Public Member Functions

 Codomain (Spaces... spaces)
 Construct a codomain from ordered space values.
 
auto operator== (Codomain const &other) const -> bool=default
 Compare ordered codomain spaces for exact equality.
 
template<std::size_t I>
void set_label (std::string label)
 Replace one codomain leg label without changing its structure.
 
template<std::size_t I>
constexpr auto space () const &noexcept -> space_type< I > const &
 Return one codomain space by position.
 
constexpr auto spaces () const &noexcept -> tuple_type const &
 Return the ordered codomain-space tuple.
 

Static Public Member Functions

static constexpr auto empty () noexcept -> bool
 Return whether the codomain is the tensor unit.
 
static constexpr auto size () noexcept -> std::size_t
 Return the number of codomain factors.
 

Detailed Description

template<Space... Spaces>
class uni20::Codomain< Spaces >

Ordered codomain spaces of a tensor morphism.

Space structure is exposed read-only. Leg labels may be changed explicitly with set_label<I>().

Template Parameters
SpacesConcrete space value types in codomain order.

Member Typedef Documentation

◆ space_type

template<Space... Spaces>
template<std::size_t I>
using uni20::Codomain< Spaces >::space_type = std::tuple_element_t<I, tuple_type>

Type of one codomain space.

Template Parameters
IZero-based position in the codomain.

◆ tuple_type

template<Space... Spaces>
using uni20::Codomain< Spaces >::tuple_type = std::tuple<Spaces...>

Tuple containing the ordered codomain-space types.

Constructor & Destructor Documentation

◆ Codomain()

template<Space... Spaces>
uni20::Codomain< Spaces >::Codomain ( Spaces...  spaces)
inlineexplicit

Construct a codomain from ordered space values.

Parameters
spacesSpace values in codomain order.

Member Function Documentation

◆ empty()

template<Space... Spaces>
static constexpr auto uni20::Codomain< Spaces >::empty ( ) -> bool
inlinestaticconstexprnoexcept

Return whether the codomain is the tensor unit.

Returns
true when the codomain contains no factors.

◆ operator==()

template<Space... Spaces>
auto uni20::Codomain< Spaces >::operator== ( Codomain< Spaces > const &  other) const -> bool=default
default

Compare ordered codomain spaces for exact equality.

Parameters
otherOther codomain value.
Returns
true when all space structures and labels are equal.

◆ set_label()

template<Space... Spaces>
template<std::size_t I>
void uni20::Codomain< Spaces >::set_label ( std::string  label)
inline

Replace one codomain leg label without changing its structure.

Template Parameters
IZero-based position in the codomain.
Parameters
labelNew semantic leg label.

◆ size()

template<Space... Spaces>
static constexpr auto uni20::Codomain< Spaces >::size ( ) -> std::size_t
inlinestaticconstexprnoexcept

Return the number of codomain factors.

Returns
Compile-time codomain size.

◆ space()

template<Space... Spaces>
template<std::size_t I>
constexpr auto uni20::Codomain< Spaces >::space ( ) const & -> space_type<I> const&
inlineconstexprnoexcept

Return one codomain space by position.

Template Parameters
IZero-based position in the codomain.
Returns
Read-only space value.

◆ spaces()

template<Space... Spaces>
constexpr auto uni20::Codomain< Spaces >::spaces ( ) const & -> tuple_type const&
inlineconstexprnoexcept

Return the ordered codomain-space tuple.

Returns
Read-only tuple of space values.

The documentation for this class was generated from the following file: