31 template <std::
size_t I>
using space_type = std::tuple_element_t<I, tuple_type>;
39 static constexpr auto size() noexcept ->
std::
size_t {
return sizeof...(Spaces); }
43 static constexpr auto empty() noexcept ->
bool {
return sizeof...(Spaces) == 0; }
48 template <std::
size_t I>
constexpr auto space() const& noexcept ->
space_type<I> const&
50 return std::get<I>(spaces_);
60 template <std::
size_t I>
void set_label(std::string label) { std::get<I>(spaces_).set_label(std::move(label)); }
85 template <std::
size_t I>
using space_type = std::tuple_element_t<I, tuple_type>;
93 static constexpr auto size() noexcept ->
std::
size_t {
return sizeof...(Spaces); }
97 static constexpr auto empty() noexcept ->
bool {
return sizeof...(Spaces) == 0; }
102 template <std::
size_t I>
constexpr auto space() const& noexcept ->
space_type<I> const&
104 return std::get<I>(spaces_);
114 template <std::
size_t I>
void set_label(std::string label) { std::get<I>(spaces_).set_label(std::move(label)); }
Ordered codomain spaces of a tensor morphism.
Definition morphism_boundary.hpp:78
static constexpr auto size() noexcept -> std::size_t
Return the number of codomain factors.
Definition morphism_boundary.hpp:93
auto operator==(Codomain const &other) const -> bool=default
Compare ordered codomain spaces for exact equality.
void set_label(std::string label)
Replace one codomain leg label without changing its structure.
Definition morphism_boundary.hpp:114
Codomain(Spaces... spaces)
Construct a codomain from ordered space values.
Definition morphism_boundary.hpp:89
constexpr auto spaces() const &noexcept -> tuple_type const &
Return the ordered codomain-space tuple.
Definition morphism_boundary.hpp:109
constexpr auto space() const &noexcept -> space_type< I > const &
Return one codomain space by position.
Definition morphism_boundary.hpp:102
static constexpr auto empty() noexcept -> bool
Return whether the codomain is the tensor unit.
Definition morphism_boundary.hpp:97
std::tuple< Spaces... > tuple_type
Tuple containing the ordered codomain-space types.
Definition morphism_boundary.hpp:81
std::tuple_element_t< I, tuple_type > space_type
Type of one codomain space.
Definition morphism_boundary.hpp:85
Ordered domain spaces of a tensor morphism.
Definition morphism_boundary.hpp:24
auto operator==(Domain const &other) const -> bool=default
Compare ordered domain spaces for exact equality.
static constexpr auto size() noexcept -> std::size_t
Return the number of domain factors.
Definition morphism_boundary.hpp:39
static constexpr auto empty() noexcept -> bool
Return whether the domain is the tensor unit.
Definition morphism_boundary.hpp:43
constexpr auto space() const &noexcept -> space_type< I > const &
Return one domain space by position.
Definition morphism_boundary.hpp:48
Domain(Spaces... spaces)
Construct a domain from ordered space values.
Definition morphism_boundary.hpp:35
constexpr auto spaces() const &noexcept -> tuple_type const &
Return the ordered domain-space tuple.
Definition morphism_boundary.hpp:55
std::tuple_element_t< I, tuple_type > space_type
Type of one domain space.
Definition morphism_boundary.hpp:31
void set_label(std::string label)
Replace one domain leg label without changing its structure.
Definition morphism_boundary.hpp:60
std::tuple< Spaces... > tuple_type
Tuple containing the ordered domain-space types.
Definition morphism_boundary.hpp:27
Tensor-space value with a mutable semantic leg label.
Definition space.hpp:22
Definition async/async.hpp:26
Defines the common tensor-space concepts.