R/RcppExports.R

Defines functions get_branchpath char_to_coord expand_rectangle children_to_parentC parent_to_childrenC gogame_test get_movenumber prune_sgf sgftree_test make_sgftree get_transitions get_transitiontree tree_compressor validate_children validate_parent

Documented in prune_sgf

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

get_branchpath <- function(parent, goal, onebased = TRUE) {
    .Call('gogamer_get_branchpath', PACKAGE = 'gogamer', parent, goal, onebased)
}

char_to_coord <- function(charvec) {
    .Call('gogamer_char_to_coord', PACKAGE = 'gogamer', charvec)
}

expand_rectangle <- function(text) {
    .Call('gogamer_expand_rectangle', PACKAGE = 'gogamer', text)
}

children_to_parentC <- function(children) {
    .Call('gogamer_children_to_parentC', PACKAGE = 'gogamer', children)
}

parent_to_childrenC <- function(parent) {
    .Call('gogamer_parent_to_childrenC', PACKAGE = 'gogamer', parent)
}

gogame_test <- function(m = 0L) {
    invisible(.Call('gogamer_gogame_test', PACKAGE = 'gogamer', m))
}

get_movenumber <- function(hasmove, children, onebased = TRUE) {
    .Call('gogamer_get_movenumber', PACKAGE = 'gogamer', hasmove, children, onebased)
}

#' Remove branches from SGF text
#' @param sgf  Scalar character formatted as SGF
#' @param keepfirst  Logical. If TRUE, keep the first branch.
#'   Otherwise, keep the last branch.
#' @return Scalar character of SGF text where branches are removed
#' @export
prune_sgf <- function(sgf, keepfirst = TRUE) {
    .Call('gogamer_prune_sgf', PACKAGE = 'gogamer', sgf, keepfirst)
}

sgftree_test <- function(sgf) {
    invisible(.Call('gogamer_sgftree_test', PACKAGE = 'gogamer', sgf))
}

make_sgftree <- function(sgf, bynode = TRUE) {
    .Call('gogamer_make_sgftree', PACKAGE = 'gogamer', sgf, bynode)
}

get_transitions <- function(boardsize, ismove_vec, x_vec, y_vec, color_vec, nodeid = 1L) {
    .Call('gogamer_get_transitions', PACKAGE = 'gogamer', boardsize, ismove_vec, x_vec, y_vec, color_vec, nodeid)
}

get_transitiontree <- function(boardsize, ismove_vec, x_vec, y_vec, color_vec, nodeid_vec, children, onebased) {
    .Call('gogamer_get_transitiontree', PACKAGE = 'gogamer', boardsize, ismove_vec, x_vec, y_vec, color_vec, nodeid_vec, children, onebased)
}

tree_compressor <- function(children, onebased = TRUE) {
    .Call('gogamer_tree_compressor', PACKAGE = 'gogamer', children, onebased)
}

validate_children <- function(children) {
    .Call('gogamer_validate_children', PACKAGE = 'gogamer', children)
}

validate_parent <- function(parent) {
    .Call('gogamer_validate_parent', PACKAGE = 'gogamer', parent)
}
kota7/gogamer documentation built on May 20, 2019, 1:10 p.m.