Generated on Tue Dec 16 13:34:01 2008 for ell-3.0.0 by doxygen 1.5.1

src/ell/LT_SaddleNet.hh

Go to the documentation of this file.
00001 #ifndef LT_SADDLENET_HH_
00002 #define LT_SADDLENET_HH_
00003 
00004 
00005 #include "ell/LandscapeTopology.hh"
00006 
00007 namespace ell {
00008 
00021     class LT_SaddleNet : public LandscapeTopology {
00022         
00023     public:
00024         
00026         static const std::string LT_ID;
00027         
00028         
00034         static double MISSING_SADDLE_PENALTY;
00035         
00036         virtual 
00037         ~LT_SaddleNet();
00038         
00039 
00053         virtual 
00054         double 
00055         getDistance(const LandscapeTopology* const lt) const;
00056 
00057         
00059         
00060         
00066         virtual
00067         bool
00068         isSaddle( const size_t m1, const size_t m2 ) const = 0;
00069         
00070         
00076         virtual
00077         const State*
00078         getSaddle( const size_t m1, const size_t m2 ) const = 0;
00079         
00080     
00085         virtual
00086         double
00087         getAvgSaddleEnergy( void ) const = 0;
00088         
00093         virtual
00094         size_t
00095         getSaddleNumber( void ) const = 0;
00096         
00097     };
00098 
00099 } // namespace ell
00100 
00101 
00102 #include <biu/Matrix.hh>
00103 
00104 namespace ell {
00105 
00124     class LT_SaddleNet_AM : public LT_SaddleNet {
00125 
00126     public:
00127         
00131         static 
00132         size_t MatrixResizeAdd; 
00133         
00134     protected:
00135         
00137         static
00138         const State* const NULLpointer;
00139         
00145         biu::Matrix< const State* > adjacent;
00146         
00148         size_t numOfMin;
00149         
00152         std::vector<size_t> minAccess;
00153         
00155         const State* mfeState;
00156         
00158         bool sorted;
00159         
00162         size_t sortedEnd;
00163         
00165         double saddleESum;
00166         
00168         size_t saddleNum;
00169         
00170     public:
00171         
00172         virtual 
00173         ~LT_SaddleNet_AM();
00174         
00179         LT_SaddleNet_AM( const size_t matrixDimension = 0 );
00180         
00181         
00184         LT_SaddleNet_AM( const LT_SaddleNet_AM& toCopy );
00185         
00189         virtual
00190         LT_SaddleNet_AM&
00191         operator = ( const LT_SaddleNet_AM& toCopy );
00192         
00193         
00199         virtual 
00200         bool 
00201         addSaddle(const size_t i, const size_t j, const State* const s);
00202         
00208         virtual 
00209         bool 
00210         addSaddle(const State* const m_i, const State* const m_j, const State* const s);
00211         
00218         virtual 
00219         const size_t 
00220         addMin(const State* const m);
00221         
00226         virtual 
00227         const size_t 
00228         getMinIndex(const State* const m) const;
00229         
00232         virtual 
00233         const size_t 
00234         getMinCount() const;
00235         
00239         virtual 
00240         const State* const 
00241         getMin(size_t i) const;
00242         
00247         virtual 
00248         const State* const 
00249         getMFEState() const;
00250         
00253         virtual 
00254         void 
00255         sort();
00256 
00260         virtual 
00261         bool 
00262         isSorted() const;
00263 
00266         virtual 
00267         void 
00268         clear();
00269 
00274         virtual 
00275         void
00276         write(  std::ostream & out, 
00277                 const bool writeGraph = false ) const;
00278 
00288         virtual 
00289         std::pair<int,std::string>
00290         read(   std::istream & in, 
00291                 const State * const templateState  );
00292 
00293         
00294         
00296         
00297         
00303         virtual
00304         bool
00305         isSaddle( const size_t m1, const size_t m2 ) const;
00306         
00307         
00313         virtual
00314         const State*
00315         getSaddle( const size_t m1, const size_t m2 ) const;
00316         
00321         virtual
00322         double
00323         getAvgSaddleEnergy( void ) const;
00324 
00329         virtual
00330         size_t
00331         getSaddleNumber( void ) const;
00332         
00333         
00334     };
00335 
00336 } // namespace ell
00337 
00338 
00339 
00340 #endif /*LT_SADDLENET_HH_*/