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

Tensor space represented in an explicitly dual basis. More...

#include <dual_space.hpp>

Public Types

using base_space_type = SpaceType
 

Public Member Functions

auto base () const &noexcept -> base_space_type const &
 Return the underlying primal-basis space.
 
auto begin () const
 Return an iterator which dualizes each observed basis occurrence.
 
auto contains (QNum q) const -> bool
 Return whether the exposed dual basis contains an irrep.
 
 Dual (base_space_type space)
 Construct a dual adaptor from its primal-basis value.
 
auto empty () const -> bool
 Forward whether the underlying space is empty.
 
auto end () const
 Return the end iterator for dualized basis occurrences.
 
auto extent () const -> std::size_t
 Forward a symmetry-neutral dense extent.
 
auto label () const -> std::string const &
 Return the semantic leg label.
 
auto operator== (Dual const &other) const -> bool=default
 Compare explicit dual-basis space values.
 
auto operator[] (std::size_t index) const
 Return one dualized basis occurrence without changing its index.
 
auto qnum () const -> QNum
 Return the dual of a fixed irrep label.
 
auto qnums () const
 Return a lazy range of dualized local-state quantum numbers.
 
auto release_base () &&-> base_space_type
 Transfer the underlying primal-basis value out of this adaptor.
 
auto sectors () const
 Return a lazy range of dualized block sectors.
 
void set_label (std::string label)
 Replace the semantic leg label without changing the basis.
 
auto size () const -> std::size_t
 Forward the number of structural basis occurrences.
 
auto symmetry () const -> Symmetry
 Return the symmetry shared with the underlying space.
 
auto total_dim () const -> std::size_t
 Forward the total degeneracy dimension.
 

Detailed Description

template<class SpaceType>
class uni20::Dual< SpaceType >

Tensor space represented in an explicitly dual basis.

The adaptor preserves the underlying basis occurrence order, dimensions, and label. Quantum-number observations return the categorical dual without rebuilding or canonicalizing the space.

Template Parameters
SpaceTypeAdapted concrete space type.

Member Typedef Documentation

◆ base_space_type

template<class SpaceType >
using uni20::Dual< SpaceType >::base_space_type = SpaceType

Constructor & Destructor Documentation

◆ Dual()

template<class SpaceType >
uni20::Dual< SpaceType >::Dual ( base_space_type  space)
inlineexplicit

Construct a dual adaptor from its primal-basis value.

Parameters
spaceUnderlying space value whose occurrence order is retained.

Member Function Documentation

◆ base()

template<class SpaceType >
auto uni20::Dual< SpaceType >::base ( ) const & -> base_space_type const&
inlinenoexcept

Return the underlying primal-basis space.

◆ begin()

template<class SpaceType >
auto uni20::Dual< SpaceType >::begin ( ) const
inline

Return an iterator which dualizes each observed basis occurrence.

◆ contains()

template<class SpaceType >
auto uni20::Dual< SpaceType >::contains ( QNum  q) const -> bool
inline

Return whether the exposed dual basis contains an irrep.

Parameters
qQuantum number expressed in the dual basis.

◆ empty()

template<class SpaceType >
auto uni20::Dual< SpaceType >::empty ( ) const -> bool
inline

Forward whether the underlying space is empty.

◆ end()

template<class SpaceType >
auto uni20::Dual< SpaceType >::end ( ) const
inline

Return the end iterator for dualized basis occurrences.

◆ extent()

template<class SpaceType >
auto uni20::Dual< SpaceType >::extent ( ) const -> std::size_t
inline

Forward a symmetry-neutral dense extent.

◆ label()

template<class SpaceType >
auto uni20::Dual< SpaceType >::label ( ) const -> std::string const&
inline

Return the semantic leg label.

◆ operator==()

template<class SpaceType >
auto uni20::Dual< SpaceType >::operator== ( Dual< SpaceType > const &  other) const -> bool=default
default

Compare explicit dual-basis space values.

◆ operator[]()

template<class SpaceType >
auto uni20::Dual< SpaceType >::operator[] ( std::size_t  index) const
inline

Return one dualized basis occurrence without changing its index.

Parameters
indexZero-based occurrence index in the underlying space.

◆ qnum()

template<class SpaceType >
auto uni20::Dual< SpaceType >::qnum ( ) const -> QNum
inline

Return the dual of a fixed irrep label.

◆ qnums()

template<class SpaceType >
auto uni20::Dual< SpaceType >::qnums ( ) const
inline

Return a lazy range of dualized local-state quantum numbers.

◆ release_base()

template<class SpaceType >
auto uni20::Dual< SpaceType >::release_base ( ) && -> base_space_type
inline

Transfer the underlying primal-basis value out of this adaptor.

◆ sectors()

template<class SpaceType >
auto uni20::Dual< SpaceType >::sectors ( ) const
inline

Return a lazy range of dualized block sectors.

◆ set_label()

template<class SpaceType >
void uni20::Dual< SpaceType >::set_label ( std::string  label)
inline

Replace the semantic leg label without changing the basis.

Parameters
labelNew label.

◆ size()

template<class SpaceType >
auto uni20::Dual< SpaceType >::size ( ) const -> std::size_t
inline

Forward the number of structural basis occurrences.

◆ symmetry()

template<class SpaceType >
auto uni20::Dual< SpaceType >::symmetry ( ) const -> Symmetry
inline

Return the symmetry shared with the underlying space.

◆ total_dim()

template<class SpaceType >
auto uni20::Dual< SpaceType >::total_dim ( ) const -> std::size_t
inline

Forward the total degeneracy dimension.


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