public class Tool4Polynom
extends java.lang.Object
Tool4Polynom
class provides functions for polynomial processing.
title: SystemCoreLib
description: SystemCoreLib
copyright: (c) 2011 thomas kaffka, born at 11/08/1959 in düsseldorf - germany , all rights reserved.
Constructor and Description |
---|
Tool4Polynom(java.util.Vector data,
java.util.ArrayList poly_lines)
The constructor
Tool4Polynom creates a new instance(object) of the class. |
Modifier and Type | Method and Description |
---|---|
void |
computeNewton()
The method
computeNewton use divided difference algorithm to
compute Newton form coefficients. |
void |
doPolynomMethod(double from,
double to,
int precision)
The method
doPolynomMethod approximates a data points with a polynom. |
void |
doPolynomMethod(double from,
double to,
int precision,
java.awt.Color color)
The method
doPolynomMethod approximates a data points with a polynom. |
void |
doSplineMethod(double from,
double to,
int precision)
The method
doSplineMethod approximates a data points with a spline function. |
void |
doSplineMethod(double from,
double to,
int precision,
java.awt.Color color)
The method
doSplineMethod approximates a data points with a spline function. |
double |
evaluatePolynomial(double t)
The method
evaluatePolynomial evaluate polynomial at t. |
double |
getMaxX() |
double |
getMaxY() |
double |
getMinX() |
double |
getMinY() |
double |
getPolynomValue(double t) |
double |
getSplineValue() |
void |
setSplineT(double t) |
public Tool4Polynom(java.util.Vector data, java.util.ArrayList poly_lines)
Tool4Polynom
creates a new instance(object) of the class.data
- the x and y values.poly_lines
- the lines of the graph (call by refernce).public double getMaxX()
public double getMaxY()
public double getMinX()
public double getMinY()
public double getPolynomValue(double t)
public void setSplineT(double t)
public double getSplineValue()
public void doPolynomMethod(double from, double to, int precision)
doPolynomMethod
approximates a data points with a polynom.from
- data point from.to
- data point to.precision
- the precision of the graph.public void doPolynomMethod(double from, double to, int precision, java.awt.Color color)
doPolynomMethod
approximates a data points with a polynom.from
- data point from.to
- data point to.precision
- the precision of the graph.color
- the color.public void computeNewton()
computeNewton
use divided difference algorithm to
compute Newton form coefficients.public double evaluatePolynomial(double t)
evaluatePolynomial
evaluate polynomial at t.t
- the x value.public void doSplineMethod(double from, double to, int precision)
doSplineMethod
approximates a data points with a spline function.from
- data point from.to
- data point to.precision
- the precision of the graph.public void doSplineMethod(double from, double to, int precision, java.awt.Color color)
doSplineMethod
approximates a data points with a spline function.from
- data point from.to
- data point to.precision
- the precision of the graph.color
- the color.