Bspline

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/bspline. To experiment with that code, run bin/console for an interactive prompt.

TODO: Delete this and the text above, and describe your gem

Installation

Add this line to your application's Gemfile:

gem 'bspline'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bspline

Usage

  1. summary

Bspline interpolation - Ruby libraly

  1. usage in ruby script file

require 'bspline' include BSPLINE

obj = Bspline.new(..) ..

  1. class

Module 'BSPLINE' has 3 classes.

3.1 Basic interpolation without boundary condition

BSPLINE::Bspline.new([[x1,y1],..,[xn,yn]], j)

3.2 Interpolation with boundary condition by additional data points

BSPLINE::Bspline.new([[x1,y1],..,[xn,yn]], j, [[xn+1,yn+1],..,[xn+d,yn+d]])

3.3 Interpolation with boundary condition by differential value

BSPLINE::Bspline.new([[x1,y1],..,[xn,yn]], j, [[xn+1,yn+1],..,[xn+d,yn+d]], [b1,..,bd])

3.4 Interpolation with period boundary condition

BSPLINE::Tspline.new([[x0,y0],..,[xn,yn]], j)

3.5 Interpolation of smoothing spline

BSPLINE::Gspline.new([[x0,y0],..,[xn,yn]], j, g)

  1. Calculate interporation

4.1 Calculate interpolation

self[x] #=> y
self[x1,...,xi] #=> [y1,...yi]

4.2 Calculate interpolation with differential value

self.value(x, b = 0)

4.3 Calculate interpolation with integrated value

self.sekibun(x)

4.4 calculate an interpolation for graphs

self.plot([x0,...,xn], d, b = 0) { |x,y| ... }

See example/*.rb

Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/vsp2old/bspline.