Description Usage Arguments Value

Defines a cost function to be used in `seq_opt()`

.
A cost function defines the penalty for a given state transitions.
If multiple cost functions are provided to `seq_opt()`

then costs are computed for each cost function and summed
to produce the final cost.

1 2 |

`context_sensitive` |
Scalar Boolean;
whether the function is affected by the identity of the previous state.
If |

`f` |
Function defining the cost function.
If |

`memoise` |
Scalar Boolean;
whether or not the cost function should be memoised.
Defaults to |

`vectorised` |
Scalar Boolean;
whether or not |

`weight` |
Scalar numeric;
defines the multiplicative weight parameter for the cost function
when |

An object of class `cost_fun`

, to be combined into a list
and passed to `seq_opt()`

.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.