Learn R Programming

sharpPen (version 2.0)

projection_C: Projection operator for rectangle or nonnegative space

Description

Compute the projection operator for rectangle or nonnegative space. For example, we construct $$\lambda P_{C}(x/\lambda) = projection_C(\lambda,C,x)$$, where \(C\) can be rectangle or nonnegative space.

Usage

projection_C(
lambda,family=c("rectangle","nonnegative"),
input,bound=c(-1,1))

Value

projection

\(\lambda P_{C}(x/\lambda)\)

Arguments

lambda

parameter \(\lambda\) in the above equation

family

type of \(C\), can be rectangle or nonnegative space

input

input x in the above equation

bound

lower bound and upper bound for rectangle

Author

D.Wang and W.J.Braun

Details

Take \(x\) as input, \(\lambda\) as parameter. Calculate \(\lambda P_{C}(x/\lambda)\) for a given \(C\) family

Examples

Run this code
set.seed(1234567)
family <- "nonnegative"
temp_p1<-runif(10,-1,1)
projection_C(0.5,family=family,temp_p1)

Run the code above in your browser using DataLab