Fix typos in doc and errors in the demo code.

Change-Id: I237402958ed8747ae438643132fcab90113ac27d
This commit is contained in:
Kuang Fangjun
2018-09-22 11:53:42 +08:00
parent 860b551e51
commit 0d3a84fce5
25 changed files with 61 additions and 62 deletions
+5 -5
View File
@@ -113,8 +113,8 @@ typedef internal::ResidualBlock* ResidualBlockId;
//
// Problem problem;
//
// problem.AddResidualBlock(new MyUnaryCostFunction(...), x1);
// problem.AddResidualBlock(new MyBinaryCostFunction(...), x2, x3);
// problem.AddResidualBlock(new MyUnaryCostFunction(...), NULL, x1);
// problem.AddResidualBlock(new MyBinaryCostFunction(...), NULL, x2, x3);
//
// Please see cost_function.h for details of the CostFunction object.
class CERES_EXPORT Problem {
@@ -136,13 +136,13 @@ class CERES_EXPORT Problem {
//
// By default, RemoveParameterBlock() and RemoveResidualBlock() take time
// proportional to the size of the entire problem. If you only ever remove
// parameters or residuals from the problem occassionally, this might be
// parameters or residuals from the problem occasionally, this might be
// acceptable. However, if you have memory to spare, enable this option to
// make RemoveParameterBlock() take time proportional to the number of
// residual blocks that depend on it, and RemoveResidualBlock() take (on
// average) constant time.
//
// The increase in memory usage is twofold: an additonal hash set per
// The increase in memory usage is twofold: an additional hash set per
// parameter block containing all the residuals that depend on the parameter
// block; and a hash set in the problem containing all residuals.
bool enable_fast_removal = false;
@@ -176,7 +176,7 @@ class CERES_EXPORT Problem {
~Problem();
// Add a residual block to the overall cost function. The cost
// function carries with it information about the sizes of the
// function carries with its information about the sizes of the
// parameter blocks it expects. The function checks that these match
// the sizes of the parameter blocks listed in parameter_blocks. The
// program aborts if a mismatch is detected. loss_function can be