Description Usage Arguments Value
Returns costs for moving to a given state from a vector of previous states.
1 2 | cost_by_prev_state(prev_state_values, new_state_value, cost_funs, weights,
exp_cost, profile = FALSE)
|
prev_state_values |
List of potential previous states, over which this function is vectorized. |
new_state_value |
State to move to. |
cost_funs |
Named list of cost functions, each created by |
weights |
Numeric vector of weights for these cost functions. |
exp_cost |
(Logical scalar) Whether the total costs should be exponentiated (after summing over the cost functions). |
profile |
(Logical scalar) Whether to profile the time taken to compute each cost function. If TRUE, profile information will be returned in the "time" attribute of the output object. |
A numeric vector of costs of the same length
as prev_state_values
,
corresponding to the cost associated with moving from
that previous state to the new state.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.