rvql / gospline

A golang library for spline interpolation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gospline

Golang cubic spline library

This library generates a cubic spline for given points.

Usage

Create a cubic spline

s := gospline.NewCubicSpline([]float64{0, 1, 2, 3}, []float64{0, 0.5, 2, 1.5})

Get an interpolated value

s.At(3.5)

Get an array of interpolated values

s.Range(0, 3, 0.25)

Supported boundaries

First derivation boundary: gospline.NewClampedCubicSpline

Second derivation boundary: gospline.NewNaturalCubicSpline

Installation

Just go get github.com/cnkei/gospline

About

A golang library for spline interpolation

License:MIT License


Languages

Language:Go 100.0%