StatMech
Loading...
Searching...
No Matches
ManyBodySpinSpace Class Reference

#include <HilbertSpace.hpp>

Inheritance diagram for ManyBodySpinSpace:
Inheritance graph
Collaboration diagram for ManyBodySpinSpace:
Collaboration graph

Public Types

using Base = ManyBodySpaceBase< ManyBodySpinSpace >
 
using LocalSpace = typename HilbertSpaceTraits< ManyBodySpinSpace >::LocalSpace
 

Public Member Functions

__host__ __device__ ManyBodySpinSpace (int systemSize, LocalSpace const &locSpace)
 Constructor1.
 
__host__ __device__ ManyBodySpinSpace (int systemSize, LocalSpace &&locSpace)
 Constructor2.
 
__host__ __device__ ManyBodySpinSpace (int systemSize=0, int dimLoc=0)
 Default constructor.
 
- Public Member Functions inherited from ManyBodySpaceBase< ManyBodySpinSpace >
__host__ __device__ ManyBodySpaceBase (int systemSize, LocSpace_t const &locSpace)
 Constructor1.
 
__host__ __device__ ManyBodySpaceBase (int systemSize, LocSpace_t &&locSpace)
 Constructor2.
 
__host__ __device__ ManyBodySpaceBase (int systemSize, Args... args)
 Constructor3.
 
__host__ __device__ ManyBodySpaceBase ()=default
 Default constructor.
 
__host__ __device__ ManyBodySpaceBase (ManyBodySpaceBase const &other)
 Copy constructor.
 
__host__ __device__ ManyBodySpaceBase (ManyBodySpaceBase &&other)
 Move constructor.
 
__host__ __device__ ~ManyBodySpaceBase ()=default
 Destructor.
 
__host__ __device__ ManyBodySpaceBaseoperator= (ManyBodySpaceBase const &other)=delete
 Copy assignment operator (deleted)
 
__host__ __device__ ManyBodySpinSpaceoperator= (ManyBodySpaceBase &&other)
 Move assignment operator.
 
__host__ __device__ bool operator== (ManyBodySpaceBase const &other) const
 Equality operator.
 
__host__ __device__ LocSpace_t const & locSpace () const
 
__host__ __device__ int sysSize () const
 
__host__ __device__ int dimLoc () const
 
__host__ __device__ int locState (int state, int pos) const
 
__host__ ManyBodySpinSpace const & printInString (int basisNum) const
 Print a basis state specified by the input (basisNum) in a string of integers.
 
__host__ __device__ Eigen::RowVectorXi ordinalToConfig (int basisNum) const
 
__host__ __device__ int configToOrdinal (Eigen::DenseBase< EigenDerived > &config) const
 
__host__ __device__ int reverse (int state) const
 Reverse the input state.
 
__host__ __device__ Vector_t const & parityPair () const
 
__host__ __device__ int parityPair (int state) const
 
__host__ __device__ void computeParityPair () const
 
__host__ __device__ int translate (int state, int trans) const
 Translate the input state to the left by one.
 
__host__ __device__ int translate (int state, int trans, Eigen::DenseBase< EigenDerived > &work) const
 
__host__ __device__ int transEqDim () const
 
__host__ __device__ Vector_t const & transEqClassRep () const
 
__host__ __device__ int transEqClassRep (int id) const
 
__host__ __device__ int transEqClassRep (int id, int trans) const
 
__host__ __device__ Vector_t const & transPeriod () const
 
__host__ __device__ int transPeriod (int id) const
 
__host__ __device__ Vector_t const & stateToTransEqClass () const
 
__host__ __device__ int stateToTransEqClass (int state) const
 
__host__ __device__ int stateToTransPeriod (int state) const
 
__host__ __device__ void computeTransEqClass () const
 
- Public Member Functions inherited from HilbertSpace< Derived >
__host__ __device__ int dim () const
 
__host__ __device__ bool operator== (HilbertSpace const &other) const
 

Private Member Functions

__host__ __device__ int dim_impl () const
 
__host__ __device__ int locState_impl (int state, int pos) const
 
__host__ __device__ Eigen::RowVectorXi ordinalToConfig_impl (int basisNum) const
 
template<class EigenDerived >
__host__ __device__ int configToOrdinal_impl (Eigen::DenseBase< EigenDerived > &config) const
 
__host__ __device__ int translate_impl (int state, int trans) const
 
template<class EigenDerived >
__host__ __device__ int translate_impl (int state, int trans, Eigen::DenseBase< EigenDerived > &) const
 
__host__ __device__ int reverse_impl (int state) const
 

Private Attributes

BaseConverter< int > m_bConv
 
friend HilbertSpace< ManyBodySpinSpace >
 
friend ManyBodySpaceBase< ManyBodySpinSpace >
 

Additional Inherited Members

- Protected Types inherited from ManyBodySpaceBase< ManyBodySpinSpace >
using Vector_t = Eigen::VectorX< int >
 
- Protected Attributes inherited from ManyBodySpaceBase< ManyBodySpinSpace >
int m_systemSize
 
LocSpace_t m_locSpace
 
int m_transEqDim
 
Vector_t m_transEqClassRep
 
Vector_t m_transPeriod
 
Vector_t m_stateToTransEqClass
 
Vector_t m_parityPair
 

Member Typedef Documentation

◆ Base

◆ LocalSpace

Constructor & Destructor Documentation

◆ ManyBodySpinSpace() [1/3]

__host__ __device__ ManyBodySpinSpace::ManyBodySpinSpace ( int  systemSize,
LocalSpace const &  locSpace 
)
inline

Constructor1.

Parameters
systemSize
locSpace
Returns
host
438 : Base(systemSize, locSpace), m_bConv(locSpace.dim(), systemSize) {
439 debug_constructor_printf(1);
440 }
__host__ __device__ LocSpace_t const & locSpace() const
Definition HilbertSpace.hpp:264
BaseConverter< int > m_bConv
Definition HilbertSpace.hpp:425
ManyBodySpaceBase< ManyBodySpinSpace > Base
Definition HilbertSpace.hpp:428

◆ ManyBodySpinSpace() [2/3]

__host__ __device__ ManyBodySpinSpace::ManyBodySpinSpace ( int  systemSize,
LocalSpace &&  locSpace 
)
inline

Constructor2.

Parameters
systemSize
locSpace
Returns
host
449 : Base(systemSize, std::move(locSpace)), m_bConv(locSpace.dim(), systemSize) {
450 debug_constructor_printf(2);
451 }

◆ ManyBodySpinSpace() [3/3]

__host__ __device__ ManyBodySpinSpace::ManyBodySpinSpace ( int  systemSize = 0,
int  dimLoc = 0 
)
inline

Default constructor.

Parameters
systemSize
locSpace
Returns
host
460 : Base(systemSize, LocalSpace(dimLoc)), m_bConv(dimLoc, systemSize) {
461 debug_constructor_printf((Default));
462 }
__host__ __device__ int dimLoc() const
Definition HilbertSpace.hpp:266
typename HilbertSpaceTraits< ManyBodySpinSpace >::LocalSpace LocalSpace
Definition HilbertSpace.hpp:429

Member Function Documentation

◆ configToOrdinal_impl()

template<class EigenDerived >
__host__ __device__ int ManyBodySpinSpace::configToOrdinal_impl ( Eigen::DenseBase< EigenDerived > &  config) const
inlineprivate
479 {
480 return m_bConv.digitsToNumber(config);
481 }
__host__ __device__ Integer digitsToNumber(Input const &digits, Integer const base, Integer const length) const
Converts an array of integers to the corresponding integer in terms of the positional notation with g...
Definition BaseNnumber.hpp:166

◆ dim_impl()

__host__ __device__ int ManyBodySpinSpace::dim_impl ( ) const
inlineprivate
466{ return m_bConv.maxVal(); }
__host__ __device__ Integer maxVal() const
Definition BaseNnumber.hpp:57

◆ locState_impl()

__host__ __device__ int ManyBodySpinSpace::locState_impl ( int  state,
int  pos 
) const
inlineprivate
469 {
470 return m_bConv.digit(state, pos);
471 }
__host__ __device__ Integer digit(Integer const num, Integer const pos, Integer const base, Integer const length) const
Returns the (pos)-th digit of the input (num) in given base and length.
Definition BaseNnumber.hpp:113

◆ ordinalToConfig_impl()

__host__ __device__ Eigen::RowVectorXi ManyBodySpinSpace::ordinalToConfig_impl ( int  basisNum) const
inlineprivate
473 {
474 Eigen::RowVectorXi res;
475 m_bConv.printInDigits(res, basisNum);
476 return res;
477 }
__host__ __device__ auto printInDigits(Output &output, Integer const num, Integer const base, Integer const length) const -> typename std::enable_if< std::is_integral< Output >::value==false, BaseConverter const & >::type
Expresses an integer (num) in the positional notation with given (base) and (length)
Definition BaseNnumber.hpp:191

◆ reverse_impl()

__host__ __device__ int ManyBodySpinSpace::reverse_impl ( int  state) const
inlineprivate
492 {
493 int res = 0, base = 1;
494 for(int pos = 0; pos != this->sysSize(); ++pos, base *= this->dimLoc()) {
495 res += base * this->locState(state, this->sysSize() - 1 - pos);
496 }
497 return res;
498 }
__host__ __device__ int locState(int state, int pos) const
Definition HilbertSpace.hpp:267
__host__ __device__ int sysSize() const
Definition HilbertSpace.hpp:265

◆ translate_impl() [1/2]

__host__ __device__ int ManyBodySpinSpace::translate_impl ( int  state,
int  trans 
) const
inlineprivate
483 {
484 return m_bConv.shiftDigits(state, trans);
485 }
__host__ __device__ Integer shiftDigits(Integer const num, Integer const trans, Integer const base, Integer const length) const
Shifts a number (num) to right by (trans) in terms of the positional notation with given base and len...
Definition BaseNnumber.hpp:139

◆ translate_impl() [2/2]

template<class EigenDerived >
__host__ __device__ int ManyBodySpinSpace::translate_impl ( int  state,
int  trans,
Eigen::DenseBase< EigenDerived > &   
) const
inlineprivate
488 {
489 return this->translate_impl(state, trans);
490 }
__host__ __device__ int translate_impl(int state, int trans) const
Definition HilbertSpace.hpp:483

Member Data Documentation

◆ HilbertSpace< ManyBodySpinSpace >

friend ManyBodySpinSpace::HilbertSpace< ManyBodySpinSpace >
private

◆ m_bConv

BaseConverter<int> ManyBodySpinSpace::m_bConv
private

◆ ManyBodySpaceBase< ManyBodySpinSpace >


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