project_cube: Project onto a cube

Description Usage Arguments Examples

Description

project_cube computes the Euclidean projection of a point onto a cube.

Usage

1
project_cube(x, center, r)

Arguments

x

Point to project

center

Center of the square

r

Half the length of a side

Examples

1
2
3
4
5
6
set.seed(12345)
p <- 3
center <- matrix(rnorm(p),p,1)
r <- runif(1)
x <- matrix(rnorm(p),p,1)
y <- project_cube(x,center,r)

splitFeas documentation built on May 2, 2019, 2:52 p.m.