Remove ParameterBlock::state_offset as it is not used.
Change-Id: I3d6fbe333dde73ceb4c6c5e01460aa997883889f
diff --git a/internal/ceres/parameter_block.h b/internal/ceres/parameter_block.h
index f20805c..dd69cd6 100644
--- a/internal/ceres/parameter_block.h
+++ b/internal/ceres/parameter_block.h
@@ -112,10 +112,6 @@
int index() const { return index_; }
void set_index(int index) { index_ = index; }
- // This parameter offset inside a larger state vector.
- int state_offset() const { return state_offset_; }
- void set_state_offset(int state_offset) { state_offset_ = state_offset; }
-
// This parameter offset inside a larger delta vector.
int delta_offset() const { return delta_offset_; }
void set_delta_offset(int delta_offset) { delta_offset_ = delta_offset; }
@@ -176,14 +172,13 @@
string ToString() const {
return StringPrintf("{ user_state=%p, state=%p, size=%d, "
- "constant=%d, index=%d, state_offset=%d, "
+ "constant=%d, index=%d, "
"delta_offset=%d }",
user_state_,
state_,
size_,
is_constant_,
index_,
- state_offset_,
delta_offset_);
}
@@ -202,7 +197,6 @@
}
index_ = -1;
- state_offset_ = -1;
delta_offset_ = -1;
}
@@ -255,9 +249,6 @@
// permit switching from a ParameterBlock* to an index in another array.
int32 index_;
- // The offset of this parameter block inside a larger state vector.
- int32 state_offset_;
-
// The offset of this parameter block inside a larger delta vector.
int32 delta_offset_;
diff --git a/internal/ceres/program.cc b/internal/ceres/program.cc
index 82d76d3..99f6af9 100644
--- a/internal/ceres/program.cc
+++ b/internal/ceres/program.cc
@@ -129,13 +129,10 @@
}
}
// For parameters that appear in the program, set their position and offset.
- int state_offset = 0;
int delta_offset = 0;
for (int i = 0; i < parameter_blocks_.size(); ++i) {
parameter_blocks_[i]->set_index(i);
- parameter_blocks_[i]->set_state_offset(state_offset);
parameter_blocks_[i]->set_delta_offset(delta_offset);
- state_offset += parameter_blocks_[i]->Size();
delta_offset += parameter_blocks_[i]->LocalSize();
}
}
diff --git a/internal/ceres/solver_impl.cc b/internal/ceres/solver_impl.cc
index e16b6a0..c45c194 100644
--- a/internal/ceres/solver_impl.cc
+++ b/internal/ceres/solver_impl.cc
@@ -733,7 +733,7 @@
linear_solver_options.elimination_groups.push_back(it->second.size());
}
// Schur type solvers, expect at least two elimination groups. If
- // there is only one elimination group, then CreateReducedProblem
+ // there is only one elimination group, then CreateReducedProgram
// guarantees that this group only contains e_blocks. Thus we add a
// dummy elimination group with zero blocks in it.
if (IsSchurType(linear_solver_options.type) &&