R/frob_scalar_prod.R

Defines functions frob_scalar_prod

Documented in frob_scalar_prod

#' Calculates the Frobenius inner product between to square matrices
#'
#' @param A a square matrix
#' @param B a square matrix
#'
#' @returns the Frobenius inner product
#' @keywords internal
frob_scalar_prod = function(A,B){
  sum(diag(t(A)%*%B))
}

Try the scov package in your browser

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

scov documentation built on March 18, 2026, 5:08 p.m.