Skip to contents

The closest point of the space to theta. Idempotent up to tolerance, and its output always satisfies contains().

Usage

project(space, theta)

Arguments

space

A convex_region.

theta

Parameter vector.

Value

A parameter vector in the space.

Examples

s <- simplex_region(vertices = diag(3))
project(s, c(2, -1, 0))
#> [1] 1 0 0