MCPcopy Create free account
hub / github.com/ceres-solver/ceres-solver / CreateReducedProgram

Method CreateReducedProgram

internal/ceres/program.cc:287–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287std::unique_ptr<Program> Program::CreateReducedProgram(
288 std::vector<double*>* removed_parameter_blocks,
289 double* fixed_cost,
290 std::string* error) const {
291 CHECK(removed_parameter_blocks != nullptr);
292 CHECK(fixed_cost != nullptr);
293 CHECK(error != nullptr);
294
295 std::unique_ptr<Program> reduced_program = std::make_unique<Program>(*this);
296 if (!reduced_program->RemoveFixedBlocks(
297 removed_parameter_blocks, fixed_cost, error)) {
298 return nullptr;
299 }
300
301 reduced_program->SetParameterOffsetsAndIndex();
302 return reduced_program;
303}
304
305bool Program::RemoveFixedBlocks(std::vector<double*>* removed_parameter_blocks,
306 double* fixed_cost,

Callers 3

PreprocessMethod · 0.80
PreprocessMethod · 0.80
TESTFunction · 0.80

Calls 2

RemoveFixedBlocksMethod · 0.80

Tested by 1

TESTFunction · 0.64