Categorygithub.com/gomlx/bsplines
modulepackage
0.2.0
Repository: https://github.com/gomlx/bsplines.git
Documentation: pkg.go.dev

# README

B-Spline function support for Go

GoDev GitHub

Example With Plots

This library provides 2 implementations of B-Spline using the same API: one that evaluates fully in Go (CPU, slower) and one using GoMLX for ML and/or accelerators.

Highlights:

Changes Log

v0.2.0

  • Moved GoMLX code to github.com/gomlx/gomlx/ml/layers/kan, to avoid circular dependency across repositories.

# Packages

Package plotly implements plotting in Jupyter Notebooks using [github.com/janpfeifer/gonb] (Notebook Kernel) and the Plotly [github.com/MetalBlueberry/go-plotly] library.

# Functions

New create a new B-spline with the given [degree] (`order == degree+1`).
NewRegular creates a new B-spline that is defined with enough knots for [numControlPoints].

# Constants

ExtrapolateConstant configures a B-spline to take the constant value of the first/last control point outside the knots.
ExtrapolateLinear configures a B-spline to extrapolate linearly outside the first/last control point outside the knots.
ExtrapolateZero configures a B-spline to take value of 0 outside the knots.

# Structs

BSpline contains the basic configuration of a B-spline.

# Type aliases

ExtrapolationType defines how a B-spline should behave outside the knots (for x < knots[0] or x > knots[-1]).