Class CubicRealRootFinder
- java.lang.Object
-
- com.opengamma.strata.math.impl.rootfinding.CubicRealRootFinder
-
- All Implemented Interfaces:
Polynomial1DRootFinder<Double>
public class CubicRealRootFinder extends Object implements Polynomial1DRootFinder<Double>
Root finder that calculates the roots of a cubic equation usingCubicRootFinder
and returns only the real roots. If there are no real roots, an exception is thrown.
-
-
Constructor Summary
Constructors Constructor Description CubicRealRootFinder()
-
-
-
Method Detail
-
getRoots
public Double[] getRoots(RealPolynomialFunction1D function)
- Specified by:
getRoots
in interfacePolynomial1DRootFinder<Double>
- Parameters:
function
- The function, not null- Returns:
- The roots of the function
-
-