% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/graphettes.R
\name{sample_sparse_graphon}
\alias{sample_sparse_graphon}
\title{Samples a graph from a sparsified graphon}
\usage{
sample_sparse_graphon(W, rho_n = NULL, n)
}
\arguments{
\item{W}{The graphon. This is a symmetric matrix with values in [0,1]}

\item{rho_n}{A function. Default is 1.}

\item{n}{The number of nodes in the graph to sample}
}
\value{
gr A graph sampled from rho_n W.
}
\description{
Samples a graph from a sparsified graphon given by a_n W, where W is the graphon and a_n is generally a sequence converging to zero.
}
\examples{
library(igraph)
f1 <- function(n) 10/n
W <- matrix(0.2, nrow = 100, ncol = 100)
gr <- sample_sparse_graphon(W, f1, n = 100)
gr

}
