http://www.emgu.com
finds real roots of a cubic equation: coeffs[0]*x^3 + coeffs[1]*x^2 + coeffs[2]*x + coeffs[3] = 0 (if coeffs is 4-element vector) or x^3 + coeffs[0]*x^2 + coeffs[1]*x + coeffs[2] = 0 (if coeffs is 3-element vector)

Namespace: Emgu.CV
Assembly: Emgu.CV (in Emgu.CV.dll) Version: 2.4.10.1935 (2.4.10.1935)

Syntax

C#
public static int cvSolveCubic(
	IntPtr coeffs,
	IntPtr roots
)
Visual Basic
Public Shared Function cvSolveCubic ( 
	coeffs As IntPtr,
	roots As IntPtr
) As Integer
Visual C++
public:
static int cvSolveCubic(
	IntPtr coeffs, 
	IntPtr roots
)
F#
static member cvSolveCubic : 
        coeffs : IntPtr * 
        roots : IntPtr -> int 

Parameters

coeffs
Type: System..::..IntPtr
The equation coefficients, array of 3 or 4 elements
roots
Type: System..::..IntPtr
The output array of real roots. Should have 3 elements. Padded with zeros if there is only one root

Return Value

Type: Int32
the number of real roots found

See Also