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

Value-level quantum number type representing one U(1) irrep. More...

#include <u1.hpp>

Public Member Functions

constexpr auto operator<=> (U1 const &other) const =default
 Compare two U(1) irreps by charge.
 
constexpr U1 ()=default
 Construct the scalar U(1) irrep.
 
constexpr U1 (half_int value)
 Construct from a half-integer U(1) charge.
 
template<std::integral T>
constexpr U1 (T value)
 Construct from an integral U(1) charge.
 
template<std::floating_point T>
 U1 (T value)
 Construct from a floating-point U(1) charge by rounding to the nearest half-integer.
 
constexpr auto value () const -> half_int
 Return the stored U(1) charge.
 

Detailed Description

Value-level quantum number type representing one U(1) irrep.

U1 is the first concrete value-level factor type in the symmetry system.

Constructor & Destructor Documentation

◆ U1() [1/4]

constexpr uni20::U1::U1 ( )
constexprdefault

Construct the scalar U(1) irrep.

◆ U1() [2/4]

constexpr uni20::U1::U1 ( half_int  value)
inlineexplicitconstexpr

Construct from a half-integer U(1) charge.

Parameters
valueU(1) charge to store.

◆ U1() [3/4]

template<std::integral T>
constexpr uni20::U1::U1 ( T  value)
inlineconstexpr

Construct from an integral U(1) charge.

Parameters
valueIntegral U(1) charge.

◆ U1() [4/4]

template<std::floating_point T>
uni20::U1::U1 ( T  value)
inlineexplicit

Construct from a floating-point U(1) charge by rounding to the nearest half-integer.

Parameters
valueFloating-point U(1) charge.

Member Function Documentation

◆ operator<=>()

constexpr auto uni20::U1::operator<=> ( U1 const &  other) const
constexprdefault

Compare two U(1) irreps by charge.

Parameters
otherOther U(1) irrep.
Returns
Comparison result of the stored charges.

◆ value()

constexpr auto uni20::U1::value ( ) const -> half_int
inlineconstexpr

Return the stored U(1) charge.

Returns
Half-integer U(1) charge.

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