#ifndef SPACEDIFF_HEADER #define SPACEDIFF_HEADER 1 ///////////////////////////////////////////////////// //! rcsid="$Id: SpaceDiff.hh,v 1.8 2000/08/17 15:18:09 ees1cg Exp $" //! file="amma/Logic/Learn/SpaceDiff.hh" //! lib=VLLearn //! author="Charles Galambos" //! date="26/10/98" //! docentry="Logic.Learn" #include "amma/Logic2/SpaceSet.hh" #include "amma/DList.hh" //////////////////////////////////////////////////// //: Find the difference between a set of spaces and a new space. //! userlevel=Develop. // This class attempts to find a difference which will distinguish // between VLSpaceSetC and VLSpaceC, this is returned. class VLSpaceDiffBodyC : public BodyRefCounterVC { public: VLSpaceDiffBodyC(); //: Default constructor. virtual DListC Apply(const VLSpaceSetC &set,const VLSpaceC &it); //: Find the difference between a set of spaces and another space. static VLSpaceSetC PosDecrimSet(VLSpaceSetC &exStates,const VLMinTermC &diff); //: Add all states 'diff' decriminates positively (is true in) to Result, //: count the number added. protected: BooleanT CheckDescrim(const VLSpaceSetC &set,const VLSpaceC &it,const VLSymbC &diff); //: Check the ability of diff to descriminate between 'set' and it. }; ////////////////////////////////////////////////////// //: Find the difference between a set of spaces and a new space. //! userlevel=Normal // This class attempts to find a difference which will distinguish // between VLSpaceSetC and VLSpaceC, this is returned. class VLSpaceDiffC : public RCHandleC { public: VLSpaceDiffC() {} //: Default constructor. VLSpaceDiffC(BooleanT x) : RCHandleC(*new VLSpaceDiffBodyC ()) {} //: Constructor. protected: VLSpaceDiffC(VLSpaceDiffBodyC &body) : RCHandleC(body) {} //: Body constructor. VLSpaceDiffBodyC &Body() { return RCHandleC::Body(); } //: Access body. const VLSpaceDiffBodyC &Body() const { return RCHandleC::Body(); } //: Access body. public: DListC Apply(const VLSpaceSetC &set,const VLSpaceC &it) { return Body().Apply(set,it); } //: Find the difference between a set of spaces and another space. }; #endif