volume_ellipsoid: Ellipsoid volume

View source: R/volumes.R

volume_ellipsoidR Documentation

Ellipsoid volume

Description

Volume of an ellipsoid (arbitrary dimension).

Usage

volume_ellipsoid(A, r)

Arguments

A

symmetric positive-definite matrix defining the ellipsoid (see Details)

r

"radius" (see Details)

Details

The (boundary of the) ellipsoid is the set of vectors x satisfying t(x) %*% A %*% x == r^2.

Value

The volume of the ellipsoid.

Examples

# dimension 2 (area), with diagonal matrix A
A <- diag(c(2,3))
r <- 2
volume_ellipsoid(A, r)
pi * r^2 / sqrt(A[1,1]*A[2,2])

uniformly documentation built on July 26, 2023, 6:06 p.m.