Skip to contents

Compute the between-class neighbors of a class_graph object.

Usage

# S3 method for class 'class_graph'
between_class_neighbors(x, ng, ...)

Arguments

x

A class_graph object.

ng

A neighbor_graph object.

...

Additional arguments (currently ignored).

Value

A neighbor_graph object representing the between-class neighbors.

Examples

labs <- factor(c("a","a","b"))
cg <- class_graph(labs)
ng <- neighbor_graph(matrix(c(0,1,1,1,0,1,1,1,0),3))
between_class_neighbors(cg, ng)
#> $G
#> IGRAPH 9fb1ab7 U-W- 3 3 -- 
#> + attr: weight (e/n)
#> + edges from 9fb1ab7:
#> [1] 1--2 1--3 2--3
#> 
#> $params
#> list()
#> 
#> attr(,"class")
#> [1] "neighbor_graph"