Lines Matching refs:problem
77 ProblemImpl problem;
82 problem.AddParameterBlock(&x, 1);
83 problem.AddParameterBlock(&y, 1);
84 problem.AddParameterBlock(&z, 1);
85 problem.AddResidualBlock(new UnaryCostFunction(), NULL, &x);
86 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &x, &y);
87 problem.AddResidualBlock(new TernaryCostFunction(), NULL, &x, &y, &z);
96 Program program(*problem.mutable_program());
108 ProblemImpl problem;
111 problem.AddParameterBlock(&x, 1);
112 problem.AddResidualBlock(new UnaryCostFunction(), NULL, &x);
113 problem.SetParameterBlockConstant(&x);
118 Program program(problem.program());
130 ProblemImpl problem;
135 problem.AddParameterBlock(&x, 1);
136 problem.AddParameterBlock(&y, 1);
137 problem.AddParameterBlock(&z, 1);
145 Program program(problem.program());
157 ProblemImpl problem;
162 problem.AddParameterBlock(&x, 1);
163 problem.AddParameterBlock(&y, 1);
164 problem.AddParameterBlock(&z, 1);
171 problem.AddResidualBlock(new UnaryCostFunction(), NULL, &x);
172 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &x, &y);
173 problem.SetParameterBlockConstant(&x);
176 Program program(problem.program());
188 ProblemImpl problem;
193 problem.AddParameterBlock(&x, 1);
194 problem.AddParameterBlock(&y, 1);
195 problem.AddParameterBlock(&z, 1);
196 problem.AddResidualBlock(new UnaryCostFunction(), NULL, &x);
197 problem.AddResidualBlock(new TernaryCostFunction(), NULL, &x, &y, &z);
198 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &x, &y);
199 problem.SetParameterBlockConstant(&x);
206 Program program(problem.program());
220 ProblemImpl problem;
225 problem.AddParameterBlock(&x, 1);
226 problem.AddParameterBlock(&y, 1);
227 problem.AddParameterBlock(&z, 1);
228 problem.AddResidualBlock(new UnaryIdentityCostFunction(), NULL, &x);
229 problem.AddResidualBlock(new TernaryCostFunction(), NULL, &x, &y, &z);
230 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &x, &y);
231 problem.SetParameterBlockConstant(&x);
239 Program program(problem.program());
265 ProblemImpl problem;
270 problem.AddParameterBlock(&x, 1);
271 problem.AddParameterBlock(&y, 1);
272 problem.AddParameterBlock(&z, 1);
274 problem.AddResidualBlock(new UnaryCostFunction(), NULL, &x);
275 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &z, &x);
276 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &z, &y);
277 problem.AddResidualBlock(new UnaryCostFunction(), NULL, &z);
278 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &x, &y);
279 problem.AddResidualBlock(new UnaryCostFunction(), NULL, &y);
291 problem.program().residual_blocks();
306 Program* program = problem.mutable_program();
312 problem.mutable_program(),
321 ProblemImpl problem;
326 problem.AddParameterBlock(&x, 1);
327 problem.AddParameterBlock(&y, 1);
328 problem.AddParameterBlock(&z, 1);
331 problem.SetParameterBlockConstant(&z);
334 problem.AddResidualBlock(new UnaryCostFunction(), NULL, &x); // 0 x
335 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &z, &x); // 1 x
336 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &z, &y); // 2
337 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &z, &y); // 3
338 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &x, &z); // 4 x
339 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &z, &y); // 5
340 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &x, &z); // 6 x
341 problem.AddResidualBlock(new UnaryCostFunction(), NULL, &y); // 7
356 SolverImpl::CreateReducedProgram(&options, &problem, NULL, &error));
359 problem.program().residual_blocks();
390 ProblemImpl problem;
395 problem.AddParameterBlock(&x, 1);
396 problem.AddParameterBlock(&y, 1);
397 problem.AddParameterBlock(&z, 1);
400 problem.SetParameterBlockConstant(&z);
402 problem.AddResidualBlock(new UnaryCostFunction(), NULL, &x);
403 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &z, &x);
404 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &z, &y);
405 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &z, &y);
406 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &x, &z);
407 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &z, &y);
408 problem.AddResidualBlock(new BinaryCostFunction(), NULL, &x, &z);
409 problem.AddResidualBlock(new UnaryCostFunction(), NULL, &y);
410 problem.AddResidualBlock(new UnaryCostFunction(), NULL, &z);
423 SolverImpl::CreateReducedProgram(&options, &problem, NULL, &error));
431 problem.program().residual_blocks();
447 ProblemImpl problem;
452 problem.AddParameterBlock(&x, 1);
453 problem.AddParameterBlock(&y, 1);
454 problem.AddParameterBlock(&z, 1);
460 Program program(problem.program());
462 EXPECT_FALSE(SolverImpl::ApplyUserOrdering(problem.parameter_map(),
469 ProblemImpl problem;
474 problem.AddParameterBlock(&x, 1);
475 problem.AddParameterBlock(&y, 1);
476 problem.AddParameterBlock(&z, 1);
483 Program* program = problem.mutable_program();
486 EXPECT_TRUE(SolverImpl::ApplyUserOrdering(problem.parameter_map(),
663 Problem::Options problem_options;
665 ProblemImpl problem(problem_options);
666 problem.AddResidualBlock(cost_function.get(), NULL, &x);
679 SolverImpl::Solve(options, &problem, &summary);
691 SolverImpl::Solve(options, &problem, &summary);
730 Problem::Options problem_options;
733 ProblemImpl problem(problem_options);
734 problem.AddResidualBlock(cost_function.get(), NULL, &x, &y, &z, &w);
735 problem.SetParameterBlockConstant(&x);
736 problem.SetParameterBlockConstant(&w);
742 SolverImpl::Solve(options, &problem, &summary);
752 EXPECT_EQ(&x, problem.program().parameter_blocks()[0]->state());
753 EXPECT_EQ(&y, problem.program().parameter_blocks()[1]->state());
754 EXPECT_EQ(&z, problem.program().parameter_blocks()[2]->state());
755 EXPECT_EQ(&w, problem.program().parameter_blocks()[3]->state());
764 EXPECT_EQ(summary.error, "Problem contains no parameter blocks.");
775 EXPECT_EQ(summary.error, "Problem contains no residual blocks.");
851 ProblemImpl problem;
856 problem.AddParameterBlock(x, 2);
857 problem.AddParameterBlock(y, 3);
858 problem.AddParameterBlock(&z, 1);
860 problem.AddResidualBlock(new MockCostFunctionBase<2, 2, 0, 0>(), NULL, x);
861 problem.AddResidualBlock(new MockCostFunctionBase<3, 1, 2, 0>(), NULL, &z, x);
862 problem.AddResidualBlock(new MockCostFunctionBase<4, 1, 3, 0>(), NULL, &z, y);
863 problem.AddResidualBlock(new MockCostFunctionBase<5, 1, 3, 0>(), NULL, &z, y);
864 problem.AddResidualBlock(new MockCostFunctionBase<1, 2, 1, 0>(), NULL, x, &z);
865 problem.AddResidualBlock(new MockCostFunctionBase<2, 1, 3, 0>(), NULL, &z, y);
866 problem.AddResidualBlock(new MockCostFunctionBase<2, 2, 1, 0>(), NULL, x, &z);
867 problem.AddResidualBlock(new MockCostFunctionBase<1, 3, 0, 0>(), NULL, y);
913 Program* program = problem.mutable_program();
953 ProblemImpl problem;
958 problem.AddParameterBlock(x + i, 1);
962 problem.AddResidualBlock(new NumParameterBlocksCostFunction<1, 20>(),
980 Program* program = problem.mutable_program();