Learn R Programming

cayleyR (version 0.2.1)

short_path_bfs: Shorten Path via Greedy BFS Hopping

Description

Shorten Path via Greedy BFS Hopping

Usage

short_path_bfs(path, start_state, k, n_hits = 5L)

Value

List with path (shortened), original_length, new_length, savings

Arguments

path

Character vector of operations ("1"/"2"/"3" or "L"/"R"/"X")

start_state

Integer vector, the starting permutation state

k

Integer, parameter for reverse_prefix operation

n_hits

Integer, number of path points to find in BFS cloud (default 5)