COBS (cobs
) auxiliary function for constructing the
pointwise constraint specification list from the pointwise
3-column matrix (as used as argument in cobs
).
mk.pt.constr(pointwise)
numeric 3-column matrix, see pointwise
in cobs
.
A list with components
number of equality constraints
number of ``greater'' constraints
number of ``smaller'' constraints
number of gradient constraints
Unless the input pointwise was NULL, the result also has corresponding components:
3-column matrix ofequality constraints
3-column matrix of``greater'' constraints
3-column matrix of``smaller'' constraints
3-column matrix ofgradient constraints
# NOT RUN {
## from ?cobs:
x <- seq(-1,3,,150)
con <- rbind(c( 1,min(x),0), # f(min(x)) >= 0
c(-1,max(x),1), # f(max(x)) <= 1
c(0, 0, 0.5))# f(0) = 0.5
r <- mk.pt.constr(con)
str(r)
# }
Run the code above in your browser using DataLab