R/condDist.R

Defines functions condDist

Documented in condDist

condDist <- function(U, V.tilda, one_n_t=t(rep(1,nrow(U)))) {
  du2 <- dist(U)^2
  VV <- V.tilda %*% t(V.tilda)
  tmp <- diag(VV) %*% one_n_t
  dv2 <- as.dist(tmp + t(tmp) - 2*VV)
  sqrt(du2 + dv2)
}

Try the cml package in your browser

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

cml documentation built on April 24, 2023, 9:10 a.m.