% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/misc.R
\name{makeKNNgraph}
\alias{makeKNNgraph}
\title{makeKNNgraph}
\usage{
makeKNNgraph(x, k, eps = 0, diag = FALSE)
}
\arguments{
\item{x}{data, a matrix, observations in rows, dimensions in
columns}

\item{k}{the number of nearest neighbors.}

\item{eps}{number, if \code{eps > 0} the KNN search is approximate,
see \code{\link[RANN]{nn2}}}

\item{diag}{logical, if \code{TRUE} every edge of the returned
graph will have an edge with weight \code{0} to itself.}
}
\value{
an object of type \code{\link[igraph]{igraph}} with edge
    weight being the distances.
}
\description{
Create a K-nearest neighbor graph from data x. Uses
\code{\link[RANN]{nn2}} as a fast way to find the neares neighbors.
}
