if (FALSE) {
# Create a metric graph and build mesh
graph <- metric_graph$new()
graph$build_mesh(h = 0.1)
graph$compute_fem()
# Simulate a single point pattern
lgcp_data <- graph_lgcp_sim(
intercept = -1,
sigma = 0.5,
range = 2,
alpha = 2,
graph = graph
)
# Simulate multiple replicates
lgcp_replicates <- graph_lgcp_sim(
n = 10,
intercept = -1,
sigma = 0.5,
range = 2,
alpha = 2,
graph = graph
)
# Plot the simulated intensity
graph$plot_function(X = exp(lgcp_data$u), vertex_size = 0)
}
Run the code above in your browser using DataLab