Evaluates the falling factorial basis of a given order, with respect to given design points, at arbitrary query points.

h_eval(k, xd, x, col_idx = NULL)

Arguments

k

Order for the falling factorial basis. Must be >= 0.

xd

Design points. Must be sorted in increasing order, and have length at least k+1.

x

Query points. Must be sorted in increasing order.

col_idx

Vector of indices, a subset of 1:n where n = length(xd), that indicates which columns of the constructed matrix should be returned. The default is NULL, which is taken to mean 1:n.

Value

Sparse matrix of dimension length(x) by length(col_idx).

Details

The falling factorial basis functions of order \(k\), defined with respect to design points \(x_1 < \ldots < x_n\), are denoted \(h^k_1, \ldots, h^k_n\). For their precise definition and further references, see the help file for h_mat(). The current function produces a matrix of evaluations of the falling factorial basis at an arbitrary sequence of query points. For each query point \(x\), this matrix has a corresponding row with entries: $$ h^k_j(x), \; j = 1, \ldots, n. $$

See also

h_mat() for constructing evaluations of the falling factorial basis at the design points.