R/in.convex.hull.R

Defines functions in.convex.hull

Documented in in.convex.hull

in.convex.hull<-function(tri.obj,x,y)
{
  if(!inherits(tri.obj,"tri"))
    stop("tri.obj must be of class \"tri\"")
  if(length(x)!=length(y))
    stop("x and y must be of same length")
  n<-length(x)
  if(n==0)
    stop("length of x (resp. y) is 0")
  ans<-.Fortran("inhull",
                as.double(x),
                as.double(y),
                as.integer(n),
                as.double(tri.obj$x),
                as.double(tri.obj$y),
                as.integer(tri.obj$n),
                as.integer(tri.obj$tlist),
                as.integer(tri.obj$tlptr),
                as.integer(tri.obj$tlend),
                inhull=logical(n),
                PACKAGE = "tripack")
  ans$inhull
}

Try the tripack package in your browser

Any scripts or data that you put into this service are public.

tripack documentation built on Oct. 21, 2024, 5:07 p.m.