alphahull (version 2.2)

areaahull: Area of the alpha-convex hull

Description

This function calculates the area of the \(\alpha\)-convex hull of a sample of points.

Usage

areaahull(x, timeout = 5)

Arguments

x

Object of class "ahull".

timeout

A numeric specifying the maximum number of seconds the expression is allowed to run before being interrupted by the timeout.

Value

area

Area of the \(\alpha\)-convex hull. If the area cannot be computed, the output will be NA with a warning.

See Also

ahull.

Examples

Run this code
# NOT RUN {
# Random sample in the unit square
x <- matrix(runif(500), nc = 2)
# Value of alpha
alpha <- 1
# alpha-convex hull
ahull.obj <- ahull(x, alpha = alpha)
# Area of the alpha-convex hull
areaahull(ahull.obj)
# }

Run the code above in your browser using DataLab