25 #ifndef COM_DAFER45_TBTK_MANY_PARTICLE_CONTEXT
26 #define COM_DAFER45_TBTK_MANY_PARTICLE_CONTEXT
30 #include "TBTK/FockSpace.h"
31 #include "TBTK/FockStateRuleSet.h"
32 #include "TBTK/InteractionAmplitudeSet.h"
39 class ManyParticleContext{
42 ManyParticleContext();
48 const SingleParticleContext *singleParticleContext
56 ~ManyParticleContext();
59 bool wrapsBitRegister();
63 bool wrapsExtensiveBitRegister();
67 FockSpace<BitRegister>* getFockSpaceBitRegister();
71 FockSpace<ExtensiveBitRegister>* getFockSpaceExtensiveBitRegister();
74 void addFockStateRule(
const FockStateRule::WrapperRule rule);
77 void addIA(InteractionAmplitude ia);
80 const InteractionAmplitudeSet* getInteractionAmplitudeSet()
const;
83 const FockStateRuleSet& getFockStateRuleSet()
const;
86 std::shared_ptr<FockSpace<BitRegister>> brFockSpace;
89 std::shared_ptr<FockSpace<ExtensiveBitRegister>> ebrFockSpace;
93 FockStateRuleSet fockStateRuleSet;
96 std::shared_ptr<InteractionAmplitudeSet> interactionAmplitudeSet;
99 inline bool ManyParticleContext::wrapsBitRegister(){
100 if(brFockSpace.get() != NULL)
106 inline bool ManyParticleContext::wrapsExtensiveBitRegister(){
107 if(ebrFockSpace.get() != NULL)
113 inline FockSpace<BitRegister>* ManyParticleContext::getFockSpaceBitRegister(){
116 "ManyParticleContext::getFockSpaceBitRegister()",
117 "Use ManyParticleContext::getFockSpaceExtensiveBitRegister()"
121 return brFockSpace.get();
124 inline FockSpace<ExtensiveBitRegister>* ManyParticleContext::getFockSpaceExtensiveBitRegister(){
126 wrapsExtensiveBitRegister(),
127 "ManyParticleContext::getFockSpaceExtensiveBitRegister()",
128 "Use ManyParticleContext::getFockSpaceBitRegister()"
132 return ebrFockSpace.get();
135 inline void ManyParticleContext::addFockStateRule(
const FockStateRule::WrapperRule rule){
136 fockStateRuleSet.addFockStateRule(rule);
139 inline void ManyParticleContext::addIA(InteractionAmplitude ia){
140 interactionAmplitudeSet.get()->addIA(ia);
143 inline const InteractionAmplitudeSet* ManyParticleContext::getInteractionAmplitudeSet()
const{
144 return interactionAmplitudeSet.get();
147 inline const FockStateRuleSet& ManyParticleContext::getFockStateRuleSet()
const{
148 return fockStateRuleSet;