Cayley-Menger determinant is a formula of a \(n\)-dimensional simplex with respect to the squares of all pairwise distances of its vertices.

cayleymenger(data)

Arguments

data

an \((n\times p)\) matrix of row-stacked observations.

Value

a list containing

det

determinant value.

vol

volume attained from the determinant.

Examples

## USE 'IRIS' DATASET
data(iris)
X = as.matrix(iris[,1:4])

## COMPUTE CAYLEY-MENGER DETERMINANT
#  since k=4 < n=149, it should be zero.
cayleymenger(X)
#> $det
#> [1] 0
#> 
#> $vol
#> [1] 0
#>