public class Rational
extends java.lang.Object
Constructor and Description |
---|
Rational(double[] _num,
double _den)
Class constructor: Set numerator and denominator of a rational function
|
Rational(double[] _num,
double[] _den)
Class constructor: Set numerator and denominator of a rational function
|
Rational(double _num,
double _den)
Class constructor: Set numerator and denominator of a rational function
|
Rational(double _num,
double[] _den)
Class constructor: Set numerator and denominator of a rational function
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
axes_intersection_points()
Calculate Axes intersection points
|
Rational |
der()
Calculate the derivative of a rational function
|
static Rational |
difference(Rational R1,
Rational R2)
Calculate the difference of two rational functions
|
java.lang.String |
domain()
Calculate the domain of a rational function
|
java.lang.String |
features()
See the features of this Rational function
|
double[] |
getDen()
Get denominator
|
double[] |
getNum()
Get numerator
|
double[] |
getOutOfDomain()
Get out of domain points
|
java.lang.String |
horizontal_asymptotes()
Determine horizontal asymptotes
|
java.lang.String |
integral()
Calculate the integral of a Rational function
|
double |
integral(double a,
double b)
Calculate the integral of a Rational function (Simpson's rule)
|
double[] |
integration_constants()
Calculate constants of different partial fractions
|
java.lang.String |
min_max()
Find min, max points of this Rational function
|
Rational |
monic_denominator()
Make denominator as monic polynomial
|
java.lang.String |
oblique_asymptotes()
Determine oblique asymptotes
|
void |
plot(double a,
double b)
Rational function plot (matplotlib)
|
static Rational |
product(Rational R1,
Rational R2)
Calculate the product of two rational functions
|
java.lang.String |
ps()
Calculate the positivity set of a rational function
|
static Rational |
reciprocal(Rational R1)
Calculate reciprocal of a rational function
|
double[] |
roots_multiset()
Calculate the set of roots of a rational function (the merged vector of numerator roots and denominator roots)
|
double[] |
roots()
Calculate the set of roots of a rational function
|
void |
setOutOfDomain(double[] out_of_domain)
Set out of domain points
|
static double[] |
simplify_den(double[] num,
double[] den,
boolean monic_den)
Simplify a rational function: this method returns the simplified numerator
|
static double[] |
simplify_num(double[] num,
double[] den,
boolean monic_den)
Simplify a rational function: this method returns the simplified numerator
|
Rational |
simplify(boolean monic_den)
Simplify a rational function
|
static Rational |
sum(Rational R1,
Rational R2)
Calculate the sum of two rational functions
|
java.lang.String |
toPlot()
Write matplotlib code to plot a rational function
|
java.lang.String |
toString()
toString() method of rational function: It makes one-line String to explain the function
|
java.lang.String |
toString(boolean dec)
toString() method of a rational function
|
double |
value(double x)
Rational function value in x
|
java.lang.String |
vertical_asymptotes()
Determine vertical asymptotes
|
public Rational(double[] _num, double[] _den)
_num
- polynomial components array, e.g. x^2-4 : {1,0,-4}_den
- polynomial components array, e.g. x-4 : {1,-4}public Rational(double _num, double[] _den)
_num
- real number_den
- polynomial components array, e.g. x-4 : {1,-4}public Rational(double[] _num, double _den)
_num
- polynomial components array, e.g. x^2-4 : {1,0,-4}_den
- real numberpublic Rational(double _num, double _den)
_num
- real number_den
- real numberpublic double integral(double a, double b) throws KingfisherExc
a
- lower bound of interval e.g [4,10] you must insert 4b
- upper bound of interval e.g [4,10] you must insert 10KingfisherExc
public java.lang.String integral()
public Rational simplify(boolean monic_den)
monic_den
- If this boolean value is true, the method makes denominator a monic polynomialpublic static double[] simplify_num(double[] num, double[] den, boolean monic_den)
num
- Numerator of Rational function to simplifyden
- Denominator of Rational function to simplifymonic_den
- If this boolean value is true, the method makes denominator a monic polynomialpublic static double[] simplify_den(double[] num, double[] den, boolean monic_den)
num
- Numerator of Rational function to simplifyden
- Denominator of Rational function to simplifymonic_den
- If this boolean value is true, the method makes denominator a monic polynomialpublic Rational der()
public java.lang.String axes_intersection_points()
public double value(double x) throws KingfisherExc
x
- real numberKingfisherExc
public java.lang.String domain()
public double[] roots()
public double[] roots_multiset()
public static Rational sum(Rational R1, Rational R2)
R1
- first functionR2
- second functionpublic static Rational difference(Rational R1, Rational R2)
R1
- first functionR2
- second functionpublic static Rational product(Rational R1, Rational R2)
R1
- first functionR2
- second functionpublic static Rational reciprocal(Rational R1)
R1
- rational functionpublic java.lang.String ps() throws KingfisherExc
KingfisherExc
public java.lang.String toPlot()
public void plot(double a, double b)
a
- lower bound of interval e.g [4,10] you must insert 4b
- upper bound of interval e.g [4,10] you must insert 10public java.lang.String toString(boolean dec) throws KingfisherExc
dec
- If this boolean value is true, the method writes the function such as a ratio of two decomposed polynomialsKingfisherExc
public Rational monic_denominator()
public java.lang.String horizontal_asymptotes()
public java.lang.String vertical_asymptotes()
public java.lang.String oblique_asymptotes()
public double[] integration_constants() throws KingfisherExc
KingfisherExc
public java.lang.String min_max()
public java.lang.String toString()
toString
in class java.lang.Object
public double[] getNum()
public double[] getDen()
public double[] getOutOfDomain()
public java.lang.String features()
public void setOutOfDomain(double[] out_of_domain)
out_of_domain
-