kmnneighbourhood: Compute the n-neighbourhod of a state within a knowledge...

View source: R/kmneighbourhood.R

kmnneighbourhoodR Documentation

Compute the n-neighbourhod of a state within a knowledge structure

Description

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.

Usage

kmnneighbourhood(state, struct, distance, include = FALSE)

Arguments

state

Binary vector representing a knowledge state

struct

Binary matrix representing a knowledge structure

distance

Size of the n-neighbourhood

include

Boolean whether the original state should be included (defaul FALSE)

Value

Matrix containing the neighbouring states, one per row

See Also

Other Fringes & learning paths: kmbasisfringe(), kmbasisneighbourhood(), kmfringe(), kmgradations(), kmlearningpaths(), kmneighbourhood()

Examples

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


kstMatrix documentation built on Dec. 18, 2025, 5:07 p.m.