Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
uni20::DenseSpace Class Reference

Symmetry-neutral dense tensor space with one fixed extent. More...

#include <dense_space.hpp>

Public Member Functions

 DenseSpace (std::size_t extent, std::string label={})
 Construct a dense space.
 
auto empty () const -> bool
 Return whether the dense space has zero extent.
 
auto extent () const -> std::size_t
 Return the dense extent.
 
auto label () const -> std::string const &
 Return the semantic leg label.
 
auto operator== (DenseSpace const &other) const -> bool=default
 Compare dense extent and label.
 
void set_label (std::string label)
 Replace the semantic leg label without changing the extent.
 

Detailed Description

Symmetry-neutral dense tensor space with one fixed extent.

A dense leg bundles structurally identical symmetric tensors without contributing a quantum number to the block-selection rule.

Constructor & Destructor Documentation

◆ DenseSpace()

uni20::DenseSpace::DenseSpace ( std::size_t  extent,
std::string  label = {} 
)
inlineexplicit

Construct a dense space.

Parameters
extentNumber of dense entries; zero is permitted.
labelSemantic leg label.

Member Function Documentation

◆ empty()

auto uni20::DenseSpace::empty ( ) const -> bool
inline

Return whether the dense space has zero extent.

Returns
true when the extent is zero.

◆ extent()

auto uni20::DenseSpace::extent ( ) const -> std::size_t
inline

Return the dense extent.

Returns
Number of dense entries.

◆ label()

auto uni20::DenseSpace::label ( ) const -> std::string const&
inline

Return the semantic leg label.

Returns
Label, which may be empty.

◆ operator==()

auto uni20::DenseSpace::operator== ( DenseSpace const &  other) const -> bool=default
default

Compare dense extent and label.

Parameters
otherOther dense space.
Returns
true when extent and label are equal.

◆ set_label()

void uni20::DenseSpace::set_label ( std::string  label)
inline

Replace the semantic leg label without changing the extent.

Parameters
labelNew label.

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