project_ball: Projection onto a ball

Description Usage Arguments Examples

Description

project_ball computes the Euclidean projection of a point onto a ball.

Usage

1
project_ball(x, center, r)

Arguments

x

Point to project

center

Center of the sphere

r

Radius of the sphere

Examples

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

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