checkStandardSimplex: Domain check for standard simplex \{\vec{x} \in R^n : x_i >=q...

View source: R/domainChecks.R

checkStandardSimplexR Documentation

Domain check for standard simplex \{\vec{x} \in R^n : x_i \geq 0, \Vert \vec{x} \Vert_1 \leq 1 \}

Description

The function checks if a point (one row in the input argument) is inside the standard simplex \{\vec{x} \in R^n : x_i \geq, \Vert \vec{x} \Vert_1 \leq 1 \} or not. If the input matrix contains entries that are not numeric, i.e., not representing real numbers, the function throws an error. The dimension n is automatically inferred from the input matrix and is equal to the number of columns.

Usage

checkStandardSimplex(x)

Arguments

x

Matrix with numeric entries. Each row represents one point

Value

Vector where each element (TRUE or FALSE) indicates if a point is in the standard simplex

Author(s)

Klaus Herrmann

Examples

x <- matrix(rnorm(30),10,3)
checkStandardSimplex(x)

multIntTestFunc documentation built on April 19, 2023, 5:07 p.m.