# mk.pt.constr: COBS auxiliary for constructing pointwise constraint... In cobs: Constrained B-Splines (Sparse Matrix Based)

## Description

COBS (`cobs`) auxiliary function for constructing the pointwise constraint specification list from the `pointwise` 3-column matrix (as used as argument in `cobs`).

## Usage

 `1` ```mk.pt.constr(pointwise) ```

## Arguments

 `pointwise` numeric 3-column matrix, see `pointwise` in `cobs`.

## Value

A list with components

 `n.equal` number of equality constraints `n.greater` number of “greater” constraints `n.smaller` number of “smaller” constraints `n.gradient` number of gradient constraints

Unless the input `pointwise` was `NULL`, the result also has corresponding components:

 `equal` 3-column matrix ofequality constraints `greater` 3-column matrix of“greater” constraints `smaller` 3-column matrix of“smaller” constraints `gradient` 3-column matrix ofgradient constraints

Martin Maechler

## Examples

 ```1 2 3 4 5 6 7``` ``` ## 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) ```

### Example output

```List of 8
\$ equal     : num [1, 1:3] 0 0 0.5
\$ greater   : num [1, 1:3] 1 -1 0
\$ smaller   : num [1, 1:3] -1 3 1
\$ gradient  : num[0 , 1:3]
\$ n.equal   : int 1
\$ n.greater : int 1
\$ n.smaller : int 1