~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to extern/libmv/third_party/ceres/internal/ceres/solver_impl.h

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-02-19 11:24:23 UTC
  • mfrom: (14.2.23 sid)
  • Revision ID: package-import@ubuntu.com-20140219112423-rkmaz2m7ha06d4tk
Tags: 2.69-3ubuntu1
* Merge with Debian; remaining changes:
  - Configure without OpenImageIO on armhf, as it is not available on
    Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
  static LinearSolver* CreateLinearSolver(Solver::Options* options,
104
104
                                          string* error);
105
105
 
106
 
  // Reorder the parameter blocks in program using the ordering. A
107
 
  // return value of true indicates success and false indicates an
108
 
  // error was encountered whose cause is logged to LOG(ERROR).
109
 
  static bool ApplyUserOrdering(const ProblemImpl::ParameterMap& parameter_map,
110
 
                                const ParameterBlockOrdering* ordering,
111
 
                                Program* program,
112
 
                                string* error);
113
 
 
114
 
 
115
106
  // Reorder the residuals for program, if necessary, so that the
116
107
  // residuals involving e block (i.e., the first num_eliminate_block
117
108
  // parameter blocks) occur together. This is a necessary condition
163
154
  static void AlternateLinearSolverForSchurTypeLinearSolver(
164
155
      Solver::Options* options);
165
156
 
 
157
  // Create a TripletSparseMatrix which contains the zero-one
 
158
  // structure corresponding to the block sparsity of the transpose of
 
159
  // the Jacobian matrix.
 
160
  //
 
161
  // Caller owns the result.
 
162
  static TripletSparseMatrix* CreateJacobianBlockSparsityTranspose(
 
163
      const Program* program);
 
164
 
 
165
  // Reorder the parameter blocks in program using the ordering
 
166
  static bool ApplyUserOrdering(
 
167
      const ProblemImpl::ParameterMap& parameter_map,
 
168
      const ParameterBlockOrdering* parameter_block_ordering,
 
169
      Program* program,
 
170
      string* error);
 
171
 
 
172
  // Sparse cholesky factorization routines when doing the sparse
 
173
  // cholesky factorization of the Jacobian matrix, reorders its
 
174
  // columns to reduce the fill-in. Compute this permutation and
 
175
  // re-order the parameter blocks.
 
176
  //
 
177
  // If the parameter_block_ordering contains more than one
 
178
  // elimination group and support for constrained fill-reducing
 
179
  // ordering is available in the sparse linear algebra library
 
180
  // (SuiteSparse version >= 4.2.0) then the fill reducing
 
181
  // ordering will take it into account, otherwise it will be ignored.
 
182
  static bool ReorderProgramForSparseNormalCholesky(
 
183
      const SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type,
 
184
      const ParameterBlockOrdering* parameter_block_ordering,
 
185
      Program* program,
 
186
      string* error);
 
187
 
166
188
  // Schur type solvers require that all parameter blocks eliminated
167
189
  // by the Schur eliminator occur before others and the residuals be
168
190
  // sorted in lexicographic order of their parameter blocks.
169
191
  //
170
 
  // If ordering has atleast two groups, then apply the ordering,
171
 
  // otherwise compute a new ordering using a Maximal Independent Set
172
 
  // algorithm and apply it.
 
192
  // If the parameter_block_ordering only contains one elimination
 
193
  // group then a maximal independent set is computed and used as the
 
194
  // first elimination group, otherwise the user's ordering is used.
 
195
  //
 
196
  // If the linear solver type is SPARSE_SCHUR and support for
 
197
  // constrained fill-reducing ordering is available in the sparse
 
198
  // linear algebra library (SuiteSparse version >= 4.2.0) then
 
199
  // columns of the schur complement matrix are ordered to reduce the
 
200
  // fill-in the Cholesky factorization.
173
201
  //
174
202
  // Upon return, ordering contains the parameter block ordering that
175
203
  // was used to order the program.
176
204
  static bool ReorderProgramForSchurTypeLinearSolver(
 
205
      const LinearSolverType linear_solver_type,
 
206
      const SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type,
177
207
      const ProblemImpl::ParameterMap& parameter_map,
178
 
      ParameterBlockOrdering* ordering,
 
208
      ParameterBlockOrdering* parameter_block_ordering,
179
209
      Program* program,
180
210
      string* error);
181
211
 
182
 
  // CHOLMOD when doing the sparse cholesky factorization of the
183
 
  // Jacobian matrix, reorders its columns to reduce the
184
 
  // fill-in. Compute this permutation and re-order the parameter
185
 
  // blocks.
186
 
  //
187
 
  static void ReorderProgramForSparseNormalCholesky(Program* program);
188
 
 
189
 
  // Create a TripletSparseMatrix which contains the zero-one
190
 
  // structure corresponding to the block sparsity of the transpose of
191
 
  // the Jacobian matrix.
192
 
  //
193
 
  // Caller owns the result.
194
 
  static TripletSparseMatrix* CreateJacobianBlockSparsityTranspose(
195
 
      const Program* program);
 
212
  // array contains a list of (possibly repeating) non-negative
 
213
  // integers. Let us assume that we have constructed another array
 
214
  // `p` by sorting and uniqueing the entries of array.
 
215
  // CompactifyArray replaces each entry in "array" with its position
 
216
  // in `p`.
 
217
  static void CompactifyArray(vector<int>* array);
196
218
};
197
219
 
198
220
}  // namespace internal