Home
last modified time | relevance | path

Searched refs:residuals (Results 1 – 25 of 76) sorted by relevance

1234

/external/ceres-solver/include/ceres/
Dnumeric_diff_functor.h144 bool operator()(const double* x0, double* residuals) const { in operator()
145 return functor_(x0, residuals); in operator()
150 double* residuals) const { in operator()
151 return functor_(x0, x1, residuals); in operator()
157 double* residuals) const { in operator()
158 return functor_(x0, x1, x2, residuals); in operator()
165 double* residuals) const { in operator()
166 return functor_(x0, x1, x2, x3, residuals); in operator()
174 double* residuals) const { in operator()
175 return functor_(x0, x1, x2, x3, x4, residuals); in operator()
[all …]
Ddynamic_numeric_diff_cost_function.h101 double* residuals, in Evaluate() argument
112 const bool status = EvaluateCostFunctor(parameters, residuals); in Evaluate()
139 residuals, in Evaluate()
197 ResidualVector residuals(num_residuals); in EvaluateJacobianForParameterBlock()
198 if (!EvaluateCostFunctor(parameters, &residuals[0])) { in EvaluateJacobianForParameterBlock()
207 parameter_jacobian.col(j).matrix() = residuals; in EvaluateJacobianForParameterBlock()
214 if (!EvaluateCostFunctor(parameters, &residuals[0])) { in EvaluateJacobianForParameterBlock()
219 parameter_jacobian.col(j) -= residuals; in EvaluateJacobianForParameterBlock()
235 double* residuals) const { in EvaluateCostFunctor() argument
238 residuals, in EvaluateCostFunctor()
[all …]
Dcost_function_to_functor.h153 bool operator()(const double* x0, double* residuals) const { in operator()
165 return cost_function_->Evaluate(&x0, residuals, NULL); in operator()
170 double* residuals) const { in operator()
184 return cost_function_->Evaluate(parameter_blocks.get(), residuals, NULL); in operator()
190 double* residuals) const { in operator()
205 return cost_function_->Evaluate(parameter_blocks.get(), residuals, NULL); in operator()
212 double* residuals) const { in operator()
228 return cost_function_->Evaluate(parameter_blocks.get(), residuals, NULL); in operator()
236 double* residuals) const { in operator()
253 return cost_function_->Evaluate(parameter_blocks.get(), residuals, NULL); in operator()
[all …]
/external/ceres-solver/internal/ceres/
Dcorrector_test.cc59 double residuals = sqrt(3.0); in TEST() local
61 double sq_norm = residuals * residuals; in TEST()
72 residuals * sqrt(kRho[1]) / (1 - kAlpha); in TEST()
79 c.CorrectJacobian(1.0, 1.0, &residuals, &jacobian); in TEST()
80 c.CorrectResiduals(1.0, &residuals); in TEST()
82 ASSERT_NEAR(residuals, kExpectedResidual, 1e-6); in TEST()
87 double residuals = 0.0; in TEST() local
89 double sq_norm = residuals * residuals; in TEST()
100 const double kExpectedResidual = residuals * sqrt(kRho[1]); in TEST()
106 c.CorrectJacobian(1, 1, &residuals, &jacobian); in TEST()
[all …]
Dnumeric_diff_test_utils.cc47 double* residuals) const { in operator ()()
48 residuals[0] = residuals[1] = residuals[2] = 0; in operator ()()
50 residuals[0] += x1[i] * x2[i]; in operator ()()
51 residuals[2] += x2[i] * x2[i]; in operator ()()
53 residuals[1] = residuals[0] * residuals[0]; in operator ()()
68 double residuals[3] = {-1e-100, -2e-100, -3e-100 }; in ExpectCostFunctionEvaluationIsNearlyCorrect() local
71 &residuals[0], in ExpectCostFunctionEvaluationIsNearlyCorrect()
74 EXPECT_EQ(residuals[0], 67); in ExpectCostFunctionEvaluationIsNearlyCorrect()
75 EXPECT_EQ(residuals[1], 4489); in ExpectCostFunctionEvaluationIsNearlyCorrect()
76 EXPECT_EQ(residuals[2], 213); in ExpectCostFunctionEvaluationIsNearlyCorrect()
[all …]
Dresidual_block_test.cc56 double* residuals, in Evaluate() argument
59 residuals[i] = i; in Evaluate()
112 double residuals[3]; in TEST() local
113 residual_block.Evaluate(true, &cost, residuals, NULL, scratch); in TEST()
115 EXPECT_EQ(0.0, residuals[0]); in TEST()
116 EXPECT_EQ(1.0, residuals[1]); in TEST()
117 EXPECT_EQ(2.0, residuals[2]); in TEST()
121 VectorRef(residuals, 3).setConstant(0.0); in TEST()
137 residual_block.Evaluate(true, &cost, residuals, jacobian_ptrs, scratch); in TEST()
139 EXPECT_EQ(0.0, residuals[0]); in TEST()
[all …]
Ddynamic_autodiff_cost_function_test.cc52 bool operator()(T const* const* parameters, T* residuals) const { in operator ()()
56 residuals[r++] = T(i) - params0[i]; in operator ()()
57 residuals[r++] = params0[i] - T(i); in operator ()()
69 residuals[r++] = c_residual; in operator ()()
84 vector<double> residuals(21, -100000); in TEST() local
89 residuals.data(), in TEST()
92 EXPECT_EQ(1.0 * r, residuals.at(r * 2)); in TEST()
93 EXPECT_EQ(-1.0 * r, residuals.at(r * 2 + 1)); in TEST()
95 EXPECT_EQ(0, residuals.at(20)); in TEST()
112 vector<double> residuals(21, -100000); in TEST() local
[all …]
Ddynamic_numeric_diff_cost_function_test.cc52 bool operator()(double const* const* parameters, double* residuals) const { in operator ()()
56 residuals[r++] = i - params0[i]; in operator ()()
57 residuals[r++] = params0[i] - i; in operator ()()
69 residuals[r++] = c_residual; in operator ()()
84 vector<double> residuals(21, -100000); in TEST() local
89 residuals.data(), in TEST()
92 EXPECT_EQ(1.0 * r, residuals.at(r * 2)); in TEST()
93 EXPECT_EQ(-1.0 * r, residuals.at(r * 2 + 1)); in TEST()
95 EXPECT_EQ(0, residuals.at(20)); in TEST()
113 vector<double> residuals(21, -100000); in TEST() local
[all …]
Dcost_function_to_functor_test.cc63 scoped_array<double> residuals(new double[num_residuals]); in ExpectCostFunctionsAreEqual() local
87 residuals.get(), NULL)); in ExpectCostFunctionsAreEqual()
91 EXPECT_NEAR(residuals[i], actual_residuals[i], kTolerance) in ExpectCostFunctionsAreEqual()
97 residuals.get(), in ExpectCostFunctionsAreEqual()
103 EXPECT_NEAR(residuals[i], actual_residuals[i], kTolerance) in ExpectCostFunctionsAreEqual()
117 bool operator()(const T* x1, T* residuals) const { in operator ()()
118 residuals[0] = x1[0] * x1[0]; in operator ()()
119 residuals[1] = x1[1] * x1[1]; in operator ()()
127 bool operator()(const T* x1, const T* x2, T* residuals) const { in operator ()()
128 residuals[0] = x1[0] * x1[0] + x2[0] * x2[0]; in operator ()()
[all …]
Dresidual_block_utils_test.cc61 double residuals; in CheckEvaluation() local
67 &residuals, in CheckEvaluation()
77 double* residuals, in Evaluate() argument
79 residuals[0] = 1; in Evaluate()
92 double* residuals, in Evaluate() argument
106 double* residuals, in Evaluate() argument
108 residuals[0] = 1; in Evaluate()
120 double* residuals, in Evaluate() argument
122 residuals[0] = std::numeric_limits<double>::infinity(); in Evaluate()
133 double* residuals, in Evaluate() argument
[all …]
Dautodiff_cost_function_test.cc73 double residuals = 0.0; in TEST() local
75 cost_function->Evaluate(parameters, &residuals, NULL); in TEST()
76 EXPECT_EQ(10.0, residuals); in TEST()
77 cost_function->Evaluate(parameters, &residuals, jacobians); in TEST()
125 double residuals = 0.0; in TEST() local
127 cost_function->Evaluate(parameters, &residuals, NULL); in TEST()
128 EXPECT_EQ(45.0, residuals); in TEST()
130 cost_function->Evaluate(parameters, &residuals, jacobians); in TEST()
131 EXPECT_EQ(residuals, 45.0); in TEST()
Dcorrector.cc112 void Corrector::CorrectResiduals(const int num_rows, double* residuals) { in CorrectResiduals() argument
113 DCHECK(residuals != NULL); in CorrectResiduals()
115 VectorRef(residuals, num_rows) *= residual_scaling_; in CorrectResiduals()
120 double* residuals, in CorrectJacobian() argument
122 DCHECK(residuals != NULL); in CorrectJacobian()
146 r_transpose_j += jacobian[r * num_cols + c] * residuals[r]; in CorrectJacobian()
152 alpha_sq_norm_ * residuals[r] * r_transpose_j); in CorrectJacobian()
Dresidual_block.cc69 double* residuals, in Evaluate() argument
98 bool outputting_residuals = (residuals != NULL); in Evaluate()
100 residuals = scratch; in Evaluate()
108 InvalidateEvaluation(*this, cost, residuals, eval_jacobians); in Evaluate()
110 if (!cost_function_->Evaluate(parameters.get(), residuals, eval_jacobians)) { in Evaluate()
117 residuals, in Evaluate()
128 residuals, in Evaluate()
134 double squared_norm = VectorRef(residuals, num_residuals).squaredNorm(); in Evaluate()
184 residuals, in Evaluate()
192 correct.CorrectResiduals(num_residuals, residuals); in Evaluate()
Dnumeric_diff_test_utils.h46 bool operator()(const double* x1, const double* x2, double* residuals) const;
55 double* residuals, in Evaluate() argument
57 return functor_(parameters[0], parameters[1], residuals); in Evaluate()
71 bool operator()(const double* x1, const double* x2, double* residuals) const;
80 double* residuals, in Evaluate() argument
82 return functor_(parameters[0], parameters[1], residuals); in Evaluate()
Dnormal_prior_test.cc71 Vector residuals(num_rows); in TEST() local
74 prior.Evaluate(&x, residuals.data(), &jacobian); in TEST()
78 (residuals - A * (VectorRef(x, num_cols) - b)).squaredNorm(); in TEST()
110 Vector residuals(num_rows); in TEST() local
113 prior.Evaluate(&x, residuals.data(), jacobians); in TEST()
117 (residuals - A * (VectorRef(x, num_cols) - b)).squaredNorm(); in TEST()
120 prior.Evaluate(&x, residuals.data(), NULL); in TEST()
123 (residuals - A * (VectorRef(x, num_cols) - b)).squaredNorm(); in TEST()
Devaluator_test.cc62 double* residuals, in Evaluate() argument
65 residuals[i] = i + 1; in Evaluate()
149 Vector residuals(num_residuals); in EvaluateAndCompare() local
150 residuals.setConstant(-2000); in EvaluateAndCompare()
167 expected_residuals != NULL ? &residuals[0] : NULL, in EvaluateAndCompare()
183 &residuals[0], in EvaluateAndCompare()
195 (i & 1) ? expected.residuals : NULL, in CheckAllEvaluationCombinations()
570 double* residuals, in Evaluate() argument
574 residuals[0] = x1 * x1; in Evaluate()
575 residuals[1] = x2 * x2; in Evaluate()
[all …]
Dresidual_block_utils.cc49 double* residuals, in InvalidateEvaluation() argument
55 InvalidateArray(num_residuals, residuals); in InvalidateEvaluation()
67 double* residuals, in EvaluationToString() argument
70 CHECK_NOTNULL(residuals); in EvaluationToString()
89 AppendArrayToString(num_residuals, residuals, &result); in EvaluationToString()
118 double* residuals, in IsEvaluationValid() argument
123 if (!IsArrayValid(num_residuals, residuals)) { in IsEvaluationValid()
Devaluator.h98 vector<double>* residuals,
144 double* residuals,
153 double* residuals, in Evaluate() argument
159 residuals, in Evaluate()
Dresidual_block_utils.h57 double* residuals,
65 double* residuals,
74 double* residuals,
Dconditioned_cost_function.cc78 double* residuals, in Evaluate() argument
80 bool success = wrapped_cost_function_->Evaluate(parameters, residuals, in Evaluate()
103 double unconditioned_residual = residuals[r]; in Evaluate()
106 &residuals[r], in Evaluate()
Dtrust_region_minimizer_test.cc88 double* residuals, in Evaluate() argument
117 if (residuals != NULL) { in Evaluate()
118 residuals[0] = f1; in Evaluate()
119 residuals[1] = f2; in Evaluate()
120 residuals[2] = f3; in Evaluate()
121 residuals[3] = f4; in Evaluate()
318 double* residuals, in Evaluate() argument
320 residuals[0] = target_length_; in Evaluate()
329 residuals[0] -= sqrt(length); in Evaluate()
Dgradient_checking_cost_function_test.cc89 double* residuals, in Evaluate() argument
101 double f = *residuals = exp(-ax); in Evaluate()
274 double* residuals, in Evaluate() argument
277 residuals[i] = 1; in Evaluate()
295 double* residuals, in Evaluate() argument
298 residuals[i] = 2; in Evaluate()
318 double* residuals, in Evaluate() argument
321 residuals[i] = 3; in Evaluate()
/external/ceres-solver/include/ceres/internal/
Dnumeric_diff.h57 double* residuals, in EvaluateImpl() argument
64 residuals); in EvaluateImpl()
72 double* residuals, in EvaluateImpl() argument
74 return functor->Evaluate(parameters, residuals, NULL); in EvaluateImpl()
136 ResidualVector residuals(NUM_RESIDUALS); in EvaluateJacobianForParameterBlock()
144 functor, parameters, residuals.data(), functor)) { in EvaluateJacobianForParameterBlock()
152 parameter_jacobian.col(j) = residuals; in EvaluateJacobianForParameterBlock()
160 functor, parameters, residuals.data(), functor)) { in EvaluateJacobianForParameterBlock()
164 parameter_jacobian.col(j) -= residuals; in EvaluateJacobianForParameterBlock()
/external/ceres-solver/examples/
Dsnavely_reprojection_error.h60 T* residuals) const { in operator()
88 residuals[0] = predicted_x - T(observed_x); in operator()
89 residuals[1] = predicted_y - T(observed_y); in operator()
121 T* residuals) const { in operator()
151 residuals[0] = predicted_x - T(observed_x); in operator()
152 residuals[1] = predicted_y - T(observed_y); in operator()
Dellipse_approximation.cc287 double* residuals, in Evaluate() argument
299 residuals[0] = y_[0] - ((1.0 - u) * x[1 + i0][0] + u * x[1 + i1][0]); in Evaluate()
300 residuals[1] = y_[1] - ((1.0 - u) * x[1 + i0][1] + u * x[1 + i1][1]); in Evaluate()
344 bool operator()(const T* x0, const T* x1, T* residuals) const { in operator ()()
345 residuals[0] = T(sqrt_weight_) * (x0[0] - x1[0]); in operator ()()
346 residuals[1] = T(sqrt_weight_) * (x0[1] - x1[1]); in operator ()()

1234