% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/kmneighbourhood.R
\name{kmneighbourhood}
\alias{kmneighbourhood}
\alias{kmnneighbourhood}
\title{Compute the neighbourhod of a state within a knowledge structure}
\usage{
kmneighbourhood(state, struct, include = FALSE)

kmnneighbourhood(state, struct, distance, include = FALSE)
}
\arguments{
\item{state}{Binary vector representing a knowledge state}

\item{struct}{Binary matrix representing a knowledge structure}

\item{include}{Boolean whether the original state should be included
(defaul FALSE)}

\item{distance}{Size of the n-neighbourhood}
}
\value{
Matrix containing the neighbouring states, one per row

Matrix containing the neighbouring states, one per row
}
\description{
\code{kmneighbourhood} computes the neighbourhood of a state
within a knowledge structure, i.e. the family of all other
states with a symmetric set difference of 1.

\code{kmnneighbourhood} computes the n-neighbourhood of a state
within a knowledge structure, i.e. the family of all other
states with a symmetric set difference maximal n.
}
\examples{
kmneighbourhood(c(1,1,0,0), xpl$space)

kmnneighbourhood(c(1,1,0,0), xpl$space, 2)

}
\seealso{
Other Functions for fringes & neighbourhoods:
\code{\link[=kmbasisfringe]{kmbasisfringe()}},
\code{\link[=kmbasisneighbourhood]{kmbasisneighbourhood()}},
\code{\link[=kmfringe]{kmfringe()}}
}
\concept{Functions for fringes & neighbourhoods}
