R/sdpQLS.R

Defines functions sdpQLS

sdpQLS <- function(A,b){
  
  m <- nrow(A)
  n <- ncol(A)
  
  #Minimum Degree Ordering
  
  q_colamd <- colamdR(A)
  A <- A[,q_colamd]
  
  ###### sqr #######################
  #QRDecomp <- qr(A)
  
  #R <- qr.R(QRDecomp)
  #Q <- qr.Q(QRDecomp)
  
  #qI <- sort.list(QRDecomp@q) # the inverse 'q' permutation
  ################################
  
  #Permute the original permutation
  #Pc <- q_colamd[qI]
  #c <- t(Q) %*% b
  #X <- solve(R, c)
  QRDecomp <- qr(A)
  X <- qr.coef(QRDecomp,b)
  X[q_colamd] <- X
  
  return(X)
}

Try the edmcr package in your browser

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

edmcr documentation built on Sept. 10, 2021, 5:10 p.m.