diff_edges_tch: Determine the number of differing edges for t-cherry trees

Description Usage Arguments Value Author(s) Examples

View source: R/diff_edges.R

Description

Determines the number of differing edges for two t-cherry trees over the same universe and of the same order represented by adjacency matrices, i.e. the number of edges in each graph minus the number of edges common to both t-cherry trees.

Usage

1
diff_edges_tch(adj_mat_1, adj_mat_2)

Arguments

adj_mat_1, adj_mat_2

Adjacency matrices for the two graphs.

Value

The number of edges for which the two graphs differ.

Author(s)

Katrine Kirkeby, enir_tak@hotmail.com

Maria Knudsen, mariaknudsen@hotmail.dk

Ninna Vihrs, ninnavihrs@hotmail.dk

Examples

1
2
3
4
5
6
7
8
9
m1 <- matrix(c(0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0),
             nrow = 4, ncol = 4)
m2 <- matrix(c(0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0),
             nrow = 4, ncol = 4)
colnames(m1) <- rownames(m1) <- letters[1:4]
colnames(m2) <- rownames(m2) <- letters[1:4]

diff_edges_tch(m1, m1)
diff_edges_tch(m1, m2)

nvihrs14/tcherry documentation built on Aug. 1, 2020, 6:25 p.m.