R/bd_encode.R

Defines functions bd_encode

#' Convert matrix into strings
#'
#' This function converts matrices into string objects.
#' It is implemented in \code{learn_DAG} when \code{save.memory = TRUE}
#'
#' @param matrix a matrix to convert into string
#' @param separator symbol used to separate elements of the matrix in the string
#'
#' @return A string representing the adjacency matrix.
#' @noRd
#' @keywords internal
bd_encode <- function(matrix, separator = ";") {
  paste(matrix, collapse = separator)
}

Try the BCDAG package in your browser

Any scripts or data that you put into this service are public.

BCDAG documentation built on June 21, 2026, 5:08 p.m.