R/antisymmetry.R

Defines functions antisymmetry

Documented in antisymmetry

antisymmetry <-
function(m) {
    r <- nrow(m)
    c <- ncol(m)
    if(r!=c) return(FALSE)
    all((m+t(m) - diag(diag(m))) <= 1)
}

Try the parsec package in your browser

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

parsec documentation built on May 2, 2019, 6:08 p.m.