Skip to content

A java library for numerical interpolation featuring Lagrangian, Linear & Cubic Splines methods with error analysis based on Gauss-Legendre L2-Norm.

Notifications You must be signed in to change notification settings

IgorGreenIGM/Interpolation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Numerical Interpolation

Status License

A Java project for performing numerical interpolations, featuring implementations of Lagrangian polynomial interpolation, linear spline interpolation, and cubic spline interpolation.

Features

  • Polynomial: A complete Polynomial management module.
  • Lagrangian Polynomial Interpolation: Estimate values between known data points using polynomials.
  • Linear Spline Interpolation: Piecewise linear approach ensuring continuity.
  • Cubic Spline Interpolation: Piecewise cubic polynomial approach providing smoother transitions.
  • Integration Error: Provide a method to evaluate interpolations error.

Getting Started

Prerequisites

  • Java Development Kit (JDK) installed on your system. (version >= 17)

Installation

Clone this repository:

git clone https://github.com/igorgreenigm/interpolation.git

Navigate to the project directory:

cd interpolation

You can compile directly the Java files:

javac src/*.java

Or, Open project with intelliJ IDE or directly import classes in your own project.

Usage

To use this library in your project, include the provided classes. Detailed usage instructions and examples are available in the code comments.

The function $f$ used in the interpolation examples is defined as: $f(x) = \frac{1}{1 + 25x^2}$

All interpolations

all interpolation

Lagrangian + Tchebyshev interpolations

Lagrangian interpolation

Errors by interpolation

Error is computed using the formula $\sqrt{\int_a^b \left( f(x) - p(x) \right)^2dx}$ :

  • $f$ is the function to interpolate.
  • $p$ the interpolation polynomial (or set of polynomial for splines).
  • $[a, b]$ is the interval of distibuted samples.

errors

Contributing

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A java library for numerical interpolation featuring Lagrangian, Linear & Cubic Splines methods with error analysis based on Gauss-Legendre L2-Norm.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages