samplecycles2C: C interface that is functionally equivalent to samplecycles....

Description Usage Arguments Value

Description

C interface that is functionally equivalent to samplecycles. Samples n cycles and alters the random state accordingly

Usage

1
2
3
samplecycles2C(n, bft, depth, st, idx, idx0, slength, odds, triplets,
  randomstate, a = rep(0, dim(triplets)[1]), b = rep(1,
  dim(triplets)[1]), what = "randomstate")

Arguments

n

Number of cycles to sample

bft

Spannig tree.

depth

depth of the items in spanning tree.

st

subtree indices

idx

Triplet indices of the links in spanning tree.

idx0

Vector of cycle links that do not appear in the spanning tree.

slength

length of cycles corresponding to idx0

odds

array with the number of odd cycles for each subgraph

triplets

nX2 matrix of triplest (links)

randomstate

Current random state.

a

lower bound for the weight of each triplet

b

upper bound for the weight of each triplet

what

define what to return (string). One of all returning all parameters, randomstate returning the new random state, or acceptance_rate returning the fraction of accepted moves.

Value

New random state.


edahelsinki/cyclesampler documentation built on June 9, 2019, 10:51 a.m.