GQCP
|
#include <SpinResolvedBase.hpp>
Public Types | |
using | Of = _Of |
using | Derived = _Derived |
using | Self = SpinResolvedBase< Of, Derived > |
Public Member Functions | |
SpinResolvedBase (const Of &alpha, const Of &beta) | |
SpinResolvedBase (const std::vector< Of > &both) | |
SpinResolvedBase (const std::array< Of, 2 > &both) | |
SpinResolvedBase (const std::initializer_list< Of > &both) | |
const Of & | alpha () const |
Of & | alpha () |
const Of & | beta () const |
Of & | beta () |
const Of & | component (const Spin sigma) const |
Of & | component (const Spin sigma) |
Static Public Member Functions | |
static Derived | FromEqual (const Of &equal) |
A utility type encapsulating an alpha- and beta-type. In contrast to SpinResolved
, this type is to be used as a base class/interface for types that are spin-resolved.
_Of | The type of the alpha- and beta-objects. The name 'Of' is chosen for a natural reading SpinResolvedBase<_Of, _Derived> . |
_Derived | The type that derives from this type, given as a template argument, enabling CRTP and compile-time polymorphism. |
using GQCP::SpinResolvedBase< _Of, _Derived >::Derived = _Derived |
using GQCP::SpinResolvedBase< _Of, _Derived >::Of = _Of |
using GQCP::SpinResolvedBase< _Of, _Derived >::Self = SpinResolvedBase<Of, Derived> |
|
inline |
Construct a spin-resolved instance from its alpha and beta objects.
alpha | The alpha-object. |
beta | The beta-object. |
|
inline |
Construct a spin-resolved instance from a vector containing its alpha and beta objects.
both | A vector containing both alpha and beta objects (in that order). |
|
inline |
Construct a spin-resolved instance from an array containing its alpha and beta objects.
both | An array containing both alpha and beta objects (in that order). |
|
inline |
Construct a spin-resolved instance from an initializer list containing its alpha and beta objects.
both | An initializer list containing both alpha and beta objects (in that order). |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Access the alpha or beta component of this spin-resolved type.
sigma | Alpha or beta. |
|
inline |
Access the alpha or beta component of this spin-resolved instance.
sigma | Alpha or beta. |
|
inlinestatic |
Create a derived (spin-resolved) instance, from equal alpha and beta representations.
equal | The equal representation for both the alpha and beta objects. |