R/calc_Dmat.R

Defines functions calc_Dmat

Documented in calc_Dmat

#' Calculates the matrix D used in the quadratic minimization problem
#'
#' @inheritParams calc_Sigma_opt_frob
#' @keywords internal
#'
#' @returns the matrix D
calc_Dmat = function(matList_full){
  Dmat = matrix(nrow=length(matList_full),ncol=length(matList_full))
  for(i in seq_along(matList_full)){
    for(j in seq_along(matList_full)){
      Dmat[i,j] = frob_scalar_prod(matList_full[[i]],matList_full[[j]])
    }
  }
  return(2*Dmat)
}

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.