Lines Matching refs:residual_block
50 #include "ceres/residual_block.h"
153 void ProblemImpl::InternalRemoveResidualBlock(ResidualBlock* residual_block) {
154 CHECK_NOTNULL(residual_block);
155 // Perform no check on the validity of residual_block, that is handled in
161 residual_block->NumParameterBlocks();
163 residual_block->parameter_blocks()[i]
164 ->RemoveResidualBlock(residual_block);
167 ResidualBlockSet::iterator it = residual_block_set_.find(residual_block);
170 DeleteBlockInVector(program_->mutable_residual_blocks(), residual_block);
178 void ProblemImpl::DeleteBlock(ResidualBlock* residual_block) {
183 residual_block->cost_function() != NULL) {
185 const_cast<CostFunction*>(residual_block->cost_function()));
188 residual_block->loss_function() != NULL) {
190 const_cast<LossFunction*>(residual_block->loss_function()));
192 delete residual_block;
500 void ProblemImpl::RemoveResidualBlock(ResidualBlock* residual_block) {
501 CHECK_NOTNULL(residual_block);
503 // Verify that residual_block identifies a residual in the current problem.
507 " 1) residual_block is uninitialised and points to a random "
509 " 2) residual_block represented a residual that was added to"
513 " 3) residual_block referred to a residual that has already "
515 residual_block);
517 CHECK(residual_block_set_.find(residual_block) !=
524 residual_block) != program_->residual_blocks().end())
528 InternalRemoveResidualBlock(residual_block);
549 ResidualBlock* residual_block =
551 const int num_parameter_blocks = residual_block->NumParameterBlocks();
553 if (residual_block->parameter_blocks()[j] == parameter_block) {
554 InternalRemoveResidualBlock(residual_block);
816 const ResidualBlockId residual_block,
818 int num_parameter_blocks = residual_block->NumParameterBlocks();
822 residual_block->parameter_blocks()[i]->mutable_user_state();
848 ResidualBlock* residual_block =
850 const int num_parameter_blocks = residual_block->NumParameterBlocks();
852 if (residual_block->parameter_blocks()[j] == parameter_block) {
853 residual_blocks->push_back(residual_block);