Class Newton

java.lang.Object
  extended byNewton
All Implemented Interfaces:
InterpolationImpl

public class Newton
extends java.lang.Object
implements InterpolationImpl

Interpoltation de Newton

Author:
Tachouct Mustapha

Field Summary
private  double[] A
          les Ai
private  double[][] DD
          le tableau des differences divisées
private  double[] F
          les Fi
private  int MAX_N
          le nombre de points maximum
private  int N
          le nombre de points
private  long time
          le temps de calcul
private  double[] X
          les Xi
 
Constructor Summary
(package private) Newton(double[] x, double[] f)
          constructeur
(package private) Newton(double[] x, double[] f, int n)
          contructeur
 
Method Summary
 void addPoint(double x, double fx)
          ajoute un point sans tout recalculer
 double getError(double x, double M)
          retourne l'erreur
 Polynome getPolynome()
          retourne un vrai polynome de degree N
 double P(double x)
          retourne P(x) ou f(x)
 void print(java.lang.String info)
          affiche des information sur le polynome
private  void setA()
          intialise les Ai
private  void setDD()
          initialise le tableau des differences divisées
 void setTime()
           
 java.lang.String toString()
           
 java.lang.String toString(java.lang.String str, int n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

X

private double[] X
les Xi


F

private double[] F
les Fi


A

private double[] A
les Ai


DD

private double[][] DD
le tableau des differences divisées


N

private int N
le nombre de points


MAX_N

private int MAX_N
le nombre de points maximum


time

private long time
le temps de calcul

Constructor Detail

Newton

Newton(double[] x,
       double[] f)
constructeur


Newton

Newton(double[] x,
       double[] f,
       int n)
contructeur

Method Detail

setA

private void setA()
intialise les Ai


setDD

private void setDD()
initialise le tableau des differences divisées


print

public void print(java.lang.String info)
affiche des information sur le polynome


P

public double P(double x)
Description copied from interface: InterpolationImpl
retourne P(x) ou f(x)

Specified by:
P in interface InterpolationImpl

addPoint

public void addPoint(double x,
                     double fx)
ajoute un point sans tout recalculer

Specified by:
addPoint in interface InterpolationImpl

getPolynome

public Polynome getPolynome()
retourne un vrai polynome de degree N

Specified by:
getPolynome in interface InterpolationImpl

getError

public double getError(double x,
                       double M)
retourne l'erreur


toString

public java.lang.String toString()

setTime

public void setTime()

toString

public java.lang.String toString(java.lang.String str,
                                 int n)