mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Fix a typo in sampled_function.cc
Thanks to Pablo Speciale for reporting this. Change-Id: Icd526856f91dba98f7abf86b098b210a89556445
This commit is contained in:
@@ -68,7 +68,7 @@ int main(int argc, char** argv) {
|
||||
// Evaluate the function f(x) = (x - 4.5)^2;
|
||||
const int kNumSamples = 10;
|
||||
double values[kNumSamples];
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
for (int i = 0; i < kNumSamples; ++i) {
|
||||
values[i] = (i - 4.5) * (i - 4.5);
|
||||
}
|
||||
|
||||
@@ -84,5 +84,6 @@ int main(int argc, char** argv) {
|
||||
Solver::Summary summary;
|
||||
Solve(options, &problem, &summary);
|
||||
std::cout << summary.BriefReport() << "\n";
|
||||
std::cout << "Expected x: 4.5. Actual x : " << x << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user