is.reciprocal.Rd
Check whether a matrix is reciprocal. This is, whether the entrywise product of itself with its transpose (Hadamard product) is 1 for all its elements.
is.reciprocal(x)
square numeric matrix or number
logical
Xf <- matrix(1:16, 4, 4) Xr <- Xf Xr[upper.tri(Xf)] <- 1/t(Xf)[upper.tri(Xf)] diag(Xr) <- 1 mapMCDA:::is.reciprocal(Xf) # FALSE #> [1] FALSE mapMCDA:::is.reciprocal(Xr) # TRUE #> [1] TRUE