project_square: Project onto a square

Description Usage Arguments Examples

Description

project_square computes the Euclidean projection of a point onto a square.

Usage

1
project_square(x, cnt, r)

Arguments

x

Point to project

r

Half the length of a side

center

Center of the square

Examples

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

jasonxu90/splitFeas documentation built on May 31, 2019, 8:43 a.m.