Home | History | Annotate | Download | only in ceres

Lines Matching refs:poly

50   Vector poly(1);
51 poly(0) = value;
52 return poly;
55 // Return the polynomial p(x) = poly(x) * (x - root).
56 Vector AddRealRoot(const Vector& poly, double root) {
57 Vector poly2(poly.size() + 1);
59 poly2.head(poly.size()) += poly;
60 poly2.tail(poly.size()) -= root * poly;
65 // p(x) = poly(x) * (x - real - imag*i) * (x - real + imag*i).
66 Vector AddComplexRootPair(const Vector& poly, double real, double imag) {
67 Vector poly2(poly.size() + 2);
69 // Multiply poly by x^2 - 2real + abs(real,imag)^2
70 poly2.head(poly.size()) += poly;
71 poly2.segment(1, poly.size()) -= 2 * real * poly;
72 poly2.tail(poly.size()) += (real*real + imag*imag) * poly;
95 Vector poly = ConstantPolynomial(1.23);
97 poly = AddRealRoot(poly, real_roots[i]);
101 bool success = FindPolynomialRoots(poly, real_ptr, imaginary_ptr);
118 // Vector poly(0) is an ambiguous constructor call, so
120 Vector poly(0, 1);
123 bool success = FindPolynomialRoots(poly, &real, &imag);
129 Vector poly = ConstantPolynomial(1.23);
132 bool success = FindPolynomialRoots(poly, &real, &imag);
173 Vector poly = ConstantPolynomial(1.23);
174 poly = AddComplexRootPair(poly, 42.42, 4.2);
175 bool success = FindPolynomialRoots(poly, &real, &imag);