tests/testgv.R

testgv <- function(A,B,z) {
    V <- z$vectors         
    if( is.null(z$alpha) ) {
        ret <- A %*% V - B %*% V %*% diag(z$values)
    } else {
        ret <- A %*% V %*% diag(z$beta) - B %*% V %*% diag(z$alpha)
    }
    tol <- 100 * sqrt(.Machine$double.eps)
    all(abs(ret)<=tol)
}

Try the geigen package in your browser

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

geigen documentation built on May 30, 2019, 5:03 p.m.