R/blktrace.R

##**********************************************************************
## blktrace: compute <X1,Z1> + ... <Xp,Zp>
##              
## SDPT3: version 3.1 
## Copyright (c) 1997 by
## K.C. Toh, M.J. Todd, R.H. Tutuncu
## Last Modified: 15 Sep 2004
##**********************************************************************

blktrace=function(blk,X,Z){
  trXZ <- 0 
  for(p in 1:length(blk$type)){
    trXZ <- trXZ + tt(as.matrix(X[[p]]))%*%Z[[p]] 
  }
  return(trXZ)
}

Try the DWD package in your browser

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

DWD documentation built on May 2, 2019, 5 p.m.