Search Results for

    Show / Hide Table of Contents

    Class model::PottsState

    Potts state representation.

    Represents N potts spins as a vector.

    Inheritance
    markov::State
    model::PottsState
    Inherited Members
    configure
    ~Component
    Component
    get_status
    param
    get_class_name

    Constructors

    PottsState()

    Declaration
    model::PottsState::PottsState()

    PottsState()

    Initialize a state of N potts spins to 0.

    Declaration
    model::PottsState::PottsState(size_t N)

    Methods

    render()

    render the object in structured form

    Return a structured representation of the object. This is intended for output purposes. For instance, the solution your solver finds should have a render method which allows it to be returned as part of the result. Example:

    {c++}
     MySolution : public Component {
      public:
       // Represent the internal bool vector as +-1 output.
       utils::Structure render() const override {
         utils::Structure rendered;
         for (bool item : solution_) rendered.push_back(item ? 1 : -1);
         return rendered;
       }
    
      private:
       std::vector<bool> solution_;
     }
    
     MySolution solution;
     std::cout << solution.render().to_string() << std::endl;
    

    utils::Structure

    Declaration
    utils::Structure model::PottsState::render() const override

    copy_state_only()

    Declaration
    void model::PottsState::copy_state_only(const PottsState&other)

    memory_estimate()

    Declaration
    static size_t model::PottsState::memory_estimate(size_t N)

    state_only_memory_estimate()

    Declaration
    static size_t model::PottsState::state_only_memory_estimate(size_t N)
    In This Article
    Back to top Generated with Doxygen and DocFX