one_search {memnet} | R Documentation

## Search network using switcher-random walk process

### Description

Traverses a network using a switcher-random walk process and records the number of steps required to get from node `start` to node `observe`.

### Usage

    one_search(adj_list, start, observe, nmax = 1000L, pjump = 0,
      type = 0L)

### Arguments

`adj_list` | a list containing row indices of nodes adjacent node to the ith node as created by get_adjlist.
`start` | integer vector of length 1 specifying the index of the start node.
`observe` | integer vector of length 1 or larger specifying the target end nodes.
`nmax` | integer specifying the maximum number of steps before search terminates.
`pjump` | numeric specifying the probability of a jump.
`type` | integer controlling network start and jump nodes. For `type = 0` the process selects the start node and any jump nodes proportional to their degree. For `type = 1` the process selects a random node to serve both as the start node and the jump node. For `type = 2` the process selects the start and any jump nodes uniformly at random.

### Details

If a node specified in `observe` has never been visited then the function returns `nmax` for that node.

### Value

Numeric, 3 column matrix containing in each row the start node, the end node, and the (minimum) number of steps it took to reach the end node from the start node.

### References

Wulff, D. U., Hills, T., & Mata, R. (2018, October 29). Structural differences in the semantic networks of younger and older adults. https://doi.org/10.31234/osf.io/s73dp

Goni, J., Martincorena, I., Corominas-Murtra, B., Arrondo, G., Ardanza- Trevijano, S., & Villoslada, P. (2010). Switcher-random-walks: A cognitive- inspired mechanism for network exploration. International Journal of Bifurcation and Chaos, 20(03), 913-922.

### Examples

    # generate watts strogatz graph
    network = grow_ws(n = 100, k = 10)

    # observe number of steps from node 2
    # to nodes 3, 4, and 5
    one_search(get_adjlist(network), 2, c(3, 4, 5))

    # observe number of steps from node 2 to nodes 3, 4, and 5
    # with high jump probability
    one_search(get_adjlist(network), start = 2, observe = c(3, 4, 5), pjump = .5)

[Package memnet version 0.1.0 Index]