24 #ifndef COM_DAFER45_TBTK_FOCK_STATE_RULE_SET
25 #define COM_DAFER45_TBTK_FOCK_STATE_RULE_SET
27 #include "TBTK/FockStateRule/FockStateRule.h"
28 #include "TBTK/FockStateRule/WrapperRule.h"
34 class FockStateRuleSet{
45 const FockSpace<BitRegister> &fockSpace,
46 const FockState<BitRegister> &fockState
52 const FockSpace<ExtensiveBitRegister> &fockSpace,
53 const FockState<ExtensiveBitRegister> &fockState
57 void addFockStateRule(
const FockStateRule::WrapperRule &fockStateRule);
60 unsigned int getSize()
const;
63 bool operator==(
const FockStateRuleSet &rhs)
const;
70 const LadderOperator<BitRegister> &ladderOperator,
71 const FockStateRuleSet &fockStateRuleSet
79 const LadderOperator<ExtensiveBitRegister> &ladderOperator,
80 const FockStateRuleSet &fockStateRuleSet
87 std::vector<FockStateRule::WrapperRule> fockStateRules;
90 inline void FockStateRuleSet::addFockStateRule(
91 const FockStateRule::WrapperRule &fockStateRule
93 for(
unsigned int n = 0; n < fockStateRules.size(); n++)
94 if(fockStateRules.at(n) == fockStateRule)
97 fockStateRules.push_back(fockStateRule);
100 inline unsigned int FockStateRuleSet::getSize()
const{
101 return fockStateRules.size();
105 const LadderOperator<BitRegister> &ladderOperator,
106 const FockStateRuleSet &fockStateRuleSet
108 FockStateRuleSet newRuleSet;
109 for(
unsigned int n = 0; n < fockStateRuleSet.fockStateRules.size(); n++)
110 newRuleSet.addFockStateRule(ladderOperator*fockStateRuleSet.fockStateRules.at(n));
116 const LadderOperator<ExtensiveBitRegister> &ladderOperator,
117 const FockStateRuleSet &fockStateRuleSet
119 FockStateRuleSet newRuleSet;
120 for(
unsigned int n = 0; n < fockStateRuleSet.fockStateRules.size(); n++)
121 newRuleSet.addFockStateRule(ladderOperator*fockStateRuleSet.fockStateRules.at(n));
126 inline void FockStateRuleSet::print()
const{
128 for(
unsigned int n = 0; n < fockStateRules.size(); n++){
132 fockStateRules.at(n).print();