% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/buildNetwork.R
\name{calcSparsness}
\alias{calcSparsness}
\title{Calculate sparsness of the graph.}
\usage{
calcSparsness(gg)
}
\arguments{
\item{gg}{graph to evaluate}
}
\value{
sparsness value
}
\description{
For a simple unweighted, undirected graph G(N,E).
Network sparseness is defined as the ratio of the actual number of graph
edges (E) to the maximum number of edges possible in a graph with same number
of vertices (N):  E/binom(N,2)
}
\examples{
library(synaptome.db)
cid<-match('Presynaptic', getCompartments()$Name)
t<-getAllGenes4Compartment(cid)
gg<-buildFromSynaptomeByEntrez(t$HumanEntrez)
calcSparsness(gg)
}
