R/condDist2.R

Defines functions condDist2

Documented in condDist2

condDist2 <- function(U, V.tilda2, one_n_t=t(rep(1,nrow(U)))) {
  du2 <- dist(U)^2
  tmp <- diag(V.tilda2) %*% t(rep(1,nrow(U)))
  dv2 <- as.dist(tmp + t(tmp) - 2*V.tilda2)
  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.