Learn R Programming

PCBN (version 0.1.1)

B_sets_are_increasing: Checks if the B-sets for a particular node form an increasing sequence.

Description

Checks if the B-sets for a particular node form an increasing sequence.

Usage

B_sets_are_increasing(B_sets)

Value

TRUE if the B-sets form an ordered sequence, otherwise returns FALSE.

Arguments

B_sets

a boolean matrix with (2 + length(children)) columns and length(parents) rows. They are assumed to be sorted in increasing order of row sums, i.e. by increasing order of set cardinality. Typically, this will be the output of find_B_sets_v.

Examples

Run this code
B_sets = matrix(c(FALSE, FALSE, FALSE, FALSE,
                  TRUE , FALSE, FALSE, FALSE,
                  TRUE , TRUE , FALSE, FALSE,
                  TRUE , TRUE , TRUE ,  TRUE),
                nrow = 4, byrow = TRUE)

B_sets_are_increasing(B_sets)

B_sets = matrix(c(FALSE, FALSE, FALSE, FALSE,
                  TRUE , FALSE, TRUE , FALSE,
                  TRUE , TRUE , FALSE, FALSE,
                  TRUE , TRUE , TRUE ,  TRUE),
                nrow = 4, byrow = TRUE)

B_sets_are_increasing(B_sets)

Run the code above in your browser using DataLab