R/qap.R

Defines functions qap.obj qap

Documented in qap qap.obj

qap <- function(A, B, method = NULL, ...) {
  if(is.null(method)) method <- "SA"

  methods <- c("SA")
  method <- methods[pmatch(tolower(method), tolower(methods))]
  if(is.na(method)) stop("Unknown method. Available methods are: ",
    paste(methods, collapse = ", "))

  if(method == "SA") qapSA(A, B, ...)
  else stop("Unknown method. Available methods are: ",
    paste(methods, collapse = ", "))
}

qap.obj <- function(A, B, o) {
  sum(diag(A%*%B[o,o]))
}

Try the qap package in your browser

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

qap documentation built on June 28, 2022, 1:06 a.m.