From 4b68a888eb2aa38a241a208d13b25169a2933b90 Mon Sep 17 00:00:00 2001 From: Krishna Vedala <7001608+kvedala@users.noreply.github.com> Date: Thu, 4 Jun 2020 12:34:52 -0400 Subject: [PATCH] update documentation --- numerical_methods/durand_kerner_roots.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/numerical_methods/durand_kerner_roots.cpp b/numerical_methods/durand_kerner_roots.cpp index e407a5734..424319329 100644 --- a/numerical_methods/durand_kerner_roots.cpp +++ b/numerical_methods/durand_kerner_roots.cpp @@ -1,6 +1,8 @@ /** * @file - * Compute riots of any given polynomial. + * \brief Compute all possible approximate roots of any given polynomial using + * [Durand Kerner + * algorithm](https://en.wikipedia.org/wiki/Durand%E2%80%93Kerner_method) * * Test the algorithm online: * https://gist.github.com/kvedala/27f1b0b6502af935f6917673ec43bcd7 @@ -85,6 +87,16 @@ bool check_termination(long double delta) { return false; } +/** + * Implements Durand Kerner iterative algorithm to compute all roots of a + * polynomial. + * + * \param[in] coeffs coefficients of the polynomial + * \param[out] roots the computed roots of the polynomial + * \param[in] write_log flag whether to save the log file (default = `false`) + * \returns pair of values - number of iterations taken and final accuracy + * achieved + */ std::pair durand_kerner_algo( const std::valarray &coeffs, std::valarray> *roots, bool write_log = false) {