types.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. // Ceres Solver - A fast non-linear least squares minimizer
  2. // Copyright 2019 Google Inc. All rights reserved.
  3. // http://ceres-solver.org/
  4. //
  5. // Redistribution and use in source and binary forms, with or without
  6. // modification, are permitted provided that the following conditions are met:
  7. //
  8. // * Redistributions of source code must retain the above copyright notice,
  9. // this list of conditions and the following disclaimer.
  10. // * Redistributions in binary form must reproduce the above copyright notice,
  11. // this list of conditions and the following disclaimer in the documentation
  12. // and/or other materials provided with the distribution.
  13. // * Neither the name of Google Inc. nor the names of its contributors may be
  14. // used to endorse or promote products derived from this software without
  15. // specific prior written permission.
  16. //
  17. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  18. // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20. // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  21. // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  22. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  23. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  24. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  25. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  26. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  27. // POSSIBILITY OF SUCH DAMAGE.
  28. //
  29. // Author: sameeragarwal@google.com (Sameer Agarwal)
  30. //
  31. // Enums and other top level class definitions.
  32. //
  33. // Note: internal/types.cc defines stringification routines for some
  34. // of these enums. Please update those routines if you extend or
  35. // remove enums from here.
  36. #ifndef CERES_PUBLIC_TYPES_H_
  37. #define CERES_PUBLIC_TYPES_H_
  38. #include <string>
  39. #include "ceres/internal/disable_warnings.h"
  40. #include "ceres/internal/export.h"
  41. namespace ceres {
  42. // Argument type used in interfaces that can optionally take ownership
  43. // of a passed in argument. If TAKE_OWNERSHIP is passed, the called
  44. // object takes ownership of the pointer argument, and will call
  45. // delete on it upon completion.
  46. enum Ownership {
  47. DO_NOT_TAKE_OWNERSHIP,
  48. TAKE_OWNERSHIP,
  49. };
  50. // TODO(keir): Considerably expand the explanations of each solver type.
  51. enum LinearSolverType {
  52. // These solvers are for general rectangular systems formed from the
  53. // normal equations A'A x = A'b. They are direct solvers and do not
  54. // assume any special problem structure.
  55. // Solve the normal equations using a dense Cholesky solver; based
  56. // on Eigen.
  57. DENSE_NORMAL_CHOLESKY,
  58. // Solve the normal equations using a dense QR solver; based on
  59. // Eigen.
  60. DENSE_QR,
  61. // Solve the normal equations using a sparse cholesky solver;
  62. SPARSE_NORMAL_CHOLESKY,
  63. // Specialized solvers, specific to problems with a generalized
  64. // bi-partitite structure.
  65. // Solves the reduced linear system using a dense Cholesky solver;
  66. // based on Eigen.
  67. DENSE_SCHUR,
  68. // Solves the reduced linear system using a sparse Cholesky solver;
  69. // based on CHOLMOD.
  70. SPARSE_SCHUR,
  71. // Solves the reduced linear system using Conjugate Gradients, based
  72. // on a new Ceres implementation. Suitable for large scale
  73. // problems.
  74. ITERATIVE_SCHUR,
  75. // Conjugate gradients on the normal equations.
  76. CGNR
  77. };
  78. enum PreconditionerType {
  79. // Trivial preconditioner - the identity matrix.
  80. IDENTITY,
  81. // Block diagonal of the Gauss-Newton Hessian.
  82. JACOBI,
  83. // Note: The following four preconditioners can only be used with
  84. // the ITERATIVE_SCHUR solver. They are well suited for Structure
  85. // from Motion problems.
  86. // Block diagonal of the Schur complement. This preconditioner may
  87. // only be used with the ITERATIVE_SCHUR solver.
  88. SCHUR_JACOBI,
  89. // Use power series expansion to approximate the inversion of Schur complement
  90. // as a preconditioner.
  91. SCHUR_POWER_SERIES_EXPANSION,
  92. // Visibility clustering based preconditioners.
  93. //
  94. // The following two preconditioners use the visibility structure of
  95. // the scene to determine the sparsity structure of the
  96. // preconditioner. This is done using a clustering algorithm. The
  97. // available visibility clustering algorithms are described below.
  98. CLUSTER_JACOBI,
  99. CLUSTER_TRIDIAGONAL,
  100. // Subset preconditioner is a general purpose preconditioner
  101. // linear least squares problems. Given a set of residual blocks,
  102. // it uses the corresponding subset of the rows of the Jacobian to
  103. // construct a preconditioner.
  104. //
  105. // Suppose the Jacobian J has been horizontally partitioned as
  106. //
  107. // J = [P]
  108. // [Q]
  109. //
  110. // Where, Q is the set of rows corresponding to the residual
  111. // blocks in residual_blocks_for_subset_preconditioner.
  112. //
  113. // The preconditioner is the inverse of the matrix Q'Q.
  114. //
  115. // Obviously, the efficacy of the preconditioner depends on how
  116. // well the matrix Q approximates J'J, or how well the chosen
  117. // residual blocks approximate the non-linear least squares
  118. // problem.
  119. SUBSET
  120. };
  121. enum VisibilityClusteringType {
  122. // Canonical views algorithm as described in
  123. //
  124. // "Scene Summarization for Online Image Collections", Ian Simon, Noah
  125. // Snavely, Steven M. Seitz, ICCV 2007.
  126. //
  127. // This clustering algorithm can be quite slow, but gives high
  128. // quality clusters. The original visibility based clustering paper
  129. // used this algorithm.
  130. CANONICAL_VIEWS,
  131. // The classic single linkage algorithm. It is extremely fast as
  132. // compared to CANONICAL_VIEWS, but can give slightly poorer
  133. // results. For problems with large number of cameras though, this
  134. // is generally a pretty good option.
  135. //
  136. // If you are using SCHUR_JACOBI preconditioner and have SuiteSparse
  137. // available, CLUSTER_JACOBI and CLUSTER_TRIDIAGONAL in combination
  138. // with the SINGLE_LINKAGE algorithm will generally give better
  139. // results.
  140. SINGLE_LINKAGE
  141. };
  142. enum SparseLinearAlgebraLibraryType {
  143. // High performance sparse Cholesky factorization and approximate
  144. // minimum degree ordering.
  145. SUITE_SPARSE,
  146. // Eigen's sparse linear algebra routines. In particular Ceres uses
  147. // the Simplicial LDLT routines.
  148. EIGEN_SPARSE,
  149. // Apple's Accelerate framework sparse linear algebra routines.
  150. ACCELERATE_SPARSE,
  151. // Nvidia's cuSPARSE library.
  152. CUDA_SPARSE,
  153. // No sparse linear solver should be used. This does not necessarily
  154. // imply that Ceres was built without any sparse library, although that
  155. // is the likely use case, merely that one should not be used.
  156. NO_SPARSE
  157. };
  158. // The order in which variables are eliminated in a linear solver
  159. // can have a significant of impact on the efficiency and accuracy
  160. // of the method. e.g., when doing sparse Cholesky factorization,
  161. // there are matrices for which a good ordering will give a
  162. // Cholesky factor with O(n) storage, where as a bad ordering will
  163. // result in an completely dense factor.
  164. //
  165. // So sparse direct solvers like SPARSE_NORMAL_CHOLESKY and
  166. // SPARSE_SCHUR and preconditioners like SUBSET, CLUSTER_JACOBI &
  167. // CLUSTER_TRIDIAGONAL use a fill reducing ordering of the columns and
  168. // rows of the matrix being factorized before actually the numeric
  169. // factorization.
  170. //
  171. // This enum controls the class of algorithm used to compute this
  172. // fill reducing ordering. There is no single algorithm that works
  173. // on all matrices, so determining which algorithm works better is a
  174. // matter of empirical experimentation.
  175. enum LinearSolverOrderingType {
  176. // Approximate Minimum Degree.
  177. AMD,
  178. // Nested Dissection.
  179. NESDIS
  180. };
  181. enum DenseLinearAlgebraLibraryType {
  182. EIGEN,
  183. LAPACK,
  184. CUDA,
  185. };
  186. // Logging options
  187. // The options get progressively noisier.
  188. enum LoggingType {
  189. SILENT,
  190. PER_MINIMIZER_ITERATION,
  191. };
  192. enum MinimizerType {
  193. LINE_SEARCH,
  194. TRUST_REGION,
  195. };
  196. enum LineSearchDirectionType {
  197. // Negative of the gradient.
  198. STEEPEST_DESCENT,
  199. // A generalization of the Conjugate Gradient method to non-linear
  200. // functions. The generalization can be performed in a number of
  201. // different ways, resulting in a variety of search directions. The
  202. // precise choice of the non-linear conjugate gradient algorithm
  203. // used is determined by NonlinerConjuateGradientType.
  204. NONLINEAR_CONJUGATE_GRADIENT,
  205. // BFGS, and it's limited memory approximation L-BFGS, are quasi-Newton
  206. // algorithms that approximate the Hessian matrix by iteratively refining
  207. // an initial estimate with rank-one updates using the gradient at each
  208. // iteration. They are a generalisation of the Secant method and satisfy
  209. // the Secant equation. The Secant equation has an infinium of solutions
  210. // in multiple dimensions, as there are N*(N+1)/2 degrees of freedom in a
  211. // symmetric matrix but only N conditions are specified by the Secant
  212. // equation. The requirement that the Hessian approximation be positive
  213. // definite imposes another N additional constraints, but that still leaves
  214. // remaining degrees-of-freedom. (L)BFGS methods uniquely determine the
  215. // approximate Hessian by imposing the additional constraints that the
  216. // approximation at the next iteration must be the 'closest' to the current
  217. // approximation (the nature of how this proximity is measured is actually
  218. // the defining difference between a family of quasi-Newton methods including
  219. // (L)BFGS & DFP). (L)BFGS is currently regarded as being the best known
  220. // general quasi-Newton method.
  221. //
  222. // The principal difference between BFGS and L-BFGS is that whilst BFGS
  223. // maintains a full, dense approximation to the (inverse) Hessian, L-BFGS
  224. // maintains only a window of the last M observations of the parameters and
  225. // gradients. Using this observation history, the calculation of the next
  226. // search direction can be computed without requiring the construction of the
  227. // full dense inverse Hessian approximation. This is particularly important
  228. // for problems with a large number of parameters, where storage of an N-by-N
  229. // matrix in memory would be prohibitive.
  230. //
  231. // For more details on BFGS see:
  232. //
  233. // Broyden, C.G., "The Convergence of a Class of Double-rank Minimization
  234. // Algorithms,"; J. Inst. Maths. Applics., Vol. 6, pp 76-90, 1970.
  235. //
  236. // Fletcher, R., "A New Approach to Variable Metric Algorithms,"
  237. // Computer Journal, Vol. 13, pp 317-322, 1970.
  238. //
  239. // Goldfarb, D., "A Family of Variable Metric Updates Derived by Variational
  240. // Means," Mathematics of Computing, Vol. 24, pp 23-26, 1970.
  241. //
  242. // Shanno, D.F., "Conditioning of Quasi-Newton Methods for Function
  243. // Minimization," Mathematics of Computing, Vol. 24, pp 647-656, 1970.
  244. //
  245. // For more details on L-BFGS see:
  246. //
  247. // Nocedal, J. (1980). "Updating Quasi-Newton Matrices with Limited
  248. // Storage". Mathematics of Computation 35 (151): 773-782.
  249. //
  250. // Byrd, R. H.; Nocedal, J.; Schnabel, R. B. (1994).
  251. // "Representations of Quasi-Newton Matrices and their use in
  252. // Limited Memory Methods". Mathematical Programming 63 (4):
  253. // 129-156.
  254. //
  255. // A general reference for both methods:
  256. //
  257. // Nocedal J., Wright S., Numerical Optimization, 2nd Ed. Springer, 1999.
  258. LBFGS,
  259. BFGS,
  260. };
  261. // Nonlinear conjugate gradient methods are a generalization of the
  262. // method of Conjugate Gradients for linear systems. The
  263. // generalization can be carried out in a number of different ways
  264. // leading to number of different rules for computing the search
  265. // direction. Ceres provides a number of different variants. For more
  266. // details see Numerical Optimization by Nocedal & Wright.
  267. enum NonlinearConjugateGradientType {
  268. FLETCHER_REEVES,
  269. POLAK_RIBIERE,
  270. HESTENES_STIEFEL,
  271. };
  272. enum LineSearchType {
  273. // Backtracking line search with polynomial interpolation or
  274. // bisection.
  275. ARMIJO,
  276. WOLFE,
  277. };
  278. // Ceres supports different strategies for computing the trust region
  279. // step.
  280. enum TrustRegionStrategyType {
  281. // The default trust region strategy is to use the step computation
  282. // used in the Levenberg-Marquardt algorithm. For more details see
  283. // levenberg_marquardt_strategy.h
  284. LEVENBERG_MARQUARDT,
  285. // Powell's dogleg algorithm interpolates between the Cauchy point
  286. // and the Gauss-Newton step. It is particularly useful if the
  287. // LEVENBERG_MARQUARDT algorithm is making a large number of
  288. // unsuccessful steps. For more details see dogleg_strategy.h.
  289. //
  290. // NOTES:
  291. //
  292. // 1. This strategy has not been experimented with or tested as
  293. // extensively as LEVENBERG_MARQUARDT, and therefore it should be
  294. // considered EXPERIMENTAL for now.
  295. //
  296. // 2. For now this strategy should only be used with exact
  297. // factorization based linear solvers, i.e., SPARSE_SCHUR,
  298. // DENSE_SCHUR, DENSE_QR and SPARSE_NORMAL_CHOLESKY.
  299. DOGLEG
  300. };
  301. // Ceres supports two different dogleg strategies.
  302. // The "traditional" dogleg method by Powell and the
  303. // "subspace" method described in
  304. // R. H. Byrd, R. B. Schnabel, and G. A. Shultz,
  305. // "Approximate solution of the trust region problem by minimization
  306. // over two-dimensional subspaces", Mathematical Programming,
  307. // 40 (1988), pp. 247--263
  308. enum DoglegType {
  309. // The traditional approach constructs a dogleg path
  310. // consisting of two line segments and finds the furthest
  311. // point on that path that is still inside the trust region.
  312. TRADITIONAL_DOGLEG,
  313. // The subspace approach finds the exact minimum of the model
  314. // constrained to the subspace spanned by the dogleg path.
  315. SUBSPACE_DOGLEG
  316. };
  317. enum TerminationType {
  318. // Minimizer terminated because one of the convergence criterion set
  319. // by the user was satisfied.
  320. //
  321. // 1. (new_cost - old_cost) < function_tolerance * old_cost;
  322. // 2. max_i |gradient_i| < gradient_tolerance
  323. // 3. |step|_2 <= parameter_tolerance * ( |x|_2 + parameter_tolerance)
  324. //
  325. // The user's parameter blocks will be updated with the solution.
  326. CONVERGENCE,
  327. // The solver ran for maximum number of iterations or maximum amount
  328. // of time specified by the user, but none of the convergence
  329. // criterion specified by the user were met. The user's parameter
  330. // blocks will be updated with the solution found so far.
  331. NO_CONVERGENCE,
  332. // The minimizer terminated because of an error. The user's
  333. // parameter blocks will not be updated.
  334. FAILURE,
  335. // Using an IterationCallback object, user code can control the
  336. // minimizer. The following enums indicate that the user code was
  337. // responsible for termination.
  338. //
  339. // Minimizer terminated successfully because a user
  340. // IterationCallback returned SOLVER_TERMINATE_SUCCESSFULLY.
  341. //
  342. // The user's parameter blocks will be updated with the solution.
  343. USER_SUCCESS,
  344. // Minimizer terminated because because a user IterationCallback
  345. // returned SOLVER_ABORT.
  346. //
  347. // The user's parameter blocks will not be updated.
  348. USER_FAILURE
  349. };
  350. // Enums used by the IterationCallback instances to indicate to the
  351. // solver whether it should continue solving, the user detected an
  352. // error or the solution is good enough and the solver should
  353. // terminate.
  354. enum CallbackReturnType {
  355. // Continue solving to next iteration.
  356. SOLVER_CONTINUE,
  357. // Terminate solver, and do not update the parameter blocks upon
  358. // return. Unless the user has set
  359. // Solver:Options:::update_state_every_iteration, in which case the
  360. // state would have been updated every iteration
  361. // anyways. Solver::Summary::termination_type is set to USER_ABORT.
  362. SOLVER_ABORT,
  363. // Terminate solver, update state and
  364. // return. Solver::Summary::termination_type is set to USER_SUCCESS.
  365. SOLVER_TERMINATE_SUCCESSFULLY
  366. };
  367. // The format in which linear least squares problems should be logged
  368. // when Solver::Options::lsqp_iterations_to_dump is non-empty.
  369. enum DumpFormatType {
  370. // Print the linear least squares problem in a human readable format
  371. // to stderr. The Jacobian is printed as a dense matrix. The vectors
  372. // D, x and f are printed as dense vectors. This should only be used
  373. // for small problems.
  374. CONSOLE,
  375. // Write out the linear least squares problem to the directory
  376. // pointed to by Solver::Options::lsqp_dump_directory as text files
  377. // which can be read into MATLAB/Octave. The Jacobian is dumped as a
  378. // text file containing (i,j,s) triplets, the vectors D, x and f are
  379. // dumped as text files containing a list of their values.
  380. //
  381. // A MATLAB/octave script called lm_iteration_???.m is also output,
  382. // which can be used to parse and load the problem into memory.
  383. TEXTFILE
  384. };
  385. // For SizedCostFunction and AutoDiffCostFunction, DYNAMIC can be
  386. // specified for the number of residuals. If specified, then the
  387. // number of residuas for that cost function can vary at runtime.
  388. enum DimensionType {
  389. DYNAMIC = -1,
  390. };
  391. // The differentiation method used to compute numerical derivatives in
  392. // NumericDiffCostFunction and DynamicNumericDiffCostFunction.
  393. enum NumericDiffMethodType {
  394. // Compute central finite difference: f'(x) ~ (f(x+h) - f(x-h)) / 2h.
  395. CENTRAL,
  396. // Compute forward finite difference: f'(x) ~ (f(x+h) - f(x)) / h.
  397. FORWARD,
  398. // Adaptive numerical differentiation using Ridders' method. Provides more
  399. // accurate and robust derivatives at the expense of additional cost
  400. // function evaluations.
  401. RIDDERS
  402. };
  403. enum LineSearchInterpolationType {
  404. BISECTION,
  405. QUADRATIC,
  406. CUBIC,
  407. };
  408. enum CovarianceAlgorithmType {
  409. DENSE_SVD,
  410. SPARSE_QR,
  411. };
  412. // It is a near impossibility that user code generates this exact
  413. // value in normal operation, thus we will use it to fill arrays
  414. // before passing them to user code. If on return an element of the
  415. // array still contains this value, we will assume that the user code
  416. // did not write to that memory location.
  417. const double kImpossibleValue = 1e302;
  418. CERES_EXPORT const char* LinearSolverTypeToString(LinearSolverType type);
  419. CERES_EXPORT bool StringToLinearSolverType(std::string value,
  420. LinearSolverType* type);
  421. CERES_EXPORT const char* PreconditionerTypeToString(PreconditionerType type);
  422. CERES_EXPORT bool StringToPreconditionerType(std::string value,
  423. PreconditionerType* type);
  424. CERES_EXPORT const char* VisibilityClusteringTypeToString(
  425. VisibilityClusteringType type);
  426. CERES_EXPORT bool StringToVisibilityClusteringType(
  427. std::string value, VisibilityClusteringType* type);
  428. CERES_EXPORT const char* SparseLinearAlgebraLibraryTypeToString(
  429. SparseLinearAlgebraLibraryType type);
  430. CERES_EXPORT bool StringToSparseLinearAlgebraLibraryType(
  431. std::string value, SparseLinearAlgebraLibraryType* type);
  432. CERES_EXPORT const char* LinearSolverOrderingTypeToString(
  433. LinearSolverOrderingType type);
  434. CERES_EXPORT bool StringToLinearSolverOrderingType(
  435. std::string value, LinearSolverOrderingType* type);
  436. CERES_EXPORT const char* DenseLinearAlgebraLibraryTypeToString(
  437. DenseLinearAlgebraLibraryType type);
  438. CERES_EXPORT bool StringToDenseLinearAlgebraLibraryType(
  439. std::string value, DenseLinearAlgebraLibraryType* type);
  440. CERES_EXPORT const char* TrustRegionStrategyTypeToString(
  441. TrustRegionStrategyType type);
  442. CERES_EXPORT bool StringToTrustRegionStrategyType(
  443. std::string value, TrustRegionStrategyType* type);
  444. CERES_EXPORT const char* DoglegTypeToString(DoglegType type);
  445. CERES_EXPORT bool StringToDoglegType(std::string value, DoglegType* type);
  446. CERES_EXPORT const char* MinimizerTypeToString(MinimizerType type);
  447. CERES_EXPORT bool StringToMinimizerType(std::string value, MinimizerType* type);
  448. CERES_EXPORT const char* LineSearchDirectionTypeToString(
  449. LineSearchDirectionType type);
  450. CERES_EXPORT bool StringToLineSearchDirectionType(
  451. std::string value, LineSearchDirectionType* type);
  452. CERES_EXPORT const char* LineSearchTypeToString(LineSearchType type);
  453. CERES_EXPORT bool StringToLineSearchType(std::string value,
  454. LineSearchType* type);
  455. CERES_EXPORT const char* NonlinearConjugateGradientTypeToString(
  456. NonlinearConjugateGradientType type);
  457. CERES_EXPORT bool StringToNonlinearConjugateGradientType(
  458. std::string value, NonlinearConjugateGradientType* type);
  459. CERES_EXPORT const char* LineSearchInterpolationTypeToString(
  460. LineSearchInterpolationType type);
  461. CERES_EXPORT bool StringToLineSearchInterpolationType(
  462. std::string value, LineSearchInterpolationType* type);
  463. CERES_EXPORT const char* CovarianceAlgorithmTypeToString(
  464. CovarianceAlgorithmType type);
  465. CERES_EXPORT bool StringToCovarianceAlgorithmType(
  466. std::string value, CovarianceAlgorithmType* type);
  467. CERES_EXPORT const char* NumericDiffMethodTypeToString(
  468. NumericDiffMethodType type);
  469. CERES_EXPORT bool StringToNumericDiffMethodType(std::string value,
  470. NumericDiffMethodType* type);
  471. CERES_EXPORT const char* LoggingTypeToString(LoggingType type);
  472. CERES_EXPORT bool StringtoLoggingType(std::string value, LoggingType* type);
  473. CERES_EXPORT const char* DumpFormatTypeToString(DumpFormatType type);
  474. CERES_EXPORT bool StringtoDumpFormatType(std::string value,
  475. DumpFormatType* type);
  476. CERES_EXPORT bool StringtoDumpFormatType(std::string value, LoggingType* type);
  477. CERES_EXPORT const char* TerminationTypeToString(TerminationType type);
  478. CERES_EXPORT bool IsSchurType(LinearSolverType type);
  479. CERES_EXPORT bool IsSparseLinearAlgebraLibraryTypeAvailable(
  480. SparseLinearAlgebraLibraryType type);
  481. CERES_EXPORT bool IsDenseLinearAlgebraLibraryTypeAvailable(
  482. DenseLinearAlgebraLibraryType type);
  483. } // namespace ceres
  484. #include "ceres/internal/reenable_warnings.h"
  485. #endif // CERES_PUBLIC_TYPES_H_