% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/graph_separation.R
\name{separate_dense_and_sparse}
\alias{separate_dense_and_sparse}
\title{Separates the dense and sparse part from a (U,W) graphon mixture}
\usage{
separate_dense_and_sparse(grmix)
}
\arguments{
\item{grmix}{The input graph}
}
\value{
a list with the following components:
\item{\code{gr_dense}}{The dense component.}
\item{\code{gr_sparse}}{The sparse component.}
\item{\code{data}}{The original graph.}
}
\description{
This function breaks a (U,W) mixture graph into a dense and sparse component.
}
\examples{
library(igraph)
W <- matrix(0.1, nrow = 100, ncol = 100)
wts <- c(0.5, 0.3, 0.2)
ns <- 200
nd <- 100
p <- 0.5
gr <- sample_mixed_graph(W, wts, nd, ns, p = 0.1, option = 2)
out <- separate_dense_and_sparse(gr)
out

}
