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

#include <HilbertSpace.hpp>

Inheritance diagram for ManyBodyBosonSpace:
Inheritance graph
Collaboration diagram for ManyBodyBosonSpace:
Collaboration graph

Public Types

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

Public Member Functions

__host__ __device__ ManyBodyBosonSpace (int systemSize=0, int nBosons=0)
 Default constructor.
 
__host__ __device__ ManyBodyBosonSpace (int systemSize, int nBosons, int max)
 
- Public Member Functions inherited from ManyBodySpaceBase< ManyBodyBosonSpace >
__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__ ManyBodyBosonSpaceoperator= (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__ ManyBodyBosonSpace 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

IntegerComposition m_iComp
 
friend HilbertSpace< ManyBodyBosonSpace >
 
friend ManyBodySpaceBase< ManyBodyBosonSpace >
 

Additional Inherited Members

- Protected Types inherited from ManyBodySpaceBase< ManyBodyBosonSpace >
using Vector_t = Eigen::VectorX< int >
 
- Protected Attributes inherited from ManyBodySpaceBase< ManyBodyBosonSpace >
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

◆ ManyBodyBosonSpace() [1/2]

__host__ __device__ ManyBodyBosonSpace::ManyBodyBosonSpace ( int  systemSize = 0,
int  nBosons = 0 
)
inline

Default constructor.

Parameters
systemSize
locSpace
Returns
host
521 : Base(systemSize, LocalSpace(nBosons + 1)), m_iComp(nBosons, systemSize, nBosons) {
522 debug_constructor_printf((Default));
523 }
typename HilbertSpaceTraits< ManyBodyBosonSpace >::LocalSpace LocalSpace
Definition HilbertSpace.hpp:512
IntegerComposition m_iComp
Definition HilbertSpace.hpp:508
ManyBodySpaceBase< ManyBodyBosonSpace > Base
Definition HilbertSpace.hpp:511

◆ ManyBodyBosonSpace() [2/2]

__host__ __device__ ManyBodyBosonSpace::ManyBodyBosonSpace ( int  systemSize,
int  nBosons,
int  max 
)
inline
525 : Base(systemSize, LocalSpace(max + 1)), m_iComp(nBosons, systemSize, max) {
526 debug_constructor_printf(1);
527 }

Member Function Documentation

◆ configToOrdinal_impl()

template<class EigenDerived >
__host__ __device__ int ManyBodyBosonSpace::configToOrdinal_impl ( Eigen::DenseBase< EigenDerived > &  config) const
inlineprivate
544 {
545 return m_iComp.partToOrdinal(config);
546 }
__host__ __device__ Index_t partToOrdinal(Vector_t const &vec) const
Converts an composition of the integer N from a vector form to an ordinal number.
Definition IntegerComposition.hpp:209

◆ dim_impl()

__host__ __device__ int ManyBodyBosonSpace::dim_impl ( ) const
inlineprivate
531{ return m_iComp.dim(); }
__host__ __device__ Index_t dim() const
Definition IntegerComposition.hpp:90

◆ locState_impl()

__host__ __device__ int ManyBodyBosonSpace::locState_impl ( int  state,
int  pos 
) const
inlineprivate
534 {
535 return m_iComp.locNumber(state, pos);
536 }
__host__ __device__ int locNumber(Index_ const num, Index_ const pos) const
Definition IntegerComposition.hpp:253

◆ ordinalToConfig_impl()

__host__ __device__ Eigen::RowVectorXi ManyBodyBosonSpace::ordinalToConfig_impl ( int  basisNum) const
inlineprivate
538 {
539 Eigen::RowVectorXi res;
540 m_iComp.ordinalToPart(res, basisNum);
541 return res;
542 }
__host__ __device__ void ordinalToPart(Vector_t &vec, Index_t const num) const
Converts an ordinal number of a composition of the integer N to a vector form.
Definition IntegerComposition.hpp:225

◆ reverse_impl()

__host__ __device__ int ManyBodyBosonSpace::reverse_impl ( int  state) const
inlineprivate
557 {
558 Eigen::ArrayXi config1(this->sysSize());
559 m_iComp.ordinalToPart(config1, state);
560 Eigen::ArrayXi config2(this->sysSize());
561 for(int pos = 0; pos != this->sysSize(); ++pos)
562 config2[pos] = config1[this->sysSize() - 1 - pos];
563 return m_iComp.partToOrdinal(config2);
564 }
__host__ __device__ int sysSize() const
Definition HilbertSpace.hpp:265

◆ translate_impl() [1/2]

__host__ __device__ int ManyBodyBosonSpace::translate_impl ( int  state,
int  trans 
) const
inlineprivate
548 {
549 return m_iComp.translate(state, trans);
550 }
__host__ __device__ Index_t translate(Index_t const num, int trans, Vector_t &workSpace) const
Definition IntegerComposition.hpp:283

◆ translate_impl() [2/2]

template<class EigenDerived >
__host__ __device__ int ManyBodyBosonSpace::translate_impl ( int  state,
int  trans,
Eigen::DenseBase< EigenDerived > &   
) const
inlineprivate
553 {
554 return this->translate_impl(state, trans);
555 }
__host__ __device__ int translate_impl(int state, int trans) const
Definition HilbertSpace.hpp:548

Member Data Documentation

◆ HilbertSpace< ManyBodyBosonSpace >

friend ManyBodyBosonSpace::HilbertSpace< ManyBodyBosonSpace >
private

◆ m_iComp

IntegerComposition ManyBodyBosonSpace::m_iComp
private

◆ ManyBodySpaceBase< ManyBodyBosonSpace >


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