Description Usage Arguments Details
swap is used to swap elements of a single binary chain if doing so
maintains the same number of transitions between the two states of that
chain.
1 | swap(bin_chain, m)
|
bin_chain |
A binary one dimensional integer vector. |
m |
A integer value representing the number of swaps to attempt. |
swap takes a one dimensional vector of integers bin_chain and
an integer m. It attempts to swap elements of bin_chain
m times, each time only completing the swap if it does not affect the
number of transitions between states in the sequence.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.