Learn R Programming

kstMatrix (version 2.2-1)

kmneighbourhood: Compute the neighbourhod of a state within a knowledge structure

Description

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.

Usage

kmneighbourhood(state, struct, include = FALSE)

Value

Matrix containing the neighbouring states, one per row

Arguments

state

Binary vector representing a knowledge state

struct

Binary matrix representing a knowledge structure

include

Boolean whether the original state should be included in the result (default FALSE)

See Also

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

Examples

Run this code
kmneighbourhood(c(1,1,0,0), xpl$space)

Run the code above in your browser using DataLab