function(lambda, l, d)
{
	n <- l + d
	x <- rep(1:n, 1)
	w <- rep(1, n)
	ox <- order(x)
	h <- diff(x[ox])
	M <- diag(h, nrow = length(h))
	M[row(M) == col(M) + 1] <- h[1:(n - 2)]
	Q <- diag(1/h, nrow = (n - 1))
	Q[row(Q) == col(Q) + 1] <-  - ((1/h[1:(n - 2)] + 1/h[2:(n - 1)]))
	Q[row(Q) == col(Q) + 2] <- 1/h[2:(n - 2)]
	Q <- cbind(c(0, 1/h[1], rep(0, n - 3)), Q)
	Q[1,  ] <- 0
	R <- diag(h) %*% solve(M) %*% Q
	return(rbind(diag(w[ox], nrow = n), lambda * R))
}
