Nothing
## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## ----echo = TRUE, results = 'hide'--------------------------------------------
suppressMessages(library(pcSteiner))
g <- graph('Bull')
# Prize for 1-st node is 10
E(g)$costs <- c(3, 3, 3, 3, 3)
V(g)$prizes <- c(10, 2, 2, 2, 2)
terminals <- c(4, 5)
## -----------------------------------------------------------------------------
treeData <- pcs.tree(
graph=g,
terminals=c(4,5),
lambda=1,
root=3,
depth=5,
eps=-1,
max_iter=10
)
## -----------------------------------------------------------------------------
V(g)$color <- "gray"
V(g)$color[terminals] <- "red"
E(g)$color <- "gray"
E(g)$color[treeData$edges] <- "red"
plot(g)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.