GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - floswald/ApproXD.jl: B-splines and linear approximators in multiple dimensions for Julia

BranchesTags
Open more actions menu

Latest commit

 

History

79 Commits
79 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
test
test
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
Manifest.toml
Manifest.toml
 
 
Project.toml
Project.toml
 
 
README.md
README.md
 
 
REQUIRE
REQUIRE
 
 
question_5.png
question_5.png
 
 

Repository files navigation

ApproXD

Build Status Codecov

  • This package implements bspline and linear interpolation in julia
  • For most purposes, Interpolations.jl will be preferrable to this package.
  • However, there are some features which are available here, and not there.
    • the method getTensorCoef is a very efficient algorithm to compute approximating coefficients from a tensor product of basis matrices. it is efficient because it never forms the tensor product.
    • the package allows low-level access to objects such as spline knot vectors. Suppose you want to have a knot vector with a knot multiplicity in the interior knot span to approximate a kink. For example,
    knots = vcat(lb,-0.5,0,0,0.5,ub)
    is a valid knot vector.
  • Documentation is non-existent. Please look at the tests. Sorry.

Example

using ApproXD
f(x) = abs.(x).^0.5
lb,ub = (-1.0,1.0)
nknots = 13
deg = 3

# standard case: equally spaced knots
params1 = BSpline(nknots,deg,lb,ub)   
nevals = 5 * params1.numKnots # get nBasis < nEvalpoints

# myknots with knot multiplicity at 0
myknots = vcat(range(-1,stop = -0.1,length = 5),0,0,0,  range(0.1,stop = 1,length =5))
params2 = BSpline(myknots,deg)  # 0: no derivative

# get coefficients for each case
eval_points = collect(range(lb,stop = ub,length = nevals))  
c1 = getBasis(eval_points,params1) \ f(eval_points)
c2 = getBasis(eval_points,params2) \ f(eval_points)

# look at errors over entire interval
test_points = collect(range(lb,stop = ub,length = 1000));
truth = f(test_points);
p1 = getBasis(test_points,params1) * c1;
p2 = getBasis(test_points,params2) * c2;
e1 = p1 - truth;
e2 = p2 - truth;

About

B-splines and linear approximators in multiple dimensions for Julia

Resources

Readme
MIT license
Activity

Stars

28 stars

Watchers

4 watching

Forks

4 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.