sample_path: is a helper function that creates a vector of non-repeating...

Description Usage Arguments Value Examples

Description

This internal function create a randomized vector of paired node numbers of a given length without repeat.

Usage

1
sample_path(n, max_len, old_path)

Arguments

n

the number of pathways

max_len

the total number of nodes

old_path

vector of already sampled pairs of node numbers

Value

This function return a randomize vector of 2 x n node numbers.

Examples

1
2
3
4
5
6
7
8
9
	## Draw 5 samples of 10 pathways out of 100 nodes without repeated pathways
	## Not run: 
		old_path <- c();
		for (i in 1:5) {
		r <- sample_path(10,100, old_path);
			old_path <- c(old_path, r);
		}
	
## End(Not run)

SDDE documentation built on May 1, 2019, 9:01 p.m.