public class Tool4Math
extends java.lang.Object
Tool4Math
class provides mathematics functions.Constructor and Description |
---|
Tool4Math()
The constructor
Tool4Math creates a new instance(object) of the class. |
Modifier and Type | Method and Description |
---|---|
double |
calcAverageValue(double[] val)
The method
calcAverageValue calculates the average value. |
double |
calcStandardDeviation(double[] val,
java.lang.Double aver)
The method
calcStandardDeviation calculates the standard deviation. |
java.util.ArrayList |
intersectLines(double l1_x1,
double l1_y1,
double l1_x2,
double l1_y2,
double l2_x1,
double l2_y1,
double l2_x2,
double l2_y2,
boolean outside_test)
The method
intersectLines calculates the intersection of two lines. |
double[] |
quickSort(double[] xvalue)
The method
quickSort fast sort of an array. |
java.util.ArrayList |
quickSort(double[] xvalue,
double[] x2value)
The method
quickSort fast sort of an array. |
java.util.ArrayList |
quickSort(double[] xvalue,
java.lang.String[] x3value)
The method
quickSort fast sort of an array. |
java.lang.String[] |
quickSort(java.lang.String[] xvalue)
The method
quickSort fast sort of an array. |
double |
twoPointFormLinearEquation(double x,
double x1,
double y1,
double x2,
double y2)
The method
twoPointFormLinearEquation calculates two point form of the linear equation. |
public static final int NO_VALUES
public int errCode
public Tool4Math()
Tool4Math
creates a new instance(object) of the class.public double calcAverageValue(double[] val) throws java.lang.Exception
calcAverageValue
calculates the average value.val
- the array of values.java.lang.Exception
- if errorpublic double calcStandardDeviation(double[] val, java.lang.Double aver) throws java.lang.Exception
calcStandardDeviation
calculates the standard deviation.val
- the array of values.aver
- the average value.java.lang.Exception
- if errorpublic java.util.ArrayList quickSort(double[] xvalue, java.lang.String[] x3value)
quickSort
fast sort of an array.xvalue
- the array to be sorted.x3value
- the array to be sorted in conjunction with xvalue.public java.util.ArrayList quickSort(double[] xvalue, double[] x2value)
quickSort
fast sort of an array.xvalue
- the array to be sorted.x2value
- the array to be sorted in conjunction with xvalue.public double[] quickSort(double[] xvalue)
quickSort
fast sort of an array.xvalue
- the array to be sorted.public java.lang.String[] quickSort(java.lang.String[] xvalue)
quickSort
fast sort of an array.xvalue
- the array to be sorted.public double twoPointFormLinearEquation(double x, double x1, double y1, double x2, double y2)
twoPointFormLinearEquation
calculates two point form of the linear equation.x
- the function parameter.x1
- the first x coordinate.y1
- the first y coordinate.x2
- the second x coordinate.y2
- the second y coordinate.public java.util.ArrayList intersectLines(double l1_x1, double l1_y1, double l1_x2, double l1_y2, double l2_x1, double l2_y1, double l2_x2, double l2_y2, boolean outside_test) throws java.lang.IllegalArgumentException
intersectLines
calculates the intersection of two lines.l1_x1
- x 1 line 1.l1_y1
- y 1 line 1.l1_x2
- x 2 line 1.l1_y2
- y 2 line 1.l2_x1
- x 1 line 2.l2_y1
- y 1 line 2.l2_x2
- x 2 line 2.l2_y2
- y 2 line 2.outside_test
- do the outside test.java.lang.IllegalArgumentException
- if error