src/ell/spinglass/S_SG_NPP.hh
Go to the documentation of this file.00001 #ifndef S_SG_NPP_HH_ 00002 #define S_SG_NPP_HH_ 00003 00004 #include "ell/spinglass/S_SG_Ising.hh" 00005 #include <vector> 00006 00007 namespace ell 00008 { 00009 00012 class S_SG_NPP : public S_SG_Ising 00013 { 00014 public: 00015 typedef std::vector<double> WeightType; 00016 00017 protected: 00018 00020 using S_SG_Ising::spin; 00022 const WeightType* weights; 00023 public: 00029 S_SG_NPP(const WeightType* weights, bool random = true); 00030 00035 S_SG_NPP(const WeightType* weights, const std::string& spinStr); 00036 00037 S_SG_NPP(const S_SG_NPP& s2); 00038 00040 virtual ~S_SG_NPP(); 00041 00042 virtual bool operator== (const State& state2) const; 00043 virtual bool operator!= (const State& state2) const; 00044 00045 virtual void operator= (const S_SG_NPP& sg2); 00046 00050 virtual double getEnergy() const; 00052 virtual State* clone() const; 00053 00056 virtual State* fromString(const std::string& stringRep) const; 00057 00061 virtual State* getRandomNeighbor(State* inPlaceNeigh = NULL) const; 00062 00069 virtual State* getNeighbor(const size_t index, State* neigh) const; 00070 00080 virtual State* applyNeighborChange(const size_t index, State* const neigh) const; 00081 00090 virtual State* uncompress(const CSequence& cseq, State* toFill) const; 00091 00092 00093 }; 00094 00095 00096 } // namespace ell 00097 00098 #endif /*S_SG_NPP_HH_*/