{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $k \\ge 1$ be an order and let $(t_i)$ be a nondecreasing knot sequence.\nLet $s = \\sum_i c_i B_{i,k}$, where $B_{i,k}$ are the [[B-splines|62AFX32JGT]] of order $k$ and the $c_i$ are real numbers or points of $\\R^d$.\nLet $x$ be a point with $t_j \\le x \u003c t_{j+1}$.\n*De Boor's algorithm* computes $s(x)$ as follows.\n\n1. Set $c_i^{[0]} = c_i$ for $i = j - k + 1, \\dots, j$.\n2. For $r = 1, \\dots, k - 1$ and $i = j - k + 1 + r, \\dots, j$, set\n$$\\alpha_{i,r} = \\frac{x - t_i}{t_{i+k-r} - t_i}, \\qquad c_i^{[r]} = (1 - \\alpha_{i,r})\\, c_{i-1}^{[r-1]} + \\alpha_{i,r}\\, c_i^{[r-1]}.$$\n3. Return $c_j^{[k-1]}$, which equals $s(x)$.\n\n## Remarks\n\nThe denominators are positive, since $t_i \\le t_j \u003c t_{j+1} \\le t_{i+k-r}$ in the stated range, and $\\alpha_{i,r} \\in [0, 1]$, so each step is a [[convex combination|21SXYJYC59]].\nCorrectness follows from the [[Cox–de Boor recursion|WVD069C7QF]]: one step rewrites $\\sum_i c_i B_{i,k}(x)$ as $\\sum_i c_i^{[1]} B_{i,k-1}(x)$, and at order $1$ only $B_{j,1}(x) = 1$ survives.\nExample: $k = 2$, knots $t_0 = 0, t_1 = 1, t_2 = 2$, $x = 1/2$, so $j = 0$; then $\\alpha_{0,1} = 1/2$ and $s(1/2) = (c_{-1} + c_0)/2$, which is the piecewise linear interpolant at the midpoint.\nNon-example: for $x$ outside $[t_j, t_{j+1})$ the same formulas with this $j$ do not give $s(x)$ in general, because other B-splines are active there.\nThe cost is $O(k^2)$ operations per point.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "5JHFB384BF",
    "kind": "definition",
    "msc": [
      "65D07",
      "41A15",
      "65D17"
    ],
    "name": "de Boor's algorithm",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/De_Boor%27s_algorithm"
      }
    ],
    "tag": "99SCT623E8",
    "uses": [
      "62AFX32JGT",
      "WVD069C7QF",
      "21SXYJYC59"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/99SCT623E8/",
  "links": [
    {
      "field": "defines",
      "target": "5JHFB384BF"
    },
    {
      "field": "uses",
      "target": "62AFX32JGT"
    },
    {
      "field": "uses",
      "target": "WVD069C7QF"
    },
    {
      "field": "uses",
      "target": "21SXYJYC59"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/99SCT623E8.md",
  "msc": [
    "65D07",
    "41A15",
    "65D17"
  ],
  "name": "de Boor's algorithm",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/99S/99SCT623E8.md",
  "status": null,
  "tag": "99SCT623E8",
  "uri": "m2://99SCT623E8",
  "url": "https://tamnd.github.io/math2/wiki/de-boors-algorithm-definition/",
  "writing": {
    "tag": "99SCT623E8",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
