R/utils.R

isSuperSet <- function(x, y){
    ## x and y is a vector representing a primeImplicant, e.g. x <- c(1,-9,-9); y <- c(1,1,1)
    ## return TRUE if x is a superset of y
    idx <- !is.dontcare(x)
    equal <- x[idx]==y[idx]
    dontcare <- is.dontcare(y[idx])
    if (all(equal | dontcare)) {
        TRUE
    } else {
        FALSE
    }
}

Try the QCA3 package in your browser

Any scripts or data that you put into this service are public.

QCA3 documentation built on May 2, 2019, 4:49 p.m.