24 #ifndef COM_DAFER45_TBTK_WRAPPER_RULE
25 #define COM_DAFER45_TBTK_WRAPPER_RULE
27 #include "TBTK/FockStateRule/FockStateRule.h"
30 namespace FockStateRule{
32 class WrapperRule :
public FockStateRule{
35 WrapperRule(
const FockStateRule &fockStateRule);
38 WrapperRule(
const WrapperRule &wrapperRule);
41 virtual ~WrapperRule();
44 virtual WrapperRule* clone()
const;
47 virtual WrapperRule createNewRule(
48 const LadderOperator<BitRegister> &ladderOperator
52 virtual WrapperRule createNewRule(
53 const LadderOperator<ExtensiveBitRegister> &ladderOperator
57 WrapperRule& operator=(
const WrapperRule &wrapperRule);
61 virtual bool isSatisfied(
62 const FockSpace<BitRegister> &fockSpace,
63 const FockState<BitRegister> &fockState
68 virtual bool isSatisfied(
69 const FockSpace<ExtensiveBitRegister> &fockSpace,
70 const FockState<ExtensiveBitRegister> &fockState
74 virtual bool operator==(
const FockStateRule &rhs)
const;
77 virtual void print()
const;
79 FockStateRule *fockStateRule;
82 inline WrapperRule WrapperRule::createNewRule(
83 const LadderOperator<BitRegister> &ladderOperator
85 return WrapperRule(fockStateRule->createNewRule(ladderOperator));
88 inline WrapperRule WrapperRule::createNewRule(
89 const LadderOperator<ExtensiveBitRegister> &ladderOperator
91 return WrapperRule(fockStateRule->createNewRule(ladderOperator));
94 inline void WrapperRule::print()
const{
95 fockStateRule->print();
100 const LadderOperator<BitRegister> &ladderOperator,
101 const FockStateRule &fockStateRule
103 return fockStateRule.createNewRule(ladderOperator);
108 const LadderOperator<ExtensiveBitRegister> &ladderOperator,
109 const FockStateRule &fockStateRule
111 return fockStateRule.createNewRule(ladderOperator);