chullcheck: Checks whether the point test is in the convex hull of the...

Description Usage Arguments Value Examples

View source: R/Main.R

Description

Checks whether the point test is in the convex hull of the rows of X. This function will take the matrix X and the vector test as inputs, and return a binary variable, which is 1 if the point test is in the convex hull of the rows of X, and 0 otherwise.

Usage

1
chullcheck(X, test)

Arguments

X

An n by d matrix.

test

An n by 1 vector.

Value

A binary variable, which is 1 if the point test is in the convex hull of the rows of X, and 0 otherwise.

Examples

1
2
3
4
5
## We demonstrate an example, where the point test is in the convex hull of the rows of X.
X<-matrix(c(0,0,1,1,0,1,0,1),4,2)
test<-c(0.3,0.4)

out = chullcheck(X,test)

somabhamukherjee/QuasiconvexLSE documentation built on June 17, 2021, 6:49 a.m.