Home | History | Annotate | Download | only in bench

Lines Matching refs:Roots

48 template<typename Matrix, typename Roots>
49 inline void computeRoots(const Matrix& m, Roots& roots)
56 // eigenvalues are the roots to this equation, all guaranteed to be
62 // Construct the parameters used in classifying the roots of the equation
63 // and in solving the equation for the roots in closed form.
75 // Compute the eigenvalues by solving for the roots of the polynomial.
80 roots(0) = c2_over_3 + Scalar(2)*rho*cos_theta;
81 roots(1) = c2_over_3 - rho*(cos_theta + s_sqrt3*sin_theta);
82 roots(2) = c2_over_3 - rho*(cos_theta - s_sqrt3*sin_theta);
85 if (roots(0) >= roots(1))
86 std::swap(roots(0),roots(1));
87 if (roots(1) >= roots(2))
89 std::swap(roots(1),roots(2));
90 if (roots(0) >= roots(1))
91 std::swap(roots(0),roots(1));