Search Results for

    Show / Hide Table of Contents

    Class model::Pubo

    Inheritance
    model::AbstractPubo
    model::Pubo
    Inherited Members
    Model
    init
    render_state
    set_step_limit
    render
    get_random_transition
    configure
    state_memory_estimate
    state_only_memory_estimate
    estimate_min_cost_diff
    apply_transition
    configure
    render_state
    get_random_state
    get_identifier
    ~AbstractPubo
    edges
    configure
    match_version
    AbstractPubo
    nodes
    get_random_transition
    get_initial_configuration_state
    get_version
    get_version
    ~BaseModel
    configure
    BaseModel
    get_identifier
    edge
    get_const_cost
    node
    rescale
    node_count
    estimate_max_cost_diff
    get_term_count
    get_scale_factor
    is_empty
    has_initial_configuration
    is_rescaled
    get_initial_configuration
    configure
    get_sweep_size
    get_benchmark_properties
    edge_count
    render
    ~Component
    Component
    get_status
    param
    get_class_name

    Methods

    calculate_cost()

    Definition of the cost function.

    Evaluate the entire cost function for the state being passed. For instance, in the case of a model from statistical mechanics, this would be the Hamiltonian.

    Declaration
    double model::Pubo::calculate_cost(const State_T&state) const override

    calculate_cost_difference()

    Partial evaluation of the cost function.

    This method should calculate the difference in cost if we move from state (=before) to the one resulting from applying transition to state (=after):

     \Delta_{C} = C_{\mathrm{after}} - C_{\mathrm{before}} 
    

    In code: State state = get_random_state(rng); Transition transition = get_random_transition(rng); double cost_before = calculate_cost(state); double cost_diff = calculate_cost_difference(state, transition); apply_transition(transition, state); // modify state double cost_after = calculate_cost(state); // before + diff should correspond to after (up to double precision) assert(cost_before + cost_diff == cost_after);

    Declaration
    double model::Pubo::calculate_cost_difference(const State_T&state, const Transition_T&transition) const override

    apply_transition()

    Apply a transition to a state.

    This changes the configuration represented by *state. Depending on the optimization algorithm, transition can either be applied conditionally or alaways (e.g., population dynamics). Separating the functionality into the three interfaces random_transition, calculate_cost_difference, apply_transition leaves control over the strategy with the optimization method.

    Declaration
    void model::Pubo::apply_transition(const Transition_T&transition, State_T&state) const override
    In This Article
    Back to top Generated with Doxygen and DocFX