|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.analysis.function.polynomial.root.Quadratic
public class Quadratic
This is a quadratic equation solver.
Solve
ax2 + bx + c = 0
The roots are:
-b SQRT(b2 - 4ac) -- ± ------------------ 2a 2a
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.numericalmethod.suanshu.analysis.function.polynomial.root.Solver |
|---|
Solver.RootFindingException, Solver.Type |
| Constructor Summary | |
|---|---|
Quadratic()
Construct a Solver instance to solve quadratic equations. |
|
| Method Summary | |
|---|---|
NumberList |
solve(Polynomial polynomial)
Solve ax2 + bx + c = 0 |
Solver.Type |
type()
Get the type of the solver. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Quadratic()
Solver instance to solve quadratic equations.
| Method Detail |
|---|
public Solver.Type type()
Solver
type in interface Solverpublic NumberList solve(Polynomial polynomial)
ax2 + bx + c = 0
solve in interface Solverpolynomial - the quadratic polynomial to solve
Number
java.lang.IllegalArgumentException - if the polynomial degree is not 2
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||