Search Results for

    Show / Hide Table of Contents

    Class model::Tsp

    Inheritance
    markov::Model
    model::Tsp
    Inherited Members
    get_benchmark_properties
    estimate_max_cost_diff
    has_initial_configuration
    Model
    state_only_memory_estimate
    get_term_count
    get_sweep_size
    init
    get_initial_configuration_state
    render_state
    calculate_cost
    apply_transition
    estimate_min_cost_diff
    get_scale_factor
    is_empty
    set_step_limit
    is_rescaled
    state_memory_estimate
    rescale
    render
    calculate_cost_difference
    get_random_transition
    get_const_cost
    configure
    match_version
    ~BaseModel
    configure
    BaseModel
    render
    ~Component
    Component
    get_status
    param

    Constructors

    Tsp()

    Declaration
    model::Tsp::Tsp()

    Methods

    get_identifier()

    Returns the identifier string of the model type (e.g., "ising").

    Declaration
    std::string model::Tsp::get_identifier() const override

    get_version()

    Returns the version of the input format this implementation expects.

    Declaration
    std::string model::Tsp::get_version() const override

    calculate_cost()

    Declaration
    double model::Tsp::calculate_cost(const Permutation&p) const override

    calculate_cost_difference()

    Declaration
    double model::Tsp::calculate_cost_difference(const Permutation&p, const TspTransition&t) const override

    get_random_state()

    Return a valid random state for the model.

    The various algorithms don't know how to initialize a valid state; this allows them to start with a random one. NOTE: The rng being passed should be used for randomness (as opposed to creating one for the model), as multiple threads can potentially use the same underlying model (albeit with separate rngs).

    Declaration
    Permutation model::Tsp::get_random_state(utils::RandomGenerator&rng) const override

    get_random_transition()

    Declaration
    TspTransition model::Tsp::get_random_transition(const Permutation&p, utils::RandomGenerator&rng) const override

    apply_transition()

    Declaration
    void model::Tsp::apply_transition(const TspTransition&transition, Permutation&p) const override

    configure()

    Populates model internals from the input json.

    Declaration
    void model::Tsp::configure(const utils::Json&json) override

    configure()

    Declaration
    void model::Tsp::configure(Configuration_T&config)

    get_class_name()

    get_class_name shows an identifier of the (derived) class name

    Its primary use is for type identification during stream output and logging, where a component is rendered as <ClassName: status>. Example:

    {c++}
     MyClass : public Component {}
    
     // This will render as '<MyClass>'
     MyClass my_object;
     std::cout << my_object << std::endl;
    
    Note

    You do not need to overload this method unless you want to change the output of the default implementation.

    Declaration
    std::string model::Tsp::get_class_name() const override

    get_const_cost()

    Declaration
    double model::Tsp::get_const_cost() const override

    is_empty()

    Declaration
    bool model::Tsp::is_empty() const override

    state_memory_estimate()

    Declaration
    size_t model::Tsp::state_memory_estimate() const override

    state_only_memory_estimate()

    Declaration
    size_t model::Tsp::state_only_memory_estimate() const override
    In This Article
    Back to top Generated with Doxygen and DocFX