Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

IcePatternSet.hpp

Go to the documentation of this file.
00001 //----------------------------------------------------------------------------
00002 /** @file
00003  */
00004 //----------------------------------------------------------------------------
00005 
00006 #ifndef ICE_PATTERN_SET_HPP
00007 #define ICE_PATTERN_SET_HPP
00008 
00009 #include "Pattern.hpp"
00010 #include "HashedPatternSet.hpp"
00011 
00012 #include "boost/filesystem/path.hpp"
00013 
00014 _BEGIN_BENZENE_NAMESPACE_
00015 
00016 //----------------------------------------------------------------------------
00017 
00018 /** Collection of Patterns and HashedPatterns for use in ICE. */
00019 class IcePatternSet
00020 {
00021 public:
00022 
00023     /** Creates an empty set of patterns. */
00024     IcePatternSet();
00025 
00026     /** Destructor. */
00027     ~IcePatternSet();
00028 
00029     /** Loads the patterns from the given file. */
00030     void LoadPatterns(const boost::filesystem::path& file);
00031 
00032     /** @name Pattern Access Methods */
00033     // @{
00034     const HashedPatternSet& HashedDead() const;
00035     const HashedPatternSet& HashedCaptured(HexColor color) const;
00036     const HashedPatternSet& HashedPermInf(HexColor color) const;
00037     const HashedPatternSet& HashedMutualFillin(HexColor color) const;
00038     const HashedPatternSet& HashedVulnerable(HexColor color) const;
00039     const HashedPatternSet& HashedReversible(HexColor color) const;
00040     const HashedPatternSet& HashedDominated(HexColor color) const;
00041     // @}
00042 
00043 private:
00044 
00045     /** @name Patterns 
00046         Patterns for each type of Inferior cell. */
00047     // @{
00048     std::vector<Pattern> m_dead;  
00049     std::vector<Pattern> m_captured[BLACK_AND_WHITE];
00050     std::vector<Pattern> m_permanently_inferior[BLACK_AND_WHITE];
00051     std::vector<Pattern> m_mutual_fillin[BLACK_AND_WHITE];
00052     std::vector<Pattern> m_vulnerable[BLACK_AND_WHITE];
00053     std::vector<Pattern> m_reversible[BLACK_AND_WHITE];
00054     std::vector<Pattern> m_dominated[BLACK_AND_WHITE];
00055     // @}
00056 
00057     /** @name Hashed Paterns
00058         HashedPatternSets for each type of inferior cell. */
00059     // @{
00060     HashedPatternSet m_hashed_dead;
00061     HashedPatternSet m_hashed_captured[BLACK_AND_WHITE];
00062     HashedPatternSet m_hashed_permanently_inferior[BLACK_AND_WHITE];
00063     HashedPatternSet m_hashed_mutual_fillin[BLACK_AND_WHITE];
00064     HashedPatternSet m_hashed_vulnerable[BLACK_AND_WHITE];
00065     HashedPatternSet m_hashed_reversible[BLACK_AND_WHITE];
00066     HashedPatternSet m_hashed_dominated[BLACK_AND_WHITE];
00067     // @}
00068 };
00069 
00070 inline const HashedPatternSet& IcePatternSet::HashedDead() const
00071 {
00072     return m_hashed_dead;
00073 }
00074 
00075 inline const HashedPatternSet& 
00076 IcePatternSet::HashedCaptured(HexColor color) const
00077 {
00078     return m_hashed_captured[color];
00079 }
00080 
00081 inline const HashedPatternSet& 
00082 IcePatternSet::HashedPermInf(HexColor color) const
00083 {
00084     return m_hashed_permanently_inferior[color];
00085 }
00086 
00087 inline const HashedPatternSet& 
00088 IcePatternSet::HashedMutualFillin(HexColor color) const
00089 {
00090     return m_hashed_mutual_fillin[color];
00091 }
00092 
00093 inline const HashedPatternSet& 
00094 IcePatternSet::HashedVulnerable(HexColor color) const
00095 {
00096     return m_hashed_vulnerable[color];
00097 }
00098 
00099 inline const HashedPatternSet& 
00100 IcePatternSet::HashedReversible(HexColor color) const
00101 {
00102     return m_hashed_reversible[color];
00103 }
00104 
00105 inline const HashedPatternSet& 
00106 IcePatternSet::HashedDominated(HexColor color) const
00107 {
00108     return m_hashed_dominated[color];
00109 }
00110 
00111 //----------------------------------------------------------------------------
00112 
00113 _END_BENZENE_NAMESPACE_
00114 
00115 #endif // ICE_PATTERN_SET_HPP


6 Jan 2011 Doxygen 1.6.3