Rootfinding Result — cxroots 1.1.0 documentation

# Rootfinding Result

class `cxroots.RootResult.` `RootResult`

  A class which stores the roots and their multiplicites as attributes and provides convienent methods for displaying them.

  `roots`

    list – List of roots

  `multiplicities`

    list – List of multiplicities where the ith element of the list is the multiplicity of the ith element of roots.

  `originalContour`

    Contour – The contour bounding the region in which the roots were found.

  `show`(saveFile=None)

    Plot the roots and the initial integration contour in the complex plane.

    Parameters: | saveFile (str, optional) – If provided the plot of the roots will be saved with file name saveFile instead of being shown.

    Example

        from cxroots import Circle
        C = Circle(0, 2)
        f = lambda z: z**6 + z**3
        df = lambda z: 6*z**5 + 3*z**2
        r = C.roots(f, df)
        r.show()

    (Source code, png, hires.png, pdf)