Home > Industries > Finance
1, Commonsmath/commonslangmath
The above two packets are under Apache, the former is more powerful than the latter, the latter have the function before, the latter mainly to solve some of the usual procedures in the basic mathematical calculations, mainly in the range of Judgments (*range), random number generation (jvmrandom,randomutils), Fractional processing (fraction), digital conversion, size judgment (numberutils) and so on. The former can handle more complex data analysis (org.apache.commons.math.analysis), complex numbers (Org.apache.commons.math.complex), Distributed processing (org.apache.commons.math.distribution), Data prediction Estimation (org.apache.commons.math.estimation), fractions, genetics ( Org.apache.commons.math.genetics), Geometry (org.apache.commons.math.geometry), linear algebra (Org.apache.commons.math.linear), Optimization (org.apache.commons.math.optimization), Statistics (ORG.APACHE.COMMONS.MATH.STAT), Transfer (Org.apache.commons.math.transform ), and some common tool classes (Org.apache.commons.math.util).
Example: To find the intersection of two lines, the first two endpoints are (0,0), (1,1), the other two endpoints respectively (1,0), (0,1).
Train of thought: the intersection of a straight line is actually a solution of a twoyuan firsttime equation. The solution of the equation can actually be transformed into a matrix in linear algebra. such as 3x+y=4 and x+2y=3 this twoyuan equation. Convert to Matrix:
You can now use the Realmatrix of the bread org.apache.commons.math.geometry class.
Code:
Double[][] Coefficientsdata = {3, 1}, {1, 2}};
Realmatrix coefficients = new Realmatriximpl (coefficientsdata);
Double[] Constants = {4, 3};
Double[] Solution = Coefficients.solve (constants);
System.out.println ("Their intersections are: x=" + solution[0] + "; y=" + solution[1]);
Summary: If you want to use the appropriate functionality (for example, variance variance is in the statistics Stat package), you can see how to use the APIs and official examples in the corresponding packages.
2, Jsjava
This plugin, almost with the JS language rewrite the Apache Commons lang function, is actually above the Commonsmath JS version (Jsjavamath.js), mainly has
1) jsjavacore.js:include Jsjava core Classes
2) jsjavaajax.js:include Jsjava ajax Classes
3) jsjavaanim.js:include Jsjava animation classes
4) jsjavamath.js:include Jsjava math Classes
5) jsjavablog.js:include Jsjava Blog Classes
6) Jsjavacomp.js:include Jsjava components classes
7) Jsjavainfo.js:include Jsjava information classes
3, Jmathlib
Jmathlib is a Java open source class library used to compute complex mathematical expressions and graphically display the results of calculations. It is a clone of Matlab, Octave, Freemat, Scilab, but it is completely implemented by pure Java.
4, Matlab for Java
Provides Java interface to invoke some methods in MATLAB.
5, Jscience
The Jscience package is a powerful, Java™based physical and mathematical library that provides a single architecture for all development, designed to help build synergies across different scientific domains. It is mainly the synergy of physics, Mathematics and Economy 3 aspects.
6, Jama
It is mainly used to solve the Cholesky decomposition in basic linear algebra, eigenvalues and eigenvectors, Lu decomposition, matrix columns, singular value decomposition
Wait
Summary of JAMA capabilities 

Object manipulation 
Constructors 
Elementary Operations 
Addition 
Decompositions 
Cholesky 
Equation Solution 
Nonsingular Systems 
Derived quantities 
Condition number 
Here's an ax=b, 3x3 matrix, and then use Axb to detect overflow values.
Double[][] Array = {{1.,2.,3},{4.,5.,6.},{7.,8.,10.}};
Matrix A = new Matrix (array);
Matrix B = matrix.random (3,1);
Matrix x = a.solve (b);
Matrix residual = a.times (x). minus (b);
Double rnorm = Residual.norminf ();
7, Summary: Overall commonsmath/commonslangmath This is a good choice, documents and examples are more.